Lurk all you'd like, but why not register and post some pics? Registering also makes it easier to find the good stuff. Need help?

Go Back   Digital Grin Photography Forum > Support > SmugMug APIs, Hacks & Tricks
Dgrinner
Password
Register FAQ Shooters Calendar Reviews Tutorials Gallery Books Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct-03-2007, 11:09 PM   #1
rkalla
DOH!
 
rkalla's Avatar
 
Join Date: Aug 2007
Posts: 108
Announcing: SmugMug Java API

Update #1: [12-13-07] Beta 2 Released!

Update #2: [03-08-08] Beta 3 Released!

Update #3: [03-08-08] Beta 4 Released!

I'd like to announce the Beta 1 release of the kallasoft SmugMug Java API

For the quick-clickers in the group, here are the links:
[Download] [Javadoc] [Manual] [Announcement] [Homepage]


For the folks still reading, this Beta 1 release represents full coverage of the SmugMug JSON API v1.2.0 as well as some of the binary-only communication methods (HTTP Put supported now, will add support for replacing an image soon).

The simple examples page may give you a better idea of how to use the API out of the gate (I will be adding more examples and demo applications soon). Also for the folks that want to know exactly what is going on behind the scenes, the Manual includes complete coverage of Request/Reply pairs for each API version that is supported (v1.2.0 here).

The purpose of the API is to make developing Java applications against the SmugMug service a walk in the park. The goal is to allow you to focus on your application and not worry about things like JSON object parsing, HTTP requests, headers, response streams and all those details.

The API is developed and released under the Apache License v2.0. The goal was to allow the broadest audience to make use of the API with the only requirement of the license being proper credits given back to the project (hopefully not a show-stopper for anyone). Take the code, examine it, use it and make some cool apps!

Any bugs you find, feedback or just general comments are welcome and encouraged either here in this announcement or in the API's official forums. I'll try and do a good job of consolidating feedback if things get too split up.

I'd also like to know the folks out there developing applications with the API. If you wouldn't mind stopping by and dropping a note in the "List Your Applications!" forum, that would be much appreciated. For the folks that are developing an app but don't have a web prescence for it yet, you could post a screenshot or some details about your app, I'm sure a lot of folks would be interested.

I hope this proves to be valuable for the community now and as it continues to grow to include the awesome work David and the Smug team is doing on the 1.2.1 API (which looks really big )
__________________
Riyad Kalla
kallasoft | The "Break It Down" Blog

Last edited by rkalla : Mar-24-2008 at 04:01 PM.
rkalla is offline   Reply With Quote
Old Oct-04-2007, 12:36 PM   #2
onethumb
SmugMug CEO & Chief Geek
 
onethumb's Avatar
 
Join Date: Dec 2003
Posts: 1,194
Wow, this is so cool! Thanks!!

I'll find a spot to link it on the Wiki, announce it on the API list, and our blog.

Thanks again!
onethumb is offline   Reply With Quote
Old Oct-04-2007, 12:43 PM   #3
rkalla
DOH!
 
rkalla's Avatar
 
Join Date: Aug 2007
Posts: 108
Quote:
Originally Posted by onethumb
Wow, this is so cool! Thanks!!

I'll find a spot to link it on the Wiki, announce it on the API list, and our blog.

Thanks again!

Wow, thank you! The support is much appreciated!
__________________
Riyad Kalla
kallasoft | The "Break It Down" Blog
rkalla is offline   Reply With Quote
Old Oct-11-2007, 02:34 PM   #4
flyingdutchie
Happy Snapper
 
flyingdutchie's Avatar
 
Join Date: Oct 2004
Posts: 1,268
This is a nice library you wrote!

I would suggest you build another library on top of this. Your current library is rather method/action focused, not so much object focused.

I would like to be able to code something like these snippets below:

Code:
Map<Album> albums = Albums.retrieveAll(true); // calls (albums.get)

Code:
Album album = albums.get(albumID); // if not loaded calls (albums.getInfo) album.setName(textField1.getText()); album.setDescription(textField2.getText()); ... ... album.update(); // calls (albums.changeSettings).

Code:
Album album = albums.get(albumID); Map<Image> images = album.getImages(); // calls (images.get)

Code:
Album album; album = ....; ... Image image = album.getImage(imageID); // if needed calls (images.getInfo) and caches image into album. image.setComment("some comment"); image.setKeywords(new String[] {"keyword1","keyword2"}); image.setPosition(5); image.update(); // calls (images.changeSettings; images.changePosition).

If you want, I could help you out with this. Let me know.

-- Anton Spaans.
__________________
I can't grasp the notion of time.

When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
    "Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
flyingdutchie is offline   Reply With Quote
Old Oct-11-2007, 02:55 PM   #5
rkalla
DOH!
 
rkalla's Avatar
 
Join Date: Aug 2007
Posts: 108
Anton,
That's a pretty damn cool idea.

You are right the current API is a 1:1 match against the existing Smug JSON API.

I'm finished 1.2.0 right now (documentation and convenience methods, along with a ton of optimizations, running changelog here: http://kallasoft.com/smugmug-java-api/changelog/) and starting on 1.2.1, so I don't have time to write an abstraction farther up the stack like you suggest but it would be a really nice thing to have.

Before you got started on an additional layer to the API, I'd almost suggest you implement some basic logic first using the API that is there and see what it ends up looking like.

If you see room for improvement of say 50% or more, I'd say another API to reduce the complexity would be greate... but if you notice that it wouldn't save *that* much effort, compared to the time and cost of implementing and maintaining/extending an additional API, maybe you and I could discuss additions at the core level to come to a middle ground of usability?

I am trying hard to keep a very close match to the Smug JSON API, but for the sake of convenience, I certainly wouldn't object to adding an additional *.support package that provided simplified access and use of the API if the use-cases definately justified it.
__________________
Riyad Kalla
kallasoft | The "Break It Down" Blog
rkalla is offline   Reply With Quote
Old Oct-11-2007, 03:02 PM   #6
flyingdutchie
Happy Snapper
 
flyingdutchie's Avatar
 
Join Date: Oct 2004
Posts: 1,268
Thanks for your quick reply.

I'm going to try something out soon and see if it would save time. I would guess so ; hiding implementation details, abstracting it more into 'what' can be done instead of 'how' it is done, usually saves time for the user (programmer in this case).

I'll keep you updated.

BTW: i probably need an API key to test things out. Since i don't have an application yet, is it hard to get an API key from Smugmug?
__________________
I can't grasp the notion of time.

When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
    "Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
flyingdutchie is offline   Reply With Quote
Old Oct-11-2007, 03:05 PM   #7
devbobo
Err 99
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,062
nice work Riyad, it was great chatting to you the other day
__________________
David Parry
My Photos | SmugBrowser
devbobo is online now   Reply With Quote
Old Oct-11-2007, 03:14 PM   #8
rkalla
DOH!
 
rkalla's Avatar
 
Join Date: Aug 2007
Posts: 108
Quote:
Originally Posted by flyingdutchie
Thanks for your quick reply.

I'm going to try something out soon and see if it would save time. I would guess so ; hiding implementation details, abstracting it more into 'what' can be done instead of 'how' it is done, usually saves time for the user (programmer in this case).

I'll keep you updated.

BTW: i probably need an API key to test things out. Since i don't have an application yet, is it hard to get an API key from Smugmug?

Anton, it's super easy. If you login to your Smug account, go to Control Panel, and under Setting you should be able to request an API Key (or it will list the one you've requested)

Then it's automatically given to you and registered. It's just a way Smug can use to track software using their API system (e.g. 11k requests from a spam bot requesting images or something)
__________________
Riyad Kalla
kallasoft | The "Break It Down" Blog
rkalla is offline   Reply With Quote
Old Oct-11-2007, 03:16 PM   #9
rkalla
DOH!
 
rkalla's Avatar
 
Join Date: Aug 2007
Posts: 108
Quote:
Originally Posted by devbobo
nice work Riyad, it was great chatting to you the other day

Ditto, it was great to put a voice with a name... unfortunately for me you have a much cooler accent than I do
__________________
Riyad Kalla
kallasoft | The "Break It Down" Blog
rkalla is offline   Reply With Quote
Old Oct-11-2007, 03:17 PM   #10
flyingdutchie
Happy Snapper
 
flyingdutchie's Avatar
 
Join Date: Oct 2004
Posts: 1,268
Quote:
Originally Posted by rkalla
Anton, it's super easy. If you login to your Smug account, go to Control Panel, and under Setting you should be able to request an API Key (or it will list the one you've requested)

Then it's automatically given to you and registered. It's just a way Smug can use to track software using their API system (e.g. 11k requests from a spam bot requesting images or something)

Aha! I can use the key i got that is used for SmugMaps (mashup with google)...

Thanks!
__________________
I can't grasp the notion of time.

When I hear the earth will melt into the sun,
in two billion years,
all I can think is:
    "Will that be on a Monday?"
==========================
http://www.streetsofboston.com
http://blog.antonspaans.com
flyingdutchie is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Dgrin Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Times are GMT -8.   It's 02:58 PM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.