Skip to content

Sticker API

Nattapon Rattajak edited this page Jul 24, 2018 · 26 revisions

4. Sticker

[x] 4.1 Get sticker list by channel

POST /api/v1/sticker/byChannel/{channelId: string}?page=0&limit=10

Query parameters:

Field Description Optional Default Auth
channelId ID of channel No Yes
page Current channels page Yes 0 Yes
limit Maximum of channels page Yes 10 Yes

Returns:

{
    "data": {
        "pageIndex": 0,
        "pageLimit": 10,
        "pages": 1,
        "paging": {
            "next": "",
            "previous": ""
        },
        "stickers": [
            {
                "_id": "5b4330cb083713179f3058e3",
                "channelId": "5b3a1a9f083713dbfb387280",
                "createAt": "2018-07-09T09:54:19.221Z",
                "sendFromPlayerId": "5b2ca882bdfdd84f1fa5fe44",
                "sendToMPlayerId": "5b35ee0508371345dc8e4dff",
                "stickerStore": {
                    "_id": "5b43112e0837137851003525",
                    "coin": 1000,
                    "coint": 1000,
                    "createAt": "2018-07-09T07:39:26.07Z",
                    "diamond": 10,
                    "isActive": false,
                    "lastModified": "2018-07-09T07:38:05.437Z",
                    "stickerStoreDetail": "Totodile is a small Pokémon that appears as a bipedal crocodile. While most of a Totodile's body is blue, they have a yellow, V-shaped marking across their chest, red eyes and spikes that go down its back to its tail. These Pokémon are well known for their large mouths, filled with razor-sharp teeth",
                    "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": "Totodile"
                },
                "stickerStoreId": "5b43112e0837137851003525"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.2 Get sticker list by from player

POST /api/v1/sticker/byFrom/{playerId :string}?page=0&limit=10

Query parameters:

Field Description Optional Default Auth
playerId Player ID No Yes
page Current page Yes 0 Yes
limit Maximum page Yes 10 Yes

Returns:

{
    "data": {
        "pageIndex": 0,
        "pageLimit": 10,
        "pages": 1,
        "paging": {
            "next": "",
            "previous": ""
        },
        "stickers": [
            {
                "_id": "5b4330cb083713179f3058e3",
                "channelId": "5b3a1a9f083713dbfb387280",
                "createAt": "2018-07-09T09:54:19.221Z",
                "sendFromPlayerId": "5b2ca882bdfdd84f1fa5fe44",
                "sendToMPlayerId": "5b35ee0508371345dc8e4dff",
                "stickerStore": {
                    "_id": "5b43112e0837137851003525",
                    "coin": 1000,
                    "coint": 1000,
                    "createAt": "2018-07-09T07:39:26.07Z",
                    "diamond": 10,
                    "isActive": false,
                    "lastModified": "2018-07-09T07:38:05.437Z",
                    "stickerStoreDetail": "Totodile is a small Pokémon that appears as a bipedal crocodile. While most of a Totodile's body is blue, they have a yellow, V-shaped marking across their chest, red eyes and spikes that go down its back to its tail. These Pokémon are well known for their large mouths, filled with razor-sharp teeth",
                    "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": "Totodile"
                },
                "stickerStoreId": "5b43112e0837137851003525"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.3 Get sticker list by to monster

POST /api/v1/sticker/byTo/{mPlayerId :string}?page=0&limit=10

Query parameters:

Field Description Optional Default Auth
mPlayerId Get player's monster ID No Yes
page Current page Yes 0 Yes
limit Maximum page Yes 10 Yes

Returns:

{
    "data": {
        "pageIndex": 0,
        "pageLimit": 10,
        "pages": 1,
        "paging": {
            "next": "",
            "previous": ""
        },
        "stickers": [
            {
                "_id": "5b4330cb083713179f3058e3",
                "channelId": "5b3a1a9f083713dbfb387280",
                "createAt": "2018-07-09T09:54:19.221Z",
                "sendFromPlayerId": "5b2ca882bdfdd84f1fa5fe44",
                "sendToMPlayerId": "5b35ee0508371345dc8e4dff",
                "stickerStore": {
                    "_id": "5b43112e0837137851003525",
                    "coin": 1000,
                    "coint": 1000,
                    "createAt": "2018-07-09T07:39:26.07Z",
                    "diamond": 10,
                    "isActive": false,
                    "lastModified": "2018-07-09T07:38:05.437Z",
                    "stickerStoreDetail": "Totodile is a small Pokémon that appears as a bipedal crocodile. While most of a Totodile's body is blue, they have a yellow, V-shaped marking across their chest, red eyes and spikes that go down its back to its tail. These Pokémon are well known for their large mouths, filled with razor-sharp teeth",
                    "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": "Totodile"
                },
                "stickerStoreId": "5b43112e0837137851003525"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.4 Add sticker to friend

POST /api/v1/sticker/toFriend

Query parameters:

Field Description Optional Auth
stickerStoreId ID of this sticker in store No Yes
sendFromPlayerId This sticker is sent from whose's ID No Yes
sendToMPlayerId ID that this sticker is sent to mPlayer No Yes
channelId which channel No Yes

Returns:

{
    "data": {
        "_id": "5b56bd6f083713b9e0ddd6b4",
        "channelId": "5b3a1a9f083713dbfb387280",
        "createAt": "2018-07-24T05:47:27.819Z",
        "sendFromPlayerId": "5b2ca882bdfdd84f1fa5fe44",
        "sendToMPlayerId": "5b35ee0508371345dc8e4dff",
        "stickerStoreId": "5b43112e0837137851003525"
    },
    "isSuccess": true
}

[x] 4.5 Get data sticker store list

POST /api/v1/stickerStore/list?page=0&limit=10

Query parameters:

Field Description Optional Default Auth
page Current page of sticker Yes 0 Yes
limit Maximum page of sticker Yes 10 Yes

Returns:

{
    "data": {
        "pageIndex": 0,
        "pageLimit": 2,
        "pages": 2,
        "paging": {
            "next": "/api/v1/stickerStore/list?page=1&limit=2",
            "previous": ""
        },
        "stickers": [
            {
                "id": "5b3f55bdbdfdd84f1ff86c6a",
                "stickerStoreName": "Pikachu",
                "stickerStoreDetail": "",
                "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/0/0d/025Pikachu.png/revision/latest/scale-to-width-down/200?cb=20140328192412",
                "stickerStoreLevel": 1,
                "coin": 150,
                "diamond": 10,
                "isActive": false,
                "createAt": "0001-01-01T00:00:00Z",
                "lastModified": "0001-01-01T00:00:00Z"
            },
            {
                "id": "5b3f5b39083713078734548e",
                "stickerStoreName": "Cyndaquil",
                "stickerStoreDetail": "",
                "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/9/9b/155Cyndaquil.png/revision/latest/scale-to-width-down/200?cb=20140329012506",
                "stickerStoreLevel": 1,
                "coin": 150,
                "diamond": 10,
                "isActive": false,
                "createAt": "2018-07-06T12:06:17.226Z",
                "lastModified": "0001-01-01T00:00:00Z"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.6 Add sticker store (backend)

POST /api/v1/stickerStore/add

JSON body:

Field Description Optional Auth
stickerStoreName Name of the sticker in the store No admin
stickerStoreDetail Sticker’s detail Yes admin
stickerStoreLevel Sticker’s level No admin
stickerStoreImage Path of the Sticker’s image No admin
coin Price of the sticker by coins No admin
diamond Price of the sticker by diamonds No admin
isActive Can interract or not Yes admin

Returns:

{
    "data": {
        "id": "",
        "stickerStoreName": "Totodile",
        "stickerStoreDetail": "",
        "stickerStoreLevel": 1,
        "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
        "coin": 150,
        "diamond": 10,
        "isActive": false,
        "createAt": "2018-07-06T18:53:24.237018144+07:00",
        "lastModified": "0001-01-01T00:00:00Z"
    },
    "isSuccess": true
}

[x] 4.7 Update sticker store (backend)

POST /api/v1/stickerStore/update/{stickerStoreId: string}

Query parameters:

Field Description Optional Auth
stickerStoreName Name of the sticker in the store Yes admin
stickerStoreDetail Sticker's detail Yes admin
stickerStoreLevel Sticker's level Yes admin
stickerStoreImage Path of the Sticker's image Yes admin
coin Price of the sticker by coins Yes admin
diamond Price of the sticker by diamonds Yes admin
isActive Can interract or not Yes admin

Returns:

{
    "data": {
        "id": "5b43112e0837137851003525",
        "stickerStoreName": "Totodile",
        "stickerStoreDetail": "Totodile is a small Pokémon that appears as a bipedal crocodile. While most of a Totodile's body is blue, they have a yellow, V-shaped marking across their chest, red eyes and spikes that go down its back to its tail. These Pokémon are well known for their large mouths, filled with razor-sharp teeth",
        "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
        "stickerStoreLevel": 1,
        "coin": 1000,
        "diamond": 10,
        "isActive": false,
        "createAt": "2018-07-09T07:39:26.07Z",
        "lastModified": "2018-07-09T07:38:05.437Z"
    },
    "isSuccess": true
}

Clone this wiki locally