Questions about API, and possible feature

cjnoyescjnoyes Registered Users Posts: 5 Beginner grinner
I have been working with the API and it has a lot of good stuff and basically works well, though...

I am working on some stuff with android for mobile devices. One of my concerns are performance related issues. Mobile devices operate under resource constraints. I am concerned about the number of requests to fill a list of albums or pictures of albums and the quantity of urls.

I would like with either albums or users.userTree to get the first image id and key, a url which I could add a size code. The thick response is too heavy but the thin response not enough data. Another thing would be able to get a number of image urls back, with start and count type of arguments to manage paging, this could be useful with some of the other apis that return a lot of data.

These devices have the org.json library on them which will likely be my desired approach, REST could work as well.

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 10, 2010
    if you are using API 1.2.2 before the methods you described has an Extras parameter, which allows you to define what additional fields you require. It basically allows you to customize your own response between the Standard and Heavy.

    The fields should be comma separated...like this for example.

    method=smugmug.albums.get&Extras=Public,Passworded,HideOwner

    yes, and response paging is something I want to do for API 1.2.3.

    Hope this helps,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • cjnoyescjnoyes Registered Users Posts: 5 Beginner grinner
    edited January 11, 2010
    devbobo wrote:
    if you are using API 1.2.2 before the methods you described has an Extras parameter, which allows you to define what additional fields you require. It basically allows you to customize your own response between the Standard and Heavy.

    The fields should be comma separated...like this for example.

    method=smugmug.albums.get&Extras=Public,Passworded,HideOwner

    yes, and response paging is something I want to do for API 1.2.3.

    Hope this helps,

    David

    thanks for the response, that may help
  • hoffmcshoffmcs Registered Users Posts: 125 Major grins
    edited January 13, 2010
    I have found that certain methods do not work under the Extras, like Highlight under smugmug.get.albums. For my app, I just used the heavy response which was fine for my purposes.

    Paging would be great. What else is on tap for the 1.2.3 release?
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 13, 2010
    hoffmcs wrote:
    I have found that certain methods do not work under the Extras, like Highlight under smugmug.get.albums.

    That's a bug, i've fixed it internally, but &Extras=HighlightID does work currently.
    David Parry
    SmugMug API Developer
    My Photos
  • cjnoyescjnoyes Registered Users Posts: 5 Beginner grinner
    edited January 14, 2010
    devbobo wrote:
    if you are using API 1.2.2 before the methods you described has an Extras parameter, which allows you to define what additional fields you require. It basically allows you to customize your own response between the Standard and Heavy.

    The fields should be comma separated...like this for example.

    method=smugmug.albums.get&Extras=Public,Passworded,HideOwner

    yes, and response paging is something I want to do for API 1.2.3.

    Hope this helps,

    David

    How are nested objects, suppose I just want few fields in nested objects, can they be addressed like Album.id or Album/id
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 14, 2010
    cjnoyes wrote:
    How are nested objects, suppose I just want few fields in nested objects, can they be addressed like Album.id or Album/id

    Hey Chris,

    You'd have to give me a more detailed example with specific calls and exactly what parameters you want.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • movestillmovestill Registered Users Posts: 22 Big grins
    edited January 30, 2010
    Extras with smugmug.images.get
    devbobo wrote:
    if you are using API 1.2.2 before the methods you described has an Extras parameter, which allows you to define what additional fields you require. It basically allows you to customize your own response between the Standard and Heavy.

    The fields should be comma separated...like this for example.

    method=smugmug.albums.get&Extras=Public,Passworded,HideOwner

    I'm trying to use Extras=MediumURL with smugmug.images.get. Is this broken or unimplemented?

    Thanks,
    Tim
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited January 31, 2010
    movestill wrote:
    I'm trying to use Extras=MediumURL with smugmug.images.get. Is this broken or unimplemented?

    Thanks,
    Tim

    it's working fine for me. Can you please supply the AlbumID you are requesting it for.

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • movestillmovestill Registered Users Posts: 22 Big grins
    edited January 31, 2010
    Extras with smugmug.images.get
    devbobo wrote:
    it's working fine for me. Can you please supply the AlbumID you are requesting it for.

    Thanks,

    David

    My fault, it does work. Turns out that when I copied the variable I was using for the endpoint from 1.2.0 to 1.2.2, I updated everything but the version number itself! rolleyes1.gif

    Thanks,
    Tim
Sign In or Register to comment.