This operation retrieves any extra images for a specific project. When requesting full <project> information, the <imageGallerySize> indicates the number of images available. If this number is greater than zero you can access the extra images using this operation. This is a non-secure request as indicated by the '/public/' element in the URL path, therefore, an access token (authentication) is not required.
GET
xml, json
xml, json
https://api.globalgiving.org/api/public/projectservice/projects/{projectid}/imagegallery
{projectid} the numeric identifier for a project, replace with actual value, required
&api_key described in the API Key section, required
/api/public/projectservice/projects/4381/imagegallery?api_key=YOUR_API_KEY
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "https://api.globalgiving.org/api/public/projectservice/projects/4381/imagegallery?api_key=YOUR_API_KEY"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<images>
<image id="123">
<title>Image Title<title>
<imagelink size="small">
<url>https://www.globalgiving.org/pfil/4381/pict_grid1.jpg</url>
</imagelink>
<imagelink size="thumbnail">
<url>https://www.globalgiving.org/pfil/4381/pict.jpg</url>
</imagelink>
<imagelink size="medium">
<url>https://www.globalgiving.org/pfil/4381/pict_med.jpg</url>
</imagelink>
<imagelink size="large">
<url>https://www.globalgiving.org/pfil/4381/pict_grid7.jpg</url>
</imagelink>
<imagelink size="extraLarge">
<url>https://www.globalgiving.org/pfil/4381/pict_large.jpg</url>
</imagelink>
<imagelink size="original">
<url>https://www.globalgiving.org/pfil/4381/pict.jpg</url>
</imagelink>
</image>
<image id="124">
<imagelink size="small">
<url>https://www.globalgiving.org/pfil/4381/ph_grid1_4381_15669.jpg</url>
</imagelink>
<imagelink size="thumbnail">
<url>https://www.globalgiving.org/pfil/4381/th_4381_15669.jpg</url>
</imagelink>
<imagelink size="medium">
<url>https://www.globalgiving.org/pfil/4381/ph_med_4381_15669.jpg</url>
</imagelink>
<imagelink size="large">
<url>https://www.globalgiving.org/pfil/4381/ph_grid7_4381_15669.jpg</url>
</imagelink>
<imagelink size="extraLarge">
<url>https://www.globalgiving.org/pfil/4381/ph_4381_15669.jpg</url>
</imagelink>
<imagelink size="original">
<url>https://www.globalgiving.org/pfil/4381/ph_4381_15669.jpg</url>
</imagelink>
<title>Another Image title</title>
</image>
...
<image id="...">
<imagelink size="...">
<url>...</url>
</imagelink>
...
<title>...</title>
</image>
</images>
NOTE: The <image> element is repeating.
images |
|
Element | Mandatory | Description |
---|---|---|
image -> id | required | a unique id within the set identifying the image |
image -> title | optional | the image title (if available) |
image -> imagelink -> size | required | Size (WxH in pixels) that the image is available in. Possible values: small: Maximum dimensions of 75x75 - best fit, may be smaller in one dimension. thumbnail: Fixed size of 80x52. medium: Maximum dimensions of 300x220 - best fit, may be smaller in one dimension. large: Maximum dimensions 540x405 - best fit, may be smaller in one dimension. extraLarge: Maximum dimensions 1024x1024 - may be smaller in either or both dimensions. Will fit larger images to 1024 on one side. Smaller images are not scaled up. original: The original image file that was uploaded to GlobalGiving and was used to generate the other versions. |
image -> imagelink -> url | required | URI to project's image for specified size. |