Skip to content

Achievement

Alykhan Kanji edited this page Oct 27, 2019 · 6 revisions
  1. List achievements
  2. Get achievement
  3. Create achievement
  4. Edit achievement
  5. Delete achievement

List achievements

GET /achievement

Response

Status: 200 OK
[
  {
    "id": 1,
    "sequence": 1,
    "name": "a1",
    "distance": 1,
    "title": "First Stop",
    "subtitle": "Our Story",
    "description": "Our institutions have been developed to deliver world-class support to residents of this city.",
    "media": "https://example.com/media.jpg https://example.com/media.mov",
    "teams": [
      {
        "id": 1,
        "name": "t1"
      }
    ]
  }
]

Get achievement

GET /achievement/:id

Response

Status: 200 OK
{
  "id": 1,
  "sequence": 1,
  "name": "a1",
  "distance": 1,
  "title": "First Stop",
  "subtitle": "Our Story",
  "description": "Our institutions have been developed to deliver world-class support to residents of this city.",
  "media": "https://example.com/media.jpg https://example.com/media.mov",
  "teams": [
    {
      "id": 1,
      "name": "t1"
    }
  ]
}

Create achievement

POST /achievement

Parameters

Name Type Description
sequence integer Required. The sequence of the achievement.
name string Required. The name of the achievement.
distance integer Required. The distance of the achievement.
title string The title of the achievement content.
subtitle string The subtitle of the achievement content.
description string The description of the achievement content.
media string Space-separated URLs corresponding to media items for the achievement content.

Response

Status: 201 Created
{
  "id": 1,
  "sequence": 1,
  "name": "a1",
  "distance": "1"
  "title": "First Stop",
  "subtitle": "Our Story",
  "description": "Our institutions have been developed to deliver world-class support to residents of this city.",
  "media": "https://example.com/media.jpg https://example.com/media.mov",
}

Edit achievement

PATCH /achievement/:id

Parameters

Name Type Description
sequence integer The sequence of the achievement.
name string The name of the achievement.
distance integer The distance of the achievement.
title string The title of the achievement content.
subtitle string The subtitle of the achievement content.
description string The description of the achievement content.
media string Space-separated URLs corresponding to media items for the achievement content.

Response

Status: 200 OK
[1]

Delete achievement

DELETE /achievement/:id

Response

Status: 204 No Content
Clone this wiki locally