|
|
Thread Tools | Display Modes |
|
#1
|
|
|
SmugMug CEO & Chief Geek
|
new API release - 12/03/04
Well, the short story is that there are all sorts of goodies for you all to play with. Let's get down to it:
Changes: - The upload method and the Upload via POST w/XML-RPC response both have some new fields and functionality: o "ByteCount" is optional, but strongly encouraged. Send along the # of bytes the file is, so we can see if we really received the whole thing. o "MD5Sum" is optional, but strongly encouraged. Send along the md5sum hash of the file you're uploading, so we can see if we got all the bytes properly. o "Version" is optional, but strongly encouraged. If it's properly set, you'll received the ImageID of the newly uploaded image upon success. - loginAnonymously now works as advertised. This means non-logged in smugmug users can now browse smugmug using your apps. No login required, but of course, various features and information will be locked. - createAlbum is fixed. It actually worked properly all along, but the documentation was all broken. It's been updated to be correct now, and more fields are exposed. New stuff: - You should be able to retrieve almost all useful information about images, image EXIF data, albums, etc. Creating a bulk downloader, backup tool, whatever should be insanely easy now. - The early stages of modifying data and settings on smugmug is exposed now too. You can set various album details, image details, and do things like organizing, sorting, and moving images between galleries. Everything has received minimal testing, at best, so beware the bugs. Post them on this thread, and I'll fight them as they crop up. In particular, I've tried to maintain 100% backwards compatibility, but it's possible something broke. Please keep feature *requests* to another thread (or threads), and keep this one for comments, bugs, etc about this specific release. Thanks, Don |
|
|
|
|
#2
|
|
|
Darth SLR
|
Awesome!
Now I have to redo everything...
Just kidding! Thank you very much! Cheers!
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#3
|
|
|
Darth SLR
|
Tiny description bug
http://www.smugmug.com/hack/xmlrpc-changeImagePosition
On the page, the name of the method says "changeImageSettings" ..
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#4
|
||
|
SmugMug CEO & Chief Geek
|
Quote:
Don |
|
|
|
||
|
#5
|
|
|
Darth SLR
|
It works!!!
Thank you, thank you, thank you!And it also works with subcategories! <HR> One question, though: it takes int CommunityID parameter, but there is no current API to get those valid community IDs and names. It's absolutely no biggie, but I would appreciate the plans sharing: is it gonna be availavle any time soon? I kinda don't feel like putting "Community Index" spin edit on the album settings dialog, I'd rather prefer combobox, just like you provide online. So if it's not gonna be availalble, I'd simply hide the whole community thing.. (As a side note - I still don't know what it does , so for me personally it's nothing;-)Cheers!
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#6
|
|
|
Cave canem!
|
Small documentation bug
The new API documentation documents neither the type of "version" nore its meaning for the upload function. I found this confusing. In fact, I think it's "boolean" and it controls whether an image ID is returned. The documentation should reflect this.
I had some totally different and more esoteric thing in mind, so it really is possible to misconstrue. Other than that, this is very exciting. I'm about to make smumug.py conform and add new functionality. Yeah! |
|
|
|
|
#7
|
||
|
Darth SLR
|
Unless I misread it..
Quote:
hopefully somebody from the pitcrew kicks in, but in any case I'll most likely try it tomorrow and will share the results here. Cheers! P.S. Back to the workbench, eh;-)? Me, too..
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
||
|
#8
|
|
|
Cave canem!
|
|
|
|
|
|
#9
|
||
|
Cave canem!
|
Quote:
I imagined that the version given to login would control the API for the entire session. That way, if I log in with version 1.0, I won't get the image Id for upload and won't have to pass a version to it. I think this way of doing things enables easy hacking on Don's part and enables the clients to stay frozen and keep working. The way things are, perhaps the version flag will slowly creep into all the functions. I suppose this is OK, but since it is neceassarily an optional argument (for backward compatibility) it prevents new required arguments from being added. I think this will become a problem pretty quickly if there are a lot of changes. I know that Don thinks there won't be, but... So before we all start hacking to the new version, I'd strongly suggest that Don rethink this. |
|
|
|
||
|
#10
|
|
|
Darth SLR
|
Or the API is missing the categories names?
I'm still looking for a way to populate the "tree" quickly and efficiently, and this new guy definitely helps (I hope it returns even albums-less entries, haven't checked yet). But - come on, why do I stil need TWO roundtrips:
Is it possible to add Category's name to the returning struct? That would be totally sweet! (However, I still would like to have a modified version of getAlbums with the suggested optional FullList parameter, as well as optional "filtering" category and subcategory IDs..) Don, can we adress this issue? Please??
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#11
|
|
|
Darth SLR
|
I agree, it's a bit confusing..
And I defineitely agree that version sould be only mentioned during sign-up process. I think this was just a "kwik hack" on Don's part and it will be revamped as soon as he gets a bit more time to work on such fixes.
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#12
|
||
|
Cave canem!
|
Quote:
I thought about this and concluded that I should just cache categories and subcategories if I wanted to make this fast. After all what happens? The user specifies a category/subcategory. Either we already know the ids of both or not. Is so, fine. If not, then we can make the API calls to find them, then we should just save the info for future lookups. We don't have the API functions yet to crate categories and subcategories, so for now these have to be created by the user interacting with smugmug somehow. Fine, in the rare case when we have a cache and still don't understand the user's category or subcategory name, we can make the API calls and refresh the cache. Later on, we'll get the API calls to create the categories and subcategories. When that happens, we can add them to the cache when we create them. Make sense? |
|
|
|
||
|
#13
|
||
|
SmugMug CEO & Chief Geek
|
Quote:
My architecture style for the API is much more inclined to a few small calls rather than big monolith calls that grows over time or has some unintended impact. I don't think asking you to make two calls to get the entire "tree" is all that inappropriate, and it makes our life easier on the backend anyway (multiple calls = spread across our cluster. single call = one server is stuck doing it). So, sorry, but you're stuck doing both. :) Don |
|
|
|
||
|
#14
|
||
|
SmugMug CEO & Chief Geek
|
Quote:
Version for the login details will, of course, get tied to the session for all future updates of all non-upload methods. I will probably make a cascade fallback for the upload method(s) at some point, but for now, please send it along with that call to enable the new features. The current version is "1.0". Let's stick with a String, because I want the ability to go "1.0.1". For now, use "1.0" if you'd like all the nifty new features. Don |
|
|
|
||
|
#15
|
||
|
Darth SLR
|
Quote:
Also, I was plainning to cache data locally (rutt, I'm with you here, buddy, just don't have it yet, but I will purrrty soon:-), so in the end it should not be such big of a difference. Thank you for the clarification! Cheers!
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
||
|
#16
|
|
|
Darth SLR
|
What am I doing wrong?
I'm trying to use new upload API, and each time get a format error, code 4 for upload via post, and code 6 for base64 upload.
If I remove both ByteCount and MD5ASum, upload via post works just fine even though I provide Version '1.0' string. Here's an exmaple of a regular base64 upload xml I'm using (multipart upload is harder to log): PHP Code:
TIA!
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time Last edited by Nikolai; Dec-04-2004 at 08:48 PM. |
|
|
|
|
#17
|
|
|
Cave canem!
|
smugmug.py worked this am passing a bytecount via the POST method. I don't pass the version parameter nor check the result for the image id, but this didn't seem to matter. The image appeared if and only if the whole image arrived.
So maybe you should take a look at it. There isn't much to it. |
|
|
|
|
#18
|
||
|
Darth SLR
|
Hmm, interesting..
Quote:
It also works without the byte count. Adding the rest seem to screw things up. Here's working xml with bytecount: PHP Code:
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
||
|
#19
|
|
|
Darth SLR
|
Rutt, if you don't mind...
..my asking, what other new/extended methods did you already try?
So far I spent most of my time encapsulating new settings for the new createAlbum, and this guys seem to work fine now, all by the book I'm in the process of trying of getAllSubCategories, but haven't completed any tests yet. Thanks!
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
|
#20
|
|
|
Darth SLR
|
This old guy, getCategories, works fine:
PHP Code:
PHP Code:
Don, any clues?
__________________
"May the f/stop be with you!" Star*Explorer: on Dgrin, home; Master Class: open; Class is in session, My Facebook, @DarthSLR, #NiksTips member: NAPP, PPA, partner: Adobe Comprehending life, universe and everything - one pixel at a time |
|
|
|
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|