new API release - 12/15/04
onethumb
Administrators Posts: 1,269 Major grins
This one is minor, please refer to this thread for the last major revision.
The album methods have been updated slightly to support the two new fields, SortMethod and SortDirection, used by galleries to determine the order of photos displayed.
You can find the info in the documentation and more information about the features themselves in this thread .
This will be the last change of 2004. Expect more early next year.
Enjoy!
Don
The album methods have been updated slightly to support the two new fields, SortMethod and SortDirection, used by galleries to determine the order of photos displayed.
You can find the info in the documentation and more information about the features themselves in this thread .
This will be the last change of 2004. Expect more early next year.
Enjoy!
Don
0
Comments
I guess I asked too early:-)
Thanks for the update!
Cheers!
Don,
do I understand it correctly that reSortAlbum API is gonna be retired pretty soon and shall not be used, now that we have more extensive version of it in createAlbum/changeAlbumSettings?
Thanks!
Added the two new album parameters to my framework and tried createAlbum - to no avail..
Here's a sample request:
[PHP]0:00:46: Post to http://upload.smugmug.com/xmlrpc/
<?xml version="1.0"?>
<methodCall>
<methodName>createAlbum</methodName>
<params>
<param><value>c8e8aee10f434bd296cabf72232ad1d1</value></param>
<param><value>NWO3</value></param>
<param><value><int>0</int></value></param>
<struct>
<member>
<name>SubCategoryID</name>
<value><int>48284</int></value>
</member>
<member>
<name>Description</name>
<value>should be by file name/ descending</value>
</member>
<member>
<name>SortMethod</name>
<value>FileName</value>
</member>
<member>
<name>SortDirection</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Public</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Filenames</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>Comments</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>External</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>EXIF</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Share</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Printable</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Originals</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>Header</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Larges</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>Clean</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>Protected</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>Watermark</name>
<value><boolean>0</boolean></value>
</member>
</struct>
</params>
</methodCall>[/PHP]
The key part:
[PHP] ...
<member>
<name>SortMethod</name>
<value>FileName</value>
</member>
<member>
<name>SortDirection</name>
<value><boolean>1</boolean></value>
</member>
...
[/PHP]
I tried several times: each time new album is created with Position/Ascending, while I requested FileName/Descending..
What am I doing wrong? Name again?
Thanks
I tried to update these two new properties manually.
SortMethod seems to work, but SortDirection keeps "Ascending" value regadless of my input.
I looked into html source - seems like all my names are identical to those used in the form. So I still have no clue why my test didn't produce desired results.
Don?
Can i just log on to SM...open my folder & just upload as i have always done or is this some new system that i will have to learn ?
If you don't do anything, everything would be as it was..
HTH
any comments on the new API not working? Or is it me again?
- loginAnonymous - allows to log in, but does not allow to perform any actions, including logout
- createAlbum - SortMethod and SortDirection parameters are ignored. Moreover, SortDirection ignored even when working via smugmug's own UI
Don, can we have those fixed for Christmas;-)?Thanks!
Don, thank you!
First of all - Merry Christmas!
Bugs:
- createAlbum.Title
- createAlbum.Description
- Upload Via Post.Caption
For the "official" smugmug UI createAlbum's issues do not exist as far as it's using multipart form, However, at API level we don't have this luxury..:-(Errors out if values contains any of: &, <
tried to replace them with & a m p ; and & l t ; , but to no avail
Errors out if values contains any of: &, <, ' (like in it's)
converts ' and " to \' and \"
I can't understand the image caption issue, though. AFAIK both API and web code presumably use the same method.
Don, am I doing somthing wrong (or not doing somthing required) here?
Annoyances:
Neither from UI, nor from API one can
- delete an empty gallery
- delete several galleries at once
I understand that this is probably not a major concern for a normal user, but I had a rough time lately trying to clean up my "Other" category after all my SE tests...Would be nice to have the bugs fixed some time soon... I was trying to create an XMas album with the words "it's" (as in "It's Christmas":-) in the description... You can imagine my frustration when I realized I can't do it..
...can somebody from smugmug give me an ETA on those? Or tell me I'm plain wrong and it works for everybody else..
Thanks!
Just a very friendly reminder .. :-)
Thanks!
Are you guys back? How about them API bugs?
Cheers!
I haven't had a chance to take a look at this, but again, I think this is your bug, not mine. We can enter those characters fine in HTML forms and submit them, so there's no reason your app can't do the same.
I assume you're correctly formatting, in XML, the & and < and whatnot? XML is picky about special chars. Check the docs. If Delphi has XML support, I'm sure it has a function to properly encode strings for use in XML. Just dump them through that function and you should be fine. If not, you might need to whip up a translator function, but it shouldn't be tough.
The quotes thing is a little more suspicious, that might very well be my bug.
Don
With all due respect...
You said it yourself: you're entering all those titles and descriptions in a FORM - which mostl likely does not use your own API and does not use RPC-XML at all...
If you noticed, I didn't complain about & and < for upload via post (that one only has ' and " problem), But createAlbum method does not use form-multipart, it's just straight RPC-XML.
And yes, I tried to encode those characters as & a m p ; and & l t ; - only to get the same error.
If you're telling me I should use different encoding - please let me know which one. I do have various encoding options, but which one to use?
--
Glad you're back:-) I already started to think you put me into your ignore list;-):D
Cheers!
Don,
first of all I'd like to apologize : & and < was my fault, forgot to add ';' at the end. Shame on me..:cry
However, I still have a problem with an apostophe (' aka & # 39 ; aka ') in createAlbum.Description field. Any of the above methods works in createAlbum.Title, but none of them works in Description - screate error. Quotes (" aka & q u o t ;) work just fine in both.
And I'm using the same piece of code for all my rpcxml encoding, so I wonder if you could possibly look at that apostophe issue on your side?
Also - still an issue with \' and \" in image captions. Did you have a chance to look at it?
Thanks!
Just tried to create a very weird album with an image with a very weird name.
Album.Title/Image.Caption: ?/,.<>;:"[]{}~`!@#$%^&*()_+-='
Album.Description: ?/,.<>;:"[]{}~`!@#$%^&*()_+-=
(i.e. w/o apostophe)
- Image created
- Image caption does not show at all
- I cannot edit this caption or multiple captions from smugmug UI
- If style is set to all thumbs - thumb is not shown at all
Don, maybe this test case would help to locate the problem?Thanks!