Skip to content

Latest commit

 

History

History
226 lines (183 loc) · 4.74 KB

project_pictures_list.md

File metadata and controls

226 lines (183 loc) · 4.74 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": 20,
  "offset": 3,
  "total_pages": 7,
  "current_page": 2,
  "per_page": 3,
  "data": [
    {
      "id": 194260,
      "created_at": "2018-11-02T12:22:12+01:00",
      "updated_at": "2019-05-16T13:37:27+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/194260/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/194260.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    },
    {
      "id": 194259,
      "created_at": "2018-11-02T12:21:23+01:00",
      "updated_at": "2019-05-16T13:37:27+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/194259/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/194259.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    },
    {
      "id": 194258,
      "created_at": "2018-11-02T12:20:52+01:00",
      "updated_at": "2019-05-16T13:37:27+02:00",
      "description": null,
      "links": [
        {
          "rel": "image",
          "href": "https://betterplace-assets.betterplace.org/uploads/project/image/000/001/114/194258/image.jpg"
        },
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114/pictures/194258.json"
        },
        {
          "rel": "parent",
          "href": "https://api.betterplace.org/de/api_v4/projects/1114.json"
        }
      ]
    }
  ]
}