Options

smugmug.images.get REST response

KyhiKyhi Registered Users Posts: 12 Big grins
Here is another REST response that I believe can be cleaned up. This one looks like it has some unneceassry levels.

You can easily remove the <Info> and second <Image id="xyz"> elements and have a cleaner and smaller XML response.

I haven't looked at that many methods but this is the second time I have seen the <Info> element used. I don't think this element is necessary in an XML response for any method call.

I think the current XML response of

<method>smugmug.images.get</method>
<Images>
<Image id="1">
<Info>
<Image id="1">

<Album id="2" />
<FileName>DSC02853.JPG</FileName>
...
</Image>
</Info>

</Image>
<Image id="2">
<Info>
<Image id="2">

<Album id="2" />
<FileName>DSC02854.JPG</FileName>
...
</Image>
</Info>

</Image>
</Images>

should be changed to

<method>smugmug.images.get</method>
<Images>
<Image id="1">
<Album id="2" />
<FileName>DSC02853.JPG</FileName>
...
</Image>
<Image id="2">
<Album id="2" />
<FileName>DSC02854.JPG</FileName>
...
</Image>
</Images>
Sign In or Register to comment.