API Feedback

  • Idea
  • Updated 2 years ago
  • Implemented
Comments, questions and feedback on the Dribbble API.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes

Posted 5 years ago

  • 6
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Hi Rich,

I can't see a way of determining which page you are on, or the total number of pages, in any of the responses. I can see you have the ability to send pagination parameters (page and per_page) but couldn't see anything in your example responses (or when I tried using the API). Flickr do this well - http://www.flickr.com/services/api/fl...

Cheers,

Mark
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey Mark, good point about the paging - I totally forgot about that. Unfortunately, I think I'm going to have to change the root response object to support this. But it's worth doing. Glad you mentioned this sooner than later :)

I'll try to get this change out soon.
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Hi Rich,

That's definitely a good idea. It's better to cause a little bit of disruption while it's in beta, rather than try and hack it in later! Good work on responding so quickly!

Mark
Photo of Chris Messina

Chris Messina

  • 7 Posts
  • 0 Reply Likes
It seems like using JSON-P would really help standardize your API against a few known patterns:

http://google-styleguide.googlecode.c... (sorry for the XML, looking into why it looks like that!)

Any thoughts on why you're not using it?
Photo of Olivier Bon

Olivier Bon

  • 4 Posts
  • 0 Reply Likes
Hey Rich, I have just made a small plugin for expressionengine using your api http://olivierbon.com/projects/dreebbble. I was wondering, the api currently returns the main image url, is it ok to pull the "teaser" too or would you rather we stick with the main image for now and resize some other way?
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hi Olivier,

Very cool plugin, we're impressed. As for your question - I meant to include the url to the teaser image and just forgot it. I'll have it ready in the next 24 hours and will update this thread when it's available.
Photo of Olivier Bon

Olivier Bon

  • 4 Posts
  • 0 Reply Likes
Thank you! That's really kind of you!

Looking forward to the update.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Olivier, the teaser change has been pushed so the field 'image_teaser_url' is available for a shot now.
Photo of Olivier Bon

Olivier Bon

  • 4 Posts
  • 0 Reply Likes
That was quick! I have amended the plugin to reflect the change.

Thanks again
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Mark, FYI the changes mentioned above have been pushed.
Photo of Cedric Vandendriessche

Cedric Vandendriessche

  • 3 Posts
  • 1 Reply Like
I can't seem to find out how to send a request for a certain page. Like so for example http://api.dribbble.com/shots/everyone/2 to get page 2.

Is this possible through the url? I'm not using curl.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hi Cedric, you'd use:

http://api.dribbble.com/shots/everyon...

See the pagination section of the documentation.
Photo of Cedric Vandendriessche

Cedric Vandendriessche

  • 3 Posts
  • 1 Reply Like
Thank you very much. I had tried http://api.dribbble.com/shots/everyon... already ;)
Photo of Tristan Dunn

Tristan Dunn

  • 6 Posts
  • 0 Reply Likes
I'd really like JSONP. So much so that I already wrote a proxy on Heroku to allow it, with caching of course, but I'd prefer it was in the official version.

Getting a users followers and who they are following would also be really nice for the "social graph".
Photo of mediahackM

mediahack

  • 2 Posts
  • 0 Reply Likes
Please add JSONP support :) should be pretty simple and greatly appreciated. Big win :)
Photo of Dan BairDB

Dan Bair

  • 2 Posts
  • 0 Reply Likes
Am I crazy, or is http://api.dribbble.com/shots/everyon... and http://api.dribbble.com/shots/everyon... returning the same data set? When setting the page to 4, it still returns "page":1 in the response.
Photo of Olivier Bon

Olivier Bon

  • 4 Posts
  • 0 Reply Likes
You need to add a per_page param for it to paginate

should be like that /shots/everyone?per_page=5&page=2

Hope that helps
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Dan, I pushed fix for this, should be all set.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Dan, it's not you, it's me. I'm caching the json and forgot to consider the page in doing so. So you're getting a cached page 1 every time.

BTW, there's no need to send the per_page param if you're ok with the default page size.

Nice catch, I'll push a fix in the morning.
Photo of bunch.jesseB

bunch.jesse

  • 2 Posts
  • 0 Reply Likes
Rich,

What is the cache interval like? We're building a cool app that needs semi-real time results... Can JSONP be cached about 60 seconds or less?
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Are you asking me how long we're caching data on our servers? It varies by data type. We also have further work to do in this area, so things could change. If you can let me know specifically what you need, I will try to accommodate.

If you don't want to divulge specifics here, email us at our contact address.
Photo of bunch.jesseB

bunch.jesse

  • 2 Posts
  • 0 Reply Likes
Thanks for the quick reply. I am emailing you now.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey Chris, Tristan & mediahack,

Didn't realize there would be so much demand for jsonp. I'll go ahead and add support for it. Hope to have it available soon.

Tristan - dig the proxy (and the name :) Unfortunate that upgrading Dribbble will obviate it.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Just wanted to mention that I haven't forgotten about this, but it may be a little longer before I fix. I installed the rack-jsonp plugin to handle this, but it's non-vendor-able framework gem. So even though the change is easy, I'm uncertain on the right way to manage the change, i.e. reference a custom tweak of the gem, without getting into running my own gem server. I read this:

http://drnicwilliams.com/2009/11/04/h...

but I'm not super enthused about this approach. If you have input on how you handle this sort of thing, let me know. I will probably end up scrapping the gem and putting the code in the application since there's not a lot going on.
Photo of Tristan Dunn

Tristan Dunn

  • 6 Posts
  • 0 Reply Likes
Yeah, if it's going to be that big of a deal I wouldn't worry about it for now. And just in case you didn't know, Rails has support for this by default: render :json => {:name => "David"}.to_json, :callback => 'show'
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Thanks for the tip, Tristan, didn't know about the callback option. The rack-jsonp gem isn't providing enough value to warrant keeping it around. I've got a simple impl using callback ready to go, I'll push it in the morning.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
One more point of interest - the rails callback option does *not* change the content-type of the response. So the original problem of the wrong return type remains, even with the option. Was easy to override render to fix, however.
Photo of Tristan Dunn

Tristan Dunn

  • 6 Posts
  • 0 Reply Likes
Yeah, sorry I should have mentioned the Content-Type issue was still present. Great to hear it's fixed and going out soon though. Thanks for the fast responses on all of these requests.
Photo of Jeremy WeiskottenJW

Jeremy Weiskotten

  • 1 Post
  • 0 Reply Likes
Meet Swish, a Ruby wrapper for the Dribbble API: http://github.com/jeremyw/swish#readme

gem install swish
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Hi Rich,

It's looking good so far - I'm impressed with the rapid updates! I think the next step would be to introduce error messages. If I go to http://api.dribbble.com/players/ballp..., it throws an airball! However, it'd be better if it returned feedback in the same format as the rest of the API. This would allow developers to react appropriately in their applications. i.e. They'd know if it was their mistake (completely wrong URL), your mistake (the API's down), the player doesn't exist or they've exceeded their API limit.

Mark
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Whoops. Thanks, Mark. I'll fix this today.
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Brilliant, thanks Rich!
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Mark, we're now returning 404 and 500 errors as json. Still need to fix rate limiting errors (happens at a different tier).
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Brilliant, thanks Rich.

On a side note, I know it's cheeky, but is there any chance that giving API feedback can earn us invites? I've got a designer friend (that's good!) that would love an invite! He'd also be the guys helping me to test my AS3 Dribbble library.

Cheers,

Mark
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
Hi Rich,

Also, it would be cool to be able to retrieve lists of players (such as those in the all stars list), shots by tag and shots by colour.

I bet your TODO list is getting bigger by the minute! ;)

Mark
Photo of Robin Raszka

Robin Raszka

  • 1 Post
  • 0 Reply Likes
Agreed, this would be really awesome! 8)
Photo of Jesse Gardner

Jesse Gardner

  • 6 Posts
  • 0 Reply Likes
Sorry, didn't see this comment here so I'd already posted my request for shots by tag.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Don't have a timetable, but yes, we want to eventually expose most of the site functionality through the api.
Photo of Steve Losh

Steve Losh

  • 2 Posts
  • 0 Reply Likes
It would be nice to have a test version of the API for use with unit tests. Ideally this would have simple sample data that wouldn't change (i.e. I don't need to hope that simplebits doesn't delete more than 50 of his posts) and wouldn't be rate limited.
Photo of Marty Alchin

Marty Alchin

  • 5 Posts
  • 0 Reply Likes
I think what we'd really need for that is a properly versioned API. That way, major changes to the API would allow existing libraries to continue to work, just without taking advantage of new features. Then, you can grab the JSON output from version 1, include it in your tests, and know that even when version 2 comes out, your tests are still valid because your library only talks to version 1 of the API. When you update it to work with version 2, you'd update the JSON used for the tests as well.

How about it, Rich? Is versioning a possibility? To be clear, all I'd be asking for is to add "/v1" at the beginning of all the URLs, so it can be replaced with "v2" later. (e.g., http://api.dribbble.com/v1/shots/ever...)
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
I can see what you guys are after, and I agree, but I think you need to remember that this API is in its very early stages (hence beta). Once the API is out of it's beta stage it's pretty safe to assume that it wouldn't change without a warning period (similarly to the way other APIs work). In which case Rich is right, just mock up the response.

Whilst any API's in beta I think it's the developers lookout to keep up to date with the API, but after beta I think the developers have the right to be informed if a service is going to change its API.

Mark
Photo of Marty Alchin

Marty Alchin

  • 5 Posts
  • 0 Reply Likes
I'm absolutely following the API progress while it's in beta. But since this forum is for suggestions on how to help get the API out of beta, I think versioning is appropriate to bring up.

To be clear, I certainly wouldn't want v1 today, v2 in a couple days, v3 the day after that, v4 in another week, etc. This entire beta period can be v1, and then v2 can have its own beta period when the time comes to add or change features.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey guys, good conversation. To weigh in ... versioning is a NIGHTMARE. You do it if you absolutely have to, i.e. can't introduce something new without breaking something old, but it is an enormous pain in the ass to maintain multiple versions. (As an aside, I saw a panel at RailsConf on APIs including guys from Twitter and GitHub and the issue of versioning came up; there were no good ideas put forth, everyone said to avoid it at all costs if you can.)

Having said that, I don't think there's much to worry about unless/until there are changes to Dribbble that break assumptions made prior. I don't think we're anywhere near that point right now. We'll put stuff out there, let it stabilize, pronounce it final. Rinse and repeat. Once something is final, I think changes will be rare indeed. (We're gonna break a lot of stuff if we change at that point.)

Steve - I realize the tests will break if the API changes. But I think API changes are best managed through good communication. I will do everything I can to make sure API changes are well documented and publicized @dribbbleapi so you should know about them long before you run the tests. Unit tests IMO are for verifying that the library works as intended; I don't see the need to introduce round trips over HTTP to do that. Likewise, I would expect unit tests for the library to pass even if (dare I say it) the site were down; the library still works. Though an optional flag to run the tests so they really hit the server might be a nice way to do integration tests for added confidence and during periods (like now) where new features are introduced.
Photo of Marty Alchin

Marty Alchin

  • 5 Posts
  • 0 Reply Likes
I can understand the idea that versioning may be more complicated than necessary for Dribbble, but it's very disappointing to hear that there's such a negative attitude toward it in general. Thankfully, I can't imagine anyone using Dribbble to power anything mission-critical, so any breaks that may occur won't cause any serious problems anyway. I'd certainly much rather see your time spent on features useful to the userbase at large than on dealing with potential versioning issues.
Photo of Martin Bean

Martin Bean

  • 4 Posts
  • 0 Reply Likes
Following on Jeremy Weiskotten's work, I've created a PHP wrapper for the Dribbble API, which I've been tweeting about today.

Check it out at http://bit.ly/dribbbleapi.
Photo of Mark StarlingMS

Mark Starling

  • 14 Posts
  • 2 Reply Likes
I've created an AS3 library for Dribbble, which is now available on GitHub - http://github.com/markstar/StarDribbb....
Photo of Dan BairDB

Dan Bair

  • 2 Posts
  • 0 Reply Likes
Hey Rich,

I was working on a quick mash-up (http://alleyoop.bairlabs.com/?color=b...) and noticed that the results seem to "cap-off" on page 50, that is any page beyond 50 will return the same result set in the response.

Examples:
http://api.dribbble.com/shots/everyon...
http://api.dribbble.com/shots/everyon...

Cheers,
Dan
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey Dan,

This is intentional. We cap the global lists at 50 pages. I should probably publish that in the API docs, however, but hadn't settled on a limit when I wrote them.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Dan, I just checked out your alleyoop site. Awesome stuff. We actually considered doing something like that a while ago but never got around to it.

My thought on capping the result set was that someone grabbing more than 50 pages was simply scraping our site and up to no good. But you scraped our site and I quite like the result. I'm more open to the potential of making all our content easily navigable. Let me sleep on this, but I can see the power of allowing folks to grab ALL the data.
Photo of Chris Messina

Chris Messina

  • 7 Posts
  • 0 Reply Likes
This would be a great reason to adopt OAuth (2.0) so you can provide privileged access to registered developers.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Chris, we do plan to adopt OAuth 2 to eventually allow folks to post new shots via the API.
Photo of Marty Alchin

Marty Alchin

  • 5 Posts
  • 0 Reply Likes
The API's looking really good, but I ran into one speed bump. For some reason, the "name" at the following URL is coming through as null even though it's clearly there in the database if you look at the non-API page for the player.

http://api.dribbble.com/players/2407

Any idea what's going on?
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey Marty,

Name is currently not a required field. On the website, we display username instead of name when name is null, but it can be null and is returned as such in the api. I'm actually considering making it required - I kinda like the emphasis on real names we have at Dribbble - but as of now, it may be null.
Photo of Marty Alchin

Marty Alchin

  • 5 Posts
  • 0 Reply Likes
That makes sense. I've updated my library to allow for that, and I should be able to release it later today once I finish the tests and documentation.
Photo of Milan Cermak

Milan Cermak

  • 1 Post
  • 0 Reply Likes
Could you add a "date added" field to each post? Handy when building a timeline of dribbbles.
Photo of Chris Messina

Chris Messina

  • 7 Posts
  • 0 Reply Likes
I'd love to see Dribbble support http://activitystrea.ms JSON, since we designed it to address issues and needs like this!
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Will do. Should have had this in the first pass.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Hey folks, just wanted to mention that

- JSONP support has been added

- There is now a @dribbbleapi account on Twitter for API changes and announcements. http://twitter.com/dribbbleapi
Photo of jsullivan.iphoneJ

jsullivan.iphone

  • 2 Posts
  • 0 Reply Likes
Where are the number of likes and comments?
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
Don't have these yet, but we'll be building out attributes like these as we go forward.
Photo of jsullivan.iphoneJ

jsullivan.iphone

  • 2 Posts
  • 0 Reply Likes
Awesome. I Have a great idea.
Photo of Ryan Parr

Ryan Parr

  • 1 Post
  • 0 Reply Likes
Looking forward to likes and rebounds as well.
Photo of Pierre A

Pierre A

  • 1 Post
  • 0 Reply Likes
Hi ! Is there a way to make http_auth with this API? To allow members to comment creations.
Photo of Rich Thornett

Rich Thornett, Official Rep

  • 338 Posts
  • 44 Reply Likes
We plan to use OAuth2 toward this end. Don't have a timetable on this yet.
Photo of jason lynesJL

jason lynes

  • 2 Posts
  • 0 Reply Likes
awesome, can't wait!
Photo of jason lynesJL

jason lynes

  • 2 Posts
  • 0 Reply Likes
awesome, can't wait!
Photo of seancribbsS

seancribbs

  • 2 Posts
  • 0 Reply Likes
OAuth2 would be awesome, being able to link other services to Dribbble would be very useful.
Photo of seancribbsS

seancribbs

  • 2 Posts
  • 0 Reply Likes
OAuth2 would be awesome, being able to link other services to Dribbble would be very useful.