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 Sep-22-2007, 12:08 AM   #1
devbobo
technicolored
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,186
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
  • string SessionID
  • int AlbumID
  • int WatermarkID
smugmug.albums.removeWatermark
  • string SessionID
  • int AlbumID
smugmug.albumtemplates.create
  • string SessionID
[*]see the response from smugmug.albumtemplates.get for more parameters
smugmug.albumtemplates.changeSettings
  • string SessionID
  • int AlbumTemplateID
  • see the response from smugmug.albumtemplates.get for more parameters
smugmug.family.add
  • string SessionID
  • string NickName
smugmug.family.get
  • string SessionID
smugmug.family.remove
  • string SessionID
  • string NickName
smugmug.family.removeAll
  • string SessionID
smugmug.friends.add
  • string SessionID
  • string NickName
smugmug.friends.get
  • string SessionID
smugmug.friends.remove
  • string SessionID
  • string NickName
smugmug.friends.removeAll
  • string SessionID
smugmug.images.applyWatermark
  • string SessionID
  • int ImageID
  • int WatermarkID
smugmug.images.crop
  • string SessionID
  • int ImageID
  • int Width
  • int Height
  • int X
  • int Y
smugmug.images.removeWatermark
  • string SessionID
  • int ImageID
smugmug.images.rotate
  • string SessionID
  • int ImageID
  • int Degrees
  • bool Flip
smugmug.images.zoomThumbnail
  • string SessionID
  • int ImageID
  • int Width
  • int Height
  • int X
  • int Y
smugmug.sharegroups.addAlbum
  • string SessionID
  • int ShareGroupID
  • int AlbumID
smugmug.sharegroups.create
  • string SessionID
  • string Name
  • string Description
smugmug.sharegroups.delete
  • string SessionID
  • int ShareGroupID
smugmug.sharegroups.get
  • string SessionID
  • bool Heavy
smugmug.sharegroups.getInfo
  • string SessionID
  • int ShareGroupID
smugmug.sharegroups.removeAlbum
  • string SessionID
  • int ShareGroupID
  • int AlbumID
smugmug.themes.get
  • string SessionID
smugmug.users.getDisplayName
  • string SessionID
  • string NickName

smugmug.watermarks.changeSettings (pro only)
  • string SessionID
  • int ImageID
  • string Name
  • string Pinned (Left, Right, Center, Top, Bottom, TopLeft, TopRight, BottomLeft, BottomRight, Tile)
  • int Dissolved (0-100)
  • bool Thumbs
smugmug.watermarks.create (pro only)
  • string SessionID
  • int ImageID
  • string Name
  • string Pinned (Left, Right, Center, Top, Bottom, TopLeft, TopRight, BottomLeft, BottomRight, Tile)
  • int Dissolve (0-100)
  • bool Thumbs
smugmug.watermarks.delete (pro only)
  • string SessionID
  • int WatermarkID
smugmug.watermarks.get (pro only)
  • string SessionID
  • string Heavy
smugmug.watermarks.getInfo (pro only)
  • string SessionID
  • int WatermarkID

smugmug.products.get
  • string SessionID

smugmug.propricing.getPortfolio (pro only)
  • string SessionID
  • string/array of strings ProductType optional (CommonPrint, DigitalPrint, SpecialityPrint, Merchandise, Download)
  • int/array of ints ProductID optional

smugmug.propricing.getAlbum (pro only)
  • string SessionID
  • int AlbumID
  • string/array of strings ProductType optional (CommonPrint, DigitalPrint, SpecialityPrint, Merchandise, Download)
  • int/array of ints ProductID optional


smugmug.propricing.getImage (pro only)
  • string SessionID
  • int ImageID
  • string/array of strings ProductType optional (CommonPrint, DigitalPrint, SpecialityPrint, Merchandise, Download)
  • int/array of ints ProductID optional

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
__________________
David Parry
My Photos | SmugBrowser
devbobo is offline   Reply With Quote
Old Sep-24-2007, 01:54 PM   #2
devbobo
technicolored
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,186
bump
__________________
David Parry
My Photos | SmugBrowser
devbobo is offline   Reply With Quote
Old Sep-27-2007, 06:50 PM   #3
alpacaboy
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.
alpacaboy is offline   Reply With Quote
Old Oct-04-2007, 10:59 PM   #4
devbobo
technicolored
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,186
Quote:
Originally Posted by alpacaboy
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.

yes, I am aware of this issue... however, it requires me spending some time with Don to figure it out. It's on my list of stuff that needs to be fixed.



Cheers,

David
__________________
David Parry
My Photos | SmugBrowser
devbobo is offline   Reply With Quote
Old Oct-05-2007, 07:48 PM   #5
kylemulka
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.
kylemulka is offline   Reply With Quote
Old Oct-05-2007, 08:06 PM   #6
devbobo
technicolored
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,186
Quote:
Originally Posted by kylemulka
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.

the endpoints for 1.2.1 are different...

http://api.smugmug.com/services/api/rest/1.2.1/?method=smugmug.login.anonymously&APIKey=<removed>
__________________
David Parry
My Photos | SmugBrowser
devbobo is offline   Reply With Quote
Old Oct-07-2007, 09:34 PM   #7
scottV
Major grins
 
scottV's Avatar
 
Join Date: Jul 2006
Location: Tustin, CA
Posts: 349
smugmug.orders.get & smugmug.orders.ship = method not found.
smugmug.users.getDisplayName = invalid API key
__________________
http://scottvickers.smugmug.com
scottV is online now   Reply With Quote
Old Oct-07-2007, 09:53 PM   #8
devbobo
technicolored
 
devbobo's Avatar
 
Join Date: Nov 2004
Location: Melbourne, AU
Posts: 4,186
Quote:
Originally Posted by f00sion
smugmug.orders.get & smugmug.orders.ship = method not found.
smugmug.users.getDisplayName = invalid API key

only the methods currently listed in this thread are implemented.

I will check out the issue with smugmug.users.getDisplayName
__________________
David Parry
My Photos | SmugBrowser
devbobo is offline   Reply With Quote
Old Oct-08-2007, 10:47 AM   #9
scottV
Major grins
 
scottV's Avatar
 
Join Date: Jul 2006
Location: Tustin, CA
Posts: 349
Quote:
Originally Posted by devbobo
only the methods currently listed in this thread are implemented.

I will check out the issue with smugmug.users.getDisplayName
gotcha, i was looking at them in the wiki.
__________________
http://scottvickers.smugmug.com
scottV is online now   Reply With Quote
Old Oct-09-2007, 10:14 AM   #10
luke_church
#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
__________________
Photography: www.lukechurchphotography.com
SmugSoftware: www.smugtools.com
luke_church 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 08:39 PM.


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