API Photos: Difference between revisions
From Golden Retriever Wiki
Created page with "Each data object returned from the Data endpoint will contain a comma separated list as the value for the key "Photos". These are the ids of the photos. You can download a photo from a dictionary using the following example: '''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/photo/{Dictionary_no}/{Photo_no}</nowiki>" -o photo.jpg''' The response will be the file '''photo.jpg'''" |
No edit summary Tag: Reverted |
||
Line 5: | Line 5: | ||
'''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/photo/{Dictionary_no}/{Photo_no}</nowiki>" -o photo.jpg''' | '''curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "<nowiki>https://api.thedog.io/photo/{Dictionary_no}/{Photo_no}</nowiki>" -o photo.jpg''' | ||
The response will be the file '''photo.jpg''' | The response will be the file '''photo.jpg''' 1 |
Revision as of 21:17, 31 October 2024
Each data object returned from the Data endpoint will contain a comma separated list as the value for the key "Photos". These are the ids of the photos.
You can download a photo from a dictionary using the following example:
curl -X GET -H "Content-Type: application/json" -H "authorization: <api_key>" "https://api.thedog.io/photo/{Dictionary_no}/{Photo_no}" -o photo.jpg
The response will be the file photo.jpg 1