Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: animify/dribbblejs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.12
Choose a base ref
...
head repository: animify/dribbblejs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.13
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Feb 22, 2020

  1. Copy the full SHA
    5b75897 View commit details
  2. chore: update readme

    animify committed Feb 22, 2020
    Copy the full SHA
    cf85262 View commit details
  3. -> v0.0.13

    animify committed Feb 22, 2020
    Copy the full SHA
    03f3dc6 View commit details
Showing with 83 additions and 27 deletions.
  1. +8 −0 CHANGELOG.md
  2. +73 −25 README.md
  3. +1 −1 package.json
  4. +1 −1 src/Dribbble.ts
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [Version 0.0.13](https://github.com/animify/dribbblejs/releases/tag/v0.0.13) (2020-2-22)

### Bug fixes

- swap params for attachment delete: [`5b75897`](https://github.com/animify/dribbblejs/commit/5b75897)

[...full changes](https://github.com/animify/dribbblejs/compare/v0.0.12...v0.0.13)

## [Version 0.0.12](https://github.com/animify/dribbblejs/releases/tag/v0.0.12) (2020-2-22)

### Bug fixes
98 changes: 73 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -17,11 +17,13 @@ A Typescript-first [Dribbble API](https://developer.dribbble.com/v2) library.
## Getting Started
### Installation

##### with Yarn
```
yarn add dribbblejs
$ yarn add dribbblejs
```
##### or with NPM
```
npm install dribbblejs
$ npm install dribbblejs
```

### Usage
@@ -35,66 +37,112 @@ const dribbble = new Dribbble({
```

## API

### User

#### Get the authenticated user
[Official User API Documentation](https://developer.dribbble.com/v2/user/)

#### Get authenticated user

```ts
dribbble.user.get()
```

---
### Projects

#### Fetching a list of projects
[Official Projects API Documentation](https://developer.dribbble.com/v2/projects/)

#### Get list of projects

```ts
dribbble.projects.list()
```

#### Create a project
```ts
dribbble.projects.create()
dribbble.projects.create({
name: 'Project name', // *Required*
description: 'Project description' // Optional
})
```
#### Update a project

#### Update a project by `id`

```ts
dribbble.projects.update()
dribbble.projects.update('883377', {
name: 'New project name', // Optional
description: 'New project description' // Optional
})
```
#### Delete a project

#### Delete a project by `id`

```ts
dribbble.projects.delete()
dribbble.projects.delete('883377')
```

---

### Shots

#### Fetching a list of shots
[Official Shots API Documentation](https://developer.dribbble.com/v2/shots/)

#### Get list of shots
```ts
dribbble.shots.list()
```
#### Get a shot
#### Get a shot by `id`
```ts
dribbble.shots.get()
dribbble.shots.get('6432565')
```

#### Create a shot
```ts
dribbble.shots.create()
```
#### Update a shot
dribbble.shots.create({
image: imageFile // *Required*
title: 'Shot title', // *Required*
description: 'Shot description', // Optional
low_profile: true, // Optional
rebound_source_id: 6432542, // Optional
scheduled_for: 1582391638790, // Optional
tags: ['ui', 'illustration'], // Optional
team_id: 3818924 // Optional
})
```

#### Update a shot by `id`
```ts
dribbble.shots.update()
```
#### Delete a shot
dribbble.shots.update('6432565', {
title: 'New shot title', // Optional
description: 'New shot description', // Optional
low_profile: true, // Optional
rebound_source_id: 6432542, // Optional
scheduled_for: 1582391638790, // Optional
tags: ['ui', 'illustration'], // Optional
team_id: 3818924 // Optional
})
```

#### Delete a shot by `id`
```ts
dribbble.shots.delete()
dribbble.shots.delete('6432565')
```

### Attachments
---

### Attachments API

#### Create attachment for a `shot`

#### Create an attachment for a shot
```ts
dribbble.attachments.create()
dribbble.attachments.create('6432565', {
file: attachmentFile // *Required*
})
```

#### Delete an attachment for a shot
#### Delete attachment `id` for a `shot`
```ts
dribbble.attachments.create()
dribbble.attachments.delete('1376676', '6432565')
```

---
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dribbblejs",
"version": "0.0.12",
"version": "0.0.13",
"author": "Stefan Mansson <stefan.aotik@gmail.com>",
"license": "MIT",
"main": "dist/index.js",
2 changes: 1 addition & 1 deletion src/Dribbble.ts
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ export default class Dribbble {
create: (shot: string, body: AttachmentsCreateBody) => {
return Request.fetch({ url: `/shots/${shot}/attachments`, method: 'POST', body });
},
delete: (shot: string, id: string) => {
delete: (id: string, shot: string) => {
return Request.fetch({ url: `/shots/${shot}/attachments/${id}`, method: 'DELETE' });
},
};