Skip to content

Latest commit

 

History

History
419 lines (330 loc) · 9.79 KB

blog_posts_list.md

File metadata and controls

419 lines (330 loc) · 9.79 KB

Blog Posts List ⇄ Details

GET https://api.betterplace.org/de/api_v4/projects/1114/blog_posts.json?fundraising_event_id=19267

A list of the blog posts of a betterplace.org project or fundraising event. Results are contained in a data attribute.

For betterplace.org clients:

  • Project Blogposts: There is no client-scoped URL. Please use the API calls that are provided inside the client project url response to make sure you only request data that is associated with one of your projects.

  • All Blogposts: Clients can retrieve a list of all blogpost of all client projects: /clients/PERMALINK/blog_posts.json

URL Parameters

Parameter Example Required Description
project_id 1114 no

Project id as an integer number ≥ 14.

fundraising_event_id 19267 no

Fundraising Event id as an integer number ≥ 1.

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)

lang string en

Blog posts have only one language at the moment

type string BlogPost

Blogposts are always created by a user, and this field always has the value BlogPost.

title string Thank you from Beijing
body string I am so happy to hear about the first donation for the Good Gifted Garden. If I told Chun …

The body may contain html such as links, embedded videos, and picture or any of the following HTML tags: a, b, br, div, em, i, iframe, img, li, ol, p, strong, ul.

↓author string "Till B."

Display name of a betterplace.org user. Possible formats: "Till B.", "T. Behnke", "Till Behnke"

Attribute Types Example Description
author.id number 1

An integer number ≥ 1

author.name null | string "Till B."

Display name of a betterplace.org user. Possible formats: "Till B.", "T. Behnke", "Till Behnke".

In the case of donation-opinions the name might also be empty/null for anonymous donations for anonymous donations.

↓author.picture object //betterplace-assets.betterplace.org ↪/uploads/user/profile_picture ↪/000/000/001 ↪/fill_100x100_original_tb.jpg

User profile picture or a fallback image

Attribute Types Example Description
author.picture.fallback boolean true

Specifies whether a fallback image is given or not

Response Links

Linkname Description

self

Link to this resource itself (blog post details)

platform

Permalink to betterplace.org

documentation

Link to this resource in the documentation

author.platform

The user's profile on betterplace.org. To view a user profile you have to be logged in. This array is empty if the user has no useraccount with betterplace.org but donated via one of our partner.

author.contact_data

The user's contact data. Please note that you need to be authenticated as a client with matching access rights in order to see this information.

author.picture.fill_100x100

100×100 Pixel

author.picture.original

Maximum sized image. This is the original image with default-cropping or user-cropping applied.

Response Example

{
  "total_entries": 95,
  "offset": 0,
  "total_pages": 48,
  "current_page": 1,
  "per_page": 2,
  "data": [
    {
      "id": 7019,
      "created_at": "2009-07-15T08:51:10+02:00",
      "updated_at": "2009-07-15T08:51:10+02:00",
      "lang": "en",
      "type": "BlogPost",
      "title": "Innovative support from a generous hairstylist",
      "body": "<p><br></p><p>Approximately one year ago, a young German hairstyling student read a piece about Skateistan. When she found herself working as a nurse in the German military hospital in Mazar-e-Sharif soon after, the skateboarding students of Kabul lingered in her mind. The soldier, Alexandra H., decided to use her skills to support Skateistan in any way she could — so she began to collect donations by giving haircuts to German soldiers serving in Afghanistan.</p><br><p>News of Alexandra’s “haircuts for a good cause” spread rapidly at Mazar-e-Sharif’s Camp Marmal. Before long, she had given 150 haircuts: at the end of June 2009, she generously handed all of the profits to Skateistan.</p><br><p>Alexandra, who has promised to continue her fundraising efforts for Skateistan when she returns to Germany, has quickly become one of the organization’s most innovative and committed supporters.</p><br>",
      "author": {
        "id": 9238,
        "name": "Maria Schmitz",
        "picture": {
          "links": [
            {
              "rel": "fill_100x100",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/009/238/fill_100x100_bp1575650048_original_maxn_skate.jpg"
            },
            {
              "rel": "original",
              "href": "https://betterplace-assets.betterplace.org/uploads/user/profile_picture/000/009/238/crop_original_bp1575650048_original_maxn_skate.jpg"
            }
          ]
        },
        "links": [
          {
            "rel": "platform",
            "href": "https://www.betterplace.org/de/users/9238"
          },
          {
            "rel": "contact_data",
            "href": "https://api.betterplace.org/de/api_v4/users/9238/contact_data.json"
          }
        ]
      },
      "links": [
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/blog_posts/7019.json"
        },
        {
          "rel": "platform",
          "href": "https://www.betterplace.org/de/projects/1114-unterstuetze-skateistan-sport-bildung-fuer-kinde-eyluel-camci/news/7019#ppp-sticky-anchor"
        },
        {
          "rel": "documentation",
          "href": "https://github.com/betterplace/betterplace_apidocs/blob/master/sections/blog_post_details.md"
        }
      ]
    },
    {
      "id": 8076,
      "created_at": "2009-08-18T21:19:02+02:00",
      "updated_at": "2009-08-19T09:38:56+02:00",
      "lang": "de",
      "type": "BlogPost",
      "title": "Sicherheitssets - durch Ihre Spenden finanziert -",
      "body": "<p>Im Bereich \"Fotos anschauen\" wurden Aufnahmen der trainierenden Kinder und Jugendlichen hochgeladen. Die <a href=\"../../../../pictures/0006/9710/69710.jpg\">Sicherheitsausrüstung</a>, die durch Ihre Spenden finanziert wurden, gehören selbstverständlich zu jedem Training dazu.</p><br><p> </p><br><p>Wir sagen an dieser Stelle noch einmal ganz herzlich \"DANKE\"</p><br><p>Das Skateistan-Team</p>",
      "author": null,
      "links": [
        {
          "rel": "self",
          "href": "https://api.betterplace.org/de/api_v4/blog_posts/8076.json"
        },
        {
          "rel": "platform",
          "href": "https://www.betterplace.org/de/projects/1114-unterstuetze-skateistan-sport-bildung-fuer-kinde-eyluel-camci/news/8076#ppp-sticky-anchor"
        },
        {
          "rel": "documentation",
          "href": "https://github.com/betterplace/betterplace_apidocs/blob/master/sections/blog_post_details.md"
        }
      ]
    }
  ]
}