Yes, we'll see. I think the argument in this case is sounder than the argument for a monolithic getCategories/subcategories call. And there is an obvious "embarrassingly parallel" implementation so Don can do his own load balancing in these cases, perhaps even more intelligently than the routers would. With the getCategories thing, all the work had to result in a single list so syncronization would be required. In this case the sorts (probably the most expensive possible thing one could do with this) are all independent (or at least should be) and so can be deligated. There is no reason for either of these calls even to wait for completion, although even that would be a relatively small amount of syncronization.
Those operations are definitely "embarrassingly parallel", but the other component that makes it worth my while is "frequency of use". Since I don't anticipate calls like these would be used all that frequently, I probably won't (at this time) invest the effort to make them load-balance themselves on our backend. I'd just let you submit and send a reply when complete.
Having said that, it makes sense to have these be options, so I'll see what I can do. And if I'm wrong about the frequency, I can always parallelize them on our backend at a later date with no API change. I like that.
I finally got home and got my hands into the programm. Well, getAllSubCategories now returns somthing, but result is unusable.
Instead of providing Category ID, Subcategory ID and Subcategory Title, it uses subcategory id twice, thus making each id equal and the whole thing totally useless :-(
Here is a log excerpt:
First goes call for all caetgories:
the rest is skipped. OK, Other does have id=0.
Now, the new method. I have a Test subcategory within Other:
[PHP]
<?xml version="1.0"?>
<methodCall>
<methodName>getAllSubCategories</methodName>
<params>
<param><value>3ff8d655e92b68728fe54e8408228861</value></param>
</params>
</methodCall>
.......
12/7/2004 7:24:31 PM: Post results
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>CategoryID</name>
<value>
<int>48284</int>
</value>
</member>
<member>
<name>SubCategoryID</name>
<value>
<int>48284</int>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>test</string>
</value>
</member>
</struct>
</value>
...............
[/PHP]
Parsing this shows this line:
12/7/2004 7:24:31 PM: Finished Getting all sub categories for PhotoSoCal (0:00:01)
12/7/2004 7:24:31 PM: CategoryID=48284, SubCategoryID=48284, Title=test
....
Starting a "onethumbup" list..
In this branch I'm gonna post separate messages for each API I personally verified. Everybody is welcome to follow, so we can share the load:-).
I finally got home and got my hands into the programm. Well, getAllSubCategories now returns somthing, but result is unusable.
Instead of providing Category ID, Subcategory ID and Subcategory Title, it uses subcategory id twice, thus making each id equal and the whole thing totally useless :-(
...skipped..
Don, it seems like an easy fix.. If you please?
- 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.
I tested this tonite. I can login anonymousle, get the session ID - and then cannot do anything. Any method I tried returns "invalid user" error.
Methods I tried:
getAlbums
getCategories
Logout
I can understand the first two, but Logout ...
I have logs to prove my point, in case you need them...
Absolutely not a rush, but eventually would be nice to have this fixed..;-)
Sorry to be such an a$$..
.. but I REALLY need getAllSubCategories to work...
Again, it simply uses the wrong id, looks like a typical copy-paste error..
I just tested it again - same thing...
Please?
.. but I REALLY need getAllSubCategories to work...
Again, it simply uses the wrong id, looks like a typical copy-paste error..
I just tested it again - same thing...
Please?
How am I supposed to create a multiline description?
If I try to enter more than one line, it returns a fornat error. I understand the reason (chars #13, #10 in the Description), but have no clue how to encode that properly. For now I'm gonnal just make it all one line, but eventually I' d like to see this resolved.
Don? maybe use base64? or some &.. stuff?
TIA
If I try to enter more than one line, it returns a fornat error. I understand the reason (chars #13, #10 in the Description), but have no clue how to encode that properly. For now I'm gonnal just make it all one line, but eventually I' d like to see this resolved.
Don? maybe use base64? or some &.. stuff?
TIA
As long as you're sending properly form-encoded data, it should be fine. You can, for example, add multiline descriptions/captions in the HTML interface, which is an incredibly basic form POST.
As long as you're sending properly form-encoded data, it should be fine. You can, for example, add multiline descriptions/captions in the HTML interface, which is an incredibly basic form POST.
Don
Thank you! I guess, my components do not take proper care of the stuff, even though I use proper ''multipart/form-data'' content type. But now I know where to look:-). I though I should use some kind of URI/URL/MIME/etc encoding...
I'll figure it out now..
Strange, it works now - from work, that is...
At least for the albums.. Maybe it's different on different machines. Need to check it from home tonite..
Correction: not entirely works
It lets me in, returns a session, but aftewards I don't seem to be able to do much. Here is an example of attempt to getAlbums (it should return list of public albums, right?):
Comments
Those operations are definitely "embarrassingly parallel", but the other component that makes it worth my while is "frequency of use". Since I don't anticipate calls like these would be used all that frequently, I probably won't (at this time) invest the effort to make them load-balance themselves on our backend. I'd just let you submit and send a reply when complete.
Having said that, it makes sense to have these be options, so I'll see what I can do. And if I'm wrong about the frequency, I can always parallelize them on our backend at a later date with no API change. I like that.
Don
Just tested:
- getAllSubCategories work!
- upload via POST still does not...
Thank you for the categories fix!Cheers!
I finally got home and got my hands into the programm. Well, getAllSubCategories now returns somthing, but result is unusable.
Instead of providing Category ID, Subcategory ID and Subcategory Title, it uses subcategory id twice, thus making each id equal and the whole thing totally useless :-(
Here is a log excerpt:
First goes call for all caetgories:
[PHP]
<?xml version="1.0"?>
<methodCall>
<methodName>getCategories</methodName>
<params>
<param><value>3ff8d655e92b68728fe54e8408228861</value></param>
</params>
</methodCall>
.......................................
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>CategoryID</name>
<value>
<int>0</int>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>Other</string>
</value>
</member>
</struct>
</value>
[/PHP]
the rest is skipped. OK, Other does have id=0.
Now, the new method. I have a Test subcategory within Other:
[PHP]
<?xml version="1.0"?>
<methodCall>
<methodName>getAllSubCategories</methodName>
<params>
<param><value>3ff8d655e92b68728fe54e8408228861</value></param>
</params>
</methodCall>
.......
12/7/2004 7:24:31 PM: Post results
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>CategoryID</name>
<value>
<int>48284</int>
</value>
</member>
<member>
<name>SubCategoryID</name>
<value>
<int>48284</int>
</value>
</member>
<member>
<name>Title</name>
<value>
<string>test</string>
</value>
</member>
</struct>
</value>
...............
[/PHP]
Parsing this shows this line:
So, instead of 0 we have first item 28284.
Don, it seems like an easy fix.. If you please?
Thanks!
The red line should read:
So, instead of 0 we have first item 48284.
In this branch I'm gonna post separate messages for each API I personally verified. Everybody is welcome to follow, so we can share the load:-).
works
works
works
works (Duh!:-)
works
works
works
works
works - both with extra info (version '1.0') and without it (versionless)
Hmm, well, I just uploaded a bunch of photos fine with both ByteCount and MD5Sum.
Can you send me your POST output or something? I think you must be doing something wrong.
Don
Confirmed
Thanks!
I tested this tonite. I can login anonymousle, get the session ID - and then cannot do anything. Any method I tried returns "invalid user" error.
Methods I tried:
- getAlbums
- getCategories
- Logout
I can understand the first two, but Logout ...I have logs to prove my point, in case you need them...
Absolutely not a rush, but eventually would be nice to have this fixed..;-)
TIA
.. but I REALLY need getAllSubCategories to work...
Again, it simply uses the wrong id, looks like a typical copy-paste error..
I just tested it again - same thing...
Please?
Try it now.
Don
I works!!!
Thank you very much!
Cheers!
Works!
If I try to enter more than one line, it returns a fornat error. I understand the reason (chars #13, #10 in the Description), but have no clue how to encode that properly. For now I'm gonnal just make it all one line, but eventually I' d like to see this resolved.
Don? maybe use base64? or some &.. stuff?
TIA
As long as you're sending properly form-encoded data, it should be fine. You can, for example, add multiline descriptions/captions in the HTML interface, which is an incredibly basic form POST.
Don
Thank you! I guess, my components do not take proper care of the stuff, even though I use proper ''multipart/form-data'' content type. But now I know where to look:-). I though I should use some kind of URI/URL/MIME/etc encoding...
I'll figure it out now..
Thanks!
At least for the albums.. Maybe it's different on different machines. Need to check it from home tonite..
- Multiline album description (createAlbum) - works
- Multiline image description - multipart upload (upload via POST) - works
- Multiline image description - standard base64 upload (upload) - returns format error!
Don, at this time I have only one question:- is this something which is easy to fix and gonna be fixed some time soon (say, this year:-),
- you simply discourage everybody from using this method and we can forget about the whole problem
I personally have no issues with the latter:-), I can totally desurface it from UI and don't even leave it as an option.. I only want to know..or
Thank you!
It lets me in, returns a session, but aftewards I don't seem to be able to do much. Here is an example of attempt to getAlbums (it should return list of public albums, right?):
[PHP]
Post to https://upload.smugmug.com/xmlrpc/
<?xml version="1.0"?>
<methodCall>
<methodName>loginAnonymously</methodName>
<params>
<param><value>1.0</value></param>
</params>
</methodCall>
Post results
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>SessionID</name>
<value>
<string>265a4f4786718c8668db41464606db16</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Logged in: Session: 265a4f4786718c8668db41464606db16; User: ; Hash:
Started Gettings list of albums
Post to http://upload.smugmug.com/xmlrpc/
<?xml version="1.0"?>
<methodCall>
<methodName>getAlbums</methodName>
<params>
<param><value>265a4f4786718c8668db41464606db16</value></param>
</params>
</methodCall>
Post results
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value>
<int>4</int>
</value>
</member>
<member>
<name>faultString</name>
<value>
<string>invalid user</string>
</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
[/PHP]
Am I missing something, or is this a bug?
Thanks
There was an interim problem with two new sort parameters, but it looks like it's been fixed.
Cheers!