Skip to content

Commit

Permalink
simply endpoints for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocksy committed Apr 29, 2021
1 parent 992995a commit a4e8cca
Show file tree
Hide file tree
Showing 42 changed files with 155 additions and 1,700 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [2.0.0] - 2021-04-29
### Added
- Added rubocop gems
### Changed
- Removed any specs that did not make sense
- Removed any dribbble endpoints that are not supported
### Fixed
- All of the specs


## [1.2.0] - 2017-03-01
#### Changed
Expand Down
204 changes: 0 additions & 204 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,56 +42,6 @@ Some calls are through a client:
client = Dribbble::Client.new(token)
```

### Buckets

##### Find a bucket

```ruby
bucket = Dribbble::Bucket.find(token, '2754')
```

##### Create a bucket

```ruby
bucket = Dribbble::Bucket.create(token, name: 'A new bucket', description: 'A description')
```

##### Update a bucket

```ruby
bucket.update name: 'An updated bucket name'
```

##### Delete a bucket

```ruby
bucket.delete
```

#### Bucket shots

##### List bucket shots

```ruby
shots = bucket.shots
```

##### Add shot to a bucket

```ruby
bucket.add_shot(329335)
# or
bucket.add_shot(shot) # shot is a Dribbble::Shot
```

##### Remove shot from a bucket

```ruby
bucket.remove_shot(329335)
# or
bucket.remove_shot(shot) # shot is a Dribbble::Shot
```

### Projects

##### Find a Projects
Expand All @@ -100,12 +50,6 @@ bucket.remove_shot(shot) # shot is a Dribbble::Shot
project = Dribbble::Project.find(token, 3)
```

#### Project shots

```ruby
shots = project.shots
```

### Shots

##### Find a shot
Expand Down Expand Up @@ -172,96 +116,6 @@ shot.find_attachment(206165)
shot.delete_attachment(206165)
```

#### Shot buckets

##### List buckets for a shot

```ruby
shot.buckets
```

#### Shot comments

##### List comments for a shot

```ruby
shot.comments
```

##### Create a comment

```ruby
comment = shot.create_comment(body: 'A comment')
```

##### Get a single comment

```ruby
comment = shot.find_comment(1145736)
```

##### Update a comment

```ruby
comment = shot.update_comment(1145736, body: 'Comment body')
```

##### Delete a comment

```ruby
shot.delete_comment(1145736)
```

##### List likes for a comment

```ruby
comment.likes
```

##### Check if you like a comment

```ruby
comment.like?
```

##### Like a comment

```ruby
comment.like!
```

##### Unlike a comment

```ruby
comment.unlike!
```

#### Shot likes

##### List the likes for a shot

```ruby
shot.likes
```

##### Check if you like a shot

```ruby
shot.like?
```

##### Like a shot

```ruby
shot.like!
```

##### Unlike a shot

```ruby
shot.unlike!
```

#### Shot projects

##### List projects for a shot
Expand All @@ -287,22 +141,6 @@ user = Dribbble::User.find(token, 483195)
team = user.teams.first
```

#### Team members

##### List a team’s members

```ruby
users = team.members
```

#### Team shots

##### List shots for a team

```ruby
shots = team.shots
```

### Users

##### Get a single user
Expand All @@ -317,20 +155,6 @@ user = Dribbble::User.find(token, 483195)
user = client.user
```

#### User buckets

##### List a user’s buckets

```ruby
user.buckets
```

##### List authenticated user’s buckets

```ruby
buckets = client.buckets
```

#### User followers

##### List followers of a user
Expand Down Expand Up @@ -381,20 +205,6 @@ user.follow!
user.unfollow!
```

#### User likes

##### List shot likes for a user

```ruby
shots = user.likes
```

##### List shot likes for authenticated user

```ruby
shots = client.likes
```

#### User projects

##### List a user’s projects
Expand Down Expand Up @@ -423,20 +233,6 @@ shots = user.shots
shots = client.shots
```

#### User teams

##### List a user’s teams

```ruby
teams = user.teams
```

##### List authenticated user’s teams

```ruby
teams = client.teams
```

### Pagination & parameters

All requests are paginated, defaults params are :
Expand Down
35 changes: 0 additions & 35 deletions lib/dribbble/bucket.rb

This file was deleted.

28 changes: 0 additions & 28 deletions lib/dribbble/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
require 'dribbble/base'
require 'dribbble/shot'
require 'dribbble/user'
require 'dribbble/bucket'
require 'dribbble/project'
require 'dribbble/team'
require 'dribbble/errors'

require 'rest_client'
Expand All @@ -22,21 +20,6 @@ def initialize(token = nil)
raise Dribbble::Error::MissingToken if @token.nil?
end

# Get authenticated user's buckets
def buckets(attrs = {})
Dribbble::Bucket.batch_new token, html_get('/user/buckets', attrs)
end

# Get authenticated user's followers
def followers(attrs = {})
Dribbble::User.batch_new token, html_get('/user/followers', attrs)
end

# Get authenticated user's likes
def likes(attrs = {})
Dribbble::Shot.batch_new token, html_get('/user/likes', attrs), 'shot'
end

# Get authenticated user's followers
def projects(attrs = {})
Dribbble::Project.batch_new token, html_get('/user/projects', attrs)
Expand All @@ -47,17 +30,6 @@ def shots(attrs = {})
Dribbble::Shot.batch_new token, html_get('/user/shots', attrs)
end

# Get authenticated user's followees shots
# Limited to first 600 shots regardless of the pagination
def following_shots(attrs = {})
Dribbble::Shot.batch_new token, html_get('/user/following/shots', attrs)
end

# Get authenticated user's teams
def teams(attrs = {})
Dribbble::Team.batch_new token, html_get('/user/teams', attrs)
end

# Get a single User or the authenticated one
def user
Dribbble::User.new @token, html_get('/user')
Expand Down
31 changes: 0 additions & 31 deletions lib/dribbble/comment.rb

This file was deleted.

2 changes: 0 additions & 2 deletions lib/dribbble/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

module Dribbble
module Error
ISSUES_URL = 'https://github.com/Calyhre/dribbble/issues/new'

# Standard error we will inherit
class Standard < StandardError
def initialize(message = nil)
Expand Down
Loading

0 comments on commit a4e8cca

Please sign in to comment.