| 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? |
|
|||||||
| Register | FAQ | Shooters | Calendar | Reviews | Tutorials | Gallery | Books | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
API 1.2.1 beta
Hi Guys,
We decided to push out an early release of 1.2.1 so that you guys can start playing. It's not feature complete, and there will probably get a few bugs. At this point, I haven't had a chance to do the documentation, so below I have listed the new endpoints and the input parameters for the new methods. I'm away at Glacier for the next week, so I will look at any issues when I get back. Cheers, David REST: http[s]://api.smugmug.com/services/api/rest/1.2.1/ JSON: http[s]://api.smugmug.com/services/api/json/1.2.1/ PHP: http[s]://api.smugmug.com/services/api/php/1.2.1/ XML-RPC: http[s]://api.smugmug.com/services/api/xmlrpc/1.2.1/ smugmug.albums.applyWatermark
smugmug.albumtemplates.changeSettings
smugmug.watermarks.changeSettings (pro only)
smugmug.products.get
smugmug.propricing.getPortfolio (pro only)
smugmug.propricing.getAlbum (pro only)
smugmug.propricing.getImage (pro only)
Updated Methods... smugmug.albums.get smugmug.users.getTree now accepts a ShareGroup parameter, which can be a single or an array of share group tags, which will expose any private albums for a given sharegroup when you call this method on another user's account. smugmug.images.getInfo now returns Latitude, Longitude and Altitude if set. smugmug.images.changeSettings now accepts Latitude, Longitude and Altitude |
|
|
|
|
|
#2 |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
bump
|
|
|
|
|
|
#3 |
|
Beginner grinner
Join Date: Sep 2007
Posts: 5
|
I'm still having trouble with:
users.getTransferStats: http://api.smugmug.com/services/api/...APIKey=API_KEY &method=smugmug.users.getTransferStats&SessionId=S ESSION_ID &Month=9&Year=2007 (takes a long time, then just errors out with: The requested URL could not be retrieved) albums.getStats: http://api.smugmug.com/services/api/...APIKey=API_KEY &method=smugmug.albums.getStats&SessionId=SESSION_ ID &Month=9&Year=2007&AlbumID=3504830&heavy=true just gives me overall stats - not detailed per-image. I've also tried heavy=True,TRUE,1 The previous api 1.1.1 would return a heavy listing, but all the image stats were 0 (posted another thread about that) I've been trying to access my per-image stats in the last couple versions, and never have been able to get them. |
|
|
|
|
|
#4 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
Cheers, David |
|
|
|
|
|
|
#5 |
|
Beginner grinner
Join Date: Oct 2007
Posts: 2
|
Hmm... logging in anonymously appears to be broken.
This works: http://api.smugmug.com/hack/rest/1.2.0/?method=smugmug.login.anonymously&APIKey=<removed This doesn't: http://api.smugmug.com/hack/rest/1.2.1/?method=smugmug.login.anonymously&APIKey=<removed> The first is returning what appears to be the correct XML document, the seconds is giving me nothing... no error message, nothing. |
|
|
|
|
|
#6 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
http://api.smugmug.com/services/api/rest/1.2.1/?method=smugmug.login.anonymously&APIKey=<removed> |
|
|
|
|
|
|
#7 |
|
Major grins
Join Date: Jul 2006
Location: Tustin, CA
Posts: 352
|
smugmug.orders.get & smugmug.orders.ship = method not found.
smugmug.users.getDisplayName = invalid API key
__________________
http://scottvickers.smugmug.com |
|
|
|
|
|
#8 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
I will check out the issue with smugmug.users.getDisplayName |
|
|
|
|
|
|
#9 | |
|
Major grins
Join Date: Jul 2006
Location: Tustin, CA
Posts: 352
|
Quote:
__________________
http://scottvickers.smugmug.com |
|
|
|
|
|
|
#10 |
|
#Grinner
Join Date: Nov 2004
Posts: 506
|
I suspect this is probably a dumb question, but I'm afraid I haven't been keeping up... :(
Is the change in the structure of the REST responses intentional? REST 1.2.0 <?xml version="1.0" encoding="utf-8" ?> - <rsp stat="ok"> <method>smugmug.login.withPassword</method> - <Login PasswordHash="..." AccountType="Pro" FileSizeLimit="25165824"> <Session id="..." /> <User id="..." NickName="..." DisplayName="Luke Church" /> </Login> </rsp> REST 1.2.1 <?xml version="1.0" encoding="utf-8" ?> - <rsp stat="ok"> <method>smugmug.login.withPassword</method> - <Login SessionID="..." PasswordHash="..." AccountType="Pro" FileSizeLimit="25165824"> <User id="..." NickName="..." DisplayName="Luke Church" /> </Login> </rsp> Note the change from <session id = foo> to <Login SessionID= foo> This testing is being done shoddily, I was just prodding the API to see whether things have improved since last time, to decide whether it's worth investing time in developing something. If a rigourous demo case is required to answer the question let me know. All the best, Luke |
|
|
|
|
|
#11 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
yes, the change was intentional...it enabled us to generate xml-rpc, json, rest and php responses from a common code base. It has been like that for some time. Cheers, David |
|
|
|
|
|
|
#12 | |
|
#Grinner
Join Date: Nov 2004
Posts: 506
|
Quote:
|
|
|
|
|
|
|
#13 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
|
|
|
|
|
|
|
#14 | |
|
#Grinner
Join Date: Nov 2004
Posts: 506
|
Quote:
|
|
|
|
|
|
|
#15 | |
|
I'm grinning
Join Date: Mar 2006
Posts: 60
|
FWIW, this is the only difference I've seen so far between 1.2.0 and 1.2.1, and I've exercised quite a few of the APIs so far.
As for the rational for changing this response, I dunno.... I was wondering the same thing myself. Mark Quote:
|
|
|
|
|
|
|
#16 | |
|
technicolored
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,308
|
Quote:
That will learn me for tackling forum threads before coffee. That's a bug, it's been fixed on my dev server. I'll let you know when it's live. David |
|
|
|
|
|
|
#17 |
|
Big grins
Join Date: Oct 2007
Posts: 10
|
Caption and Keyword issue
This is my first post. I have just started working on a Ruby R/W implementation of your API and found an issue with setting captions and keywords through the API.
CAPTIONS: Captions with quotes, end up having the quote escaped when viewed on the web. Here is a sample of what I am talking about. Photo with escaped quote API Call to change Caption If I change the caption manually through the web interface it works fine, however I am working on setting up a feed from our RallyNorth.net site and manual caption editing is not an option. KEYWORDS: Keywords with numbers or spaces also seem to have an issue that might be centered around this quoting issue as well. For some reason I need to quote any keyword with a number or space in it, when using the API, however if I use the web interface this is not necessary. For instance the above photo has the following keywords: Sports, GameID365, Featured Photo, Football, High School, 2007, 200709, 20070907, North Andover, Andover If I submit them through the API like so: Update Keywords through API The site only shows the following keywords: football, sports, andover, high school, featured photo, north andover, gameid But when I go to edit them they all appear correctly, and if I submit them from the online form as is they don't work as well, I have to quote any keyword with a number. So if I quote all keywords and submit them through the API like so: Update keywords through API with quotes The keywords now appear correctly on the site, however if I edit them all the quotes are escaped like so: \"Sports\", \"GameID365\", \"Featured Photo\", \"Football\", \"High School\", \"2007\", \"200709\", \"20070907\", \"North Andover\", \"Andover\" The keywords is not really a big issue since I do get the desired results, however the caption issue is a little more important, since that is what the user sees when viewing the photos. |
|
|
|
|
|
#18 |
|
Big grins
Join Date: Oct 2007
Posts: 10
|
Caption character support
In reference to the last post, I tried setting a caption using all ASCII characters from 32 to 255, and all the characters worked fine except for:
%34 - " - double quote (escaped) %39 - ' - apostrophe (escaped) %92 - \ - backslash (escaped) I also found that entities could be used easily enough, for instance you could use "%26apos;" or "%26quot;" for single and double quotes. But there is still the issue with quoting if you want to put a URL in the caption, for instance passing: <a href="http://smugmug.com">smugmug</a> results in the following being output when viewing the photo: <a href=\"http://smugmug.com\">smugmug</a> This obviously prevents the URL from being valid. |
|
|
|
|
|
#19 | |
|
Major grins
Join Date: May 2004
Posts: 1,039
|
Hi Mouellette:
In this thread I've talked about similar problems I've been having with Keywords. I was so excited to find your post, and I tried using %26quot;foo%26quot; in a keyword, but to no avail. When I look at it on the website, it appears exactly as I've typed it above. Suck. --Darryl Quote:
|
|
|
|
|
|
|
#20 | |
|
Big grins
Join Date: Oct 2007
Posts: 10
|
The keywords still seem to work correctly if you put the quotes in. When you edit the keywords you get the extra backslashes like \"foo\" but they display correctly to the user. My concern was how quotes display to the user in a caption. The extra backslash is confusing, so you need to use the entity.
Quote:
|
|
|
|
|
![]() |
| Tell The World! |
| Thread Tools | |
| Display Modes | |
|
|