diff --git a/src/index.ts b/src/index.ts index 72607d2..3e38140 100644 --- a/src/index.ts +++ b/src/index.ts @@ -192,6 +192,20 @@ export default class Tablo { } }); } + + async patch(path: string, patchData: any): Promise { + this.isReady(); + return new Promise(async (resolve, reject) => { + try { + const url = this.getUrl(path); + const returned: { data: T[] } = await Axios.patch(url, patchData); + const { data } = returned; + resolve(data); + } catch (error) { + reject(error); + } + }); + } } export { Tablo };