Skip to content

Commit

Permalink
fix: Dribbble api no longer static
Browse files Browse the repository at this point in the history
  • Loading branch information
animify committed Feb 10, 2020
1 parent 22f016f commit b7a1666
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function BUNDLE {
echo "Bundling..."
rm -rf dist
yarn bundle
mv dist/index.d.ts index.d.ts
echo "Bundling done."
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"author": "Stefan Mansson <[email protected]>",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"umd": "dist/index.umd.js",
"module": "dist/index.m.js",
"scripts": {
Expand Down Expand Up @@ -52,4 +53,4 @@
"dependencies": {
"whatwg-fetch": "^3.0.0"
}
}
}
8 changes: 4 additions & 4 deletions src/Dribbble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class Dribbble {
Request.authToken = options.authToken;
}

public static get projects() {
public get projects() {
return {
list: () => {
return Request.fetch({ url: '/user/projects', method: 'GET' });
Expand All @@ -26,7 +26,7 @@ export default class Dribbble {
};
}

public static get attachments() {
public get attachments() {
return {
create: (shot: string, body: { file: File }) => {
return Request.fetch({ url: `/shots/${shot}/attachments`, method: 'POST', body });
Expand All @@ -37,7 +37,7 @@ export default class Dribbble {
};
}

public static get shots() {
public get shots() {
return {
list: () => {
return Request.fetch({ url: '/user/shots', method: 'GET' });
Expand Down Expand Up @@ -76,7 +76,7 @@ export default class Dribbble {
};
}

public static get user() {
public get user() {
return {
get: () => {
return Request.fetch({ url: '/user', method: 'GET' });
Expand Down

0 comments on commit b7a1666

Please sign in to comment.