Socket
Book a DemoInstallSign in
Socket

dribbble

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dribbble

2.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Dribbble API wrapper Gem

Gem Version Build Status

Calyhre/dribbble is an unofficial API wrapper ruby gem for Dribbble.com's API.

But, what is Dribbble?

What are you working on? Dribbble is a community of designers answering that question each day. Web designers, graphic designers, illustrators, icon artists, typographers, logo designers, and other creative types share small screenshots (shots) that show their work, process, and current projects.

Installation

Requirements

  • Ruby ~> 2.2.5, use v1.0.4 for previous Ruby versions.

In a Gemfile

gem 'dribbble'

By yourself

gem install dribbble

Usage

Lets assume you have your token set:

token = 'my_access_token'

Some calls are through a client:

client = Dribbble::Client.new(token)

Projects

Find a Projects
project = Dribbble::Project.find(token, 1234)
Update a Project
project.update(name: 'Some project', description: 'Some description');
Delete a Project
project.delete

Shots

Find a shot
shot = Dribbble::Shot.find(token, 1971500)
Create a shot
params = {
  title: 'A new shot',
  description: 'Shot description',
  image: File.open('/path/to/image.png'),
  tags: %w(tag1 tag2),
  team_id: 1234,
  rebound_source_id: 1234
}
shot = Dribbble::Shot.create(token, params)
Update a shot
params = {
  title: 'A new shot',
  description: 'Shot description',
  tags: %w(tag1 tag2),
  team_id: 1234
}
shot.update(params)
Delete a shot
shot.delete

Shot attachments

Create an attachment
shot.create_attachment(file: File.open('attachment_path'))
Delete an attachment
shot.delete_attachment(206165)

Shot projects

List projects for a shot
projects = shot.projects

Users

Get the authenticated user
user = client.user
List authenticated user’s projects
projects = client.projects

User shots

List shots for authenticated user
shots = client.shots

Pagination & parameters

All requests are paginated, defaults params are :

ParamDefault
page1
per_page100

You override them or adding some by passing a Hash to every request :

user.shots page: 2, custom_param: 'My param'

Contributing

Feel free to help me make this gem awesome !

Contributors and CONTRIBUTING

Licence

Released under the MIT License. See the LICENSE file for further details.

FAQs

Package last updated on 19 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.