Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Schema achievementsoverview

partysalat edited this page Dec 16, 2012 · 2 revisions

Schema Achievements Overview

Info

Get List of Achievements and users who reach them

Url

rest/achievements

Parameter

TODO: PLEASE ADD

Schema

{
    "type": "array",
    "$schema": "http://json-schema.org/draft-03/schema",
    "items": {
        "type": "object",
        "properties": {
            "achievementName": {
                "type": "string",
                "required": true
            },
            "achievementId": {
                "type": "number",
                "required": true
            },
            "achievementImage": {
                "type": "string",
                "required": true
            },
            "totalCount": {
                "type": "number",
                "required": true
            },
            "users": {
                "type": "array",
                "required": true,
                "items": {
                    "type": "object",
                    "properties": {
                        "userId": {
                            "type": "number",
                            "required": true
                        },
                        "userName": {
                            "type": "string",
                            "required": true
                        },
                        "userImage": {
                            "type": "string",
                            "required": true
                        }
                    }
                }
            }
        }
    }
}

Example

[
    {
        "achievementName": "achievement-1",
        "achievementId": 1,
        "totalAmount": 1,
        "achievementImage": "img/achievements/2.png",
        "users": [
            {
                "userName": "user2",
                "userImage": "images/user1.png",
                "userId": 26
            },
            {
                "userName": "user1",
                "userImage": "images/user1.png",
                "userId": 23
            }
        ]
}]