Skip to content

Commit

Permalink
feat: add Attachments api
Browse files Browse the repository at this point in the history
  • Loading branch information
animify committed Feb 9, 2020
1 parent 07b680d commit d8be6b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Dribbble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ export default class Dribbble {
};
}

public static get attachments() {
return {
create: (shot: string, body: { file: File }) => {
return Request.fetch({ url: `/shots/${shot}/attachments`, method: 'POST', body });
},
delete: (shot: string, id: string) => {
return Request.fetch({ url: `/shots/${shot}/attachments/${id}`, method: 'DELETE' });
},
};
}

public static get shots() {
return {
list: () => {
Expand Down

0 comments on commit d8be6b2

Please sign in to comment.