Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
227 lines (183 sloc) 4.75 KB

Project Pictures List ⇄ Details

GET https://api.betterplace.org/de/api_v4/projects/1114/pictures.json

A list of pictures of a betterplace.org project (donate money). Results are contained in a data attribute.

Custom picture-sizes: This API will only deliver the orginal image. That is the largest image betterplace.org can provide. Please use an image transformation service of your choice to resize this image to your liking. Note, however, that some image names contain non-url-safe characters that might break services such as Sencha Source.

We are working on a better solution. Please contact us for more information.

In the meantime, the following links might help:

For betterplace.org clients: If you request data for a project that is not part of the client projects, the API will return a 404 HTTP code.

URL Parameters

Parameter Example Required Description
project_id 1114 yes

Project id as an integer number ≥ 14.

Response Attributes

Root Attributes

Attribute Types Example Description
id number 1

An integer number ≥ 1

created_at string "1994-11-05T13:15:30Z"

DateTime (ISO8601 with Timezone)

updated_at string "1994-11-05T13:15:30Z"

DateTime (ISO8601 with Timezone)

description string Yada…

Description of the picture

Response Links

Linkname Description

image

Link to the original image as uploaded by the user

self

The single resource for this picture

parent

The parent object of this picture.

Response Example

{
  "total_entries": 35,
  "offset": 3,
  "total_pages": 12,
  "current_page": 2,
  "per_page": 3,
  "data": [
    {
      "id": 103304,
      "created_at": "2015-03-23T14:05:52+01:00",
      "updated_at": "2017-07-20T13:05:53+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/103304/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/103304.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    },
    {
      "id": 103303,
      "created_at": "2015-03-23T14:05:35+01:00",
      "updated_at": "2017-07-20T13:05:53+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/103303/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/103303.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    },
    {
      "id": 103297,
      "created_at": "2015-03-23T13:47:25+01:00",
      "updated_at": "2017-07-20T13:05:53+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/103297/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/103297.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    }
  ]
}