IDigBio API v1 Examples: Difference between revisions

Line 917: Line 917:
=== Display a thumbnail image for a mediarecord ===
=== Display a thumbnail image for a mediarecord ===


Let's say we wish to display a thumbnail image for the 3rd mediarecord of the previous example (highlighted in the previous screenshot).
Let's say that we wish to display a thumbnail image for a particular mediarecord.


Not necessary, but we can look at the full mediarecord:
We can look at the full mediarecord:


<pre>
<pre>
Line 959: Line 959:
}
}
</pre>
</pre>


We will use the "media" endpoint for that mediarecord's iDigBio UUID and add the "quality" parameter with "thumbnail" as the value:
We will use the "media" endpoint for that mediarecord's iDigBio UUID and add the "quality" parameter with "thumbnail" as the value:
Line 965: Line 964:
http://api.idigbio.org/v1/mediarecords/00002091-4fb3-410a-9307-bd3e917dfcca/media?quality=thumbnail
http://api.idigbio.org/v1/mediarecords/00002091-4fb3-410a-9307-bd3e917dfcca/media?quality=thumbnail


Accessing that URL results in a number of HTTP Redirects to the target thumbnail image, illustrated here with the Chrome Developer Tools visible:
which results in a number of HTTP Redirects to the target thumbnail image, illustrated here with the Chrome Developer Tools visible:


[[File:Screenshot_thumbnail_00002091-4fb3-410a-9307-bd3e917dfcca.png]]
[[File:Screenshot_thumbnail_00002091-4fb3-410a-9307-bd3e917dfcca.png]]
1,554

edits