Skip to content

Sticker API

atsanan edited this page Dec 12, 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": "5bc898ad63998b1c041a9e85",
                "channelId": "5b3afe400837131c5579cf70",
                "createAt": "2018-10-18T14:29:01.1Z",
                "sendFromPlayerId": "5bb773fb68efd87103266964",
                "sendToMPlayerId": "5b4329f0bdfdd84f1f01c209",
                "stickerStore": {
                    "_id": "5bb75661cf7ae9e79e22de46",
                    "coin": 1,
                    "created_at": "2018-08-31T04:35:31.797Z",
                    "diamond": 0,
                    "isActive": true,
                    "stickerStoreDetail": {
                        "chi1": "stickerStoreDetail",
                        "chi2": "stickerStoreDetail",
                        "eng": "stickerStoreDetail",
                        "thai": "stickerStoreDetail"
                    },
                    "stickerStoreImage": "fileName.png",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": {
                        "chi1": "stickerStoreName",
                        "chi2": "stickerStoreName",
                        "eng": "stickerStoreName",
                        "thai": "stickerStoreName"
                    },
                    "updated_at": "2018-08-31T04:32:53.031Z"
                },
                "stickerStoreId": "5bb75661cf7ae9e79e22de46"
            }
        ]
    },
    "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": "5bc898ad63998b1c041a9e85",
                "channelId": "5b3afe400837131c5579cf70",
                "createAt": "2018-10-18T14:29:01.1Z",
                "sendFromPlayerId": "5bb773fb68efd87103266964",
                "sendToMPlayerId": "5b4329f0bdfdd84f1f01c209",
                "stickerStore": {
                    "_id": "5bb75661cf7ae9e79e22de46",
                    "coin": 1,
                    "created_at": "2018-08-31T04:35:31.797Z",
                    "diamond": 0,
                    "isActive": true,
                    "stickerStoreDetail": {
                        "chi1": "stickerStoreDetail",
                        "chi2": "stickerStoreDetail",
                        "eng": "stickerStoreDetail",
                        "thai": "stickerStoreDetail"
                    },
                    "stickerStoreImage": "fileName.png",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": {
                        "chi1": "stickerStoreName",
                        "chi2": "stickerStoreName",
                        "eng": "stickerStoreName",
                        "thai": "stickerStoreName"
                    },
                    "updated_at": "2018-08-31T04:32:53.031Z"
                },
                "stickerStoreId": "5bb75661cf7ae9e79e22de46"
            }
        ]
    },
    "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": "5bc898ad63998b1c041a9e85",
                "channelId": "5b3afe400837131c5579cf70",
                "createAt": "2018-10-18T14:29:01.1Z",
                "sendFromPlayerId": "5bb773fb68efd87103266964",
                "sendToMPlayerId": "5b4329f0bdfdd84f1f01c209",
                "stickerStore": {
                    "_id": "5bb75661cf7ae9e79e22de46",
                    "coin": 1,
                    "created_at": "2018-08-31T04:35:31.797Z",
                    "diamond": 0,
                    "isActive": true,
                    "stickerStoreDetail": {
                        "chi1": "stickerStoreDetail",
                        "chi2": "stickerStoreDetail",
                        "eng": "stickerStoreDetail",
                        "thai": "stickerStoreDetail"
                    },
                    "stickerStoreImage": "fileName.png",
                    "stickerStoreLevel": 1,
                    "stickerStoreName": {
                        "chi1": "stickerStoreName",
                        "chi2": "stickerStoreName",
                        "eng": "stickerStoreName",
                        "thai": "stickerStoreName"
                    },
                    "updated_at": "2018-08-31T04:32:53.031Z"
                },
                "stickerStoreId": "5bb75661cf7ae9e79e22de46"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.4 Add sticker to friend

POST /api/v1/sticker/toFriend

Json Body 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 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": 10,
        "pages": 1,
        "paging": {
            "next": "",
            "previous": ""
        },
        "stickers": [
            {
                "_id": "5bb75661cf7ae9e79e22de46",
                "coin": 1,
                "created_at": "2018-08-31T04:35:31.797Z",
                "diamond": 0,
                "isActive": true,
                "stickerStoreDetail": {
                    "chi1": "stickerStoreDetail",
                    "chi2": "stickerStoreDetail",
                    "eng": "stickerStoreDetail",
                    "thai": "stickerStoreDetail"
                },
                "stickerStoreImage": "fileName.png",
                "stickerStoreLevel": 1,
                "stickerStoreName": {
                    "chi1": "stickerStoreName",
                    "chi2": "stickerStoreName",
                    "eng": "stickerStoreName",
                    "thai": "stickerStoreName"
                },
                "updated_at": "2018-08-31T04:32:53.031Z"
            },
            {
                "_id": "5bc7b443fe13591498001f92",
                "coin": 2,
                "created_at": "2018-10-17T22:14:27Z",
                "diamond": 8,
                "isActive": true,
                "stickerStoreDetail": {
                    "chi1": "testt",
                    "chi2": "testt",
                    "eng": "testt",
                    "thai": "testt"
                },
                "stickerStoreImage": "xuDjIhgGYq.jpeg",
                "stickerStoreLavel": 8,
                "stickerStoreName": {
                    "chi1": "testt",
                    "chi2": "testt",
                    "eng": "testt",
                    "thai": "testt"
                },
                "updated_at": "2018-10-18T12:23:18Z"
            }
        ]
    },
    "isSuccess": true
}

[x] 4.6 Add sticker store (backend)

POST /api/v1/stickerStore/add

JSON body:

Field Description Optional Auth
stickerStoreName Name Eng of the sticker in the store No admin
stickerStoreDetail Sticker’s detail English 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": "5b88ba0baaea3c23c0688013",
        "coin": 1,
        "createAt": "2018-08-31T03:46:19.981Z",
        "diamon": 1,
        "diamond": 0,
        "isActive": true,
        "lastModified": "2018-08-31T04:16:59.001Z",
        "stickerStoreDetailChi1": "stickerStoreDetailChi1",
        "stickerStoreDetailChi2": "stickerStoreDetailChi2",
        "stickerStoreDetailEng": "stickerStoreDetailEng",
        "stickerStoreDetailThai": "stickerStoreDetailThai",
        "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
        "stickerStoreLevel": 1,
        "stickerStoreNameChi1": "stickerStoreNameChi1",
        "stickerStoreNameChi2": "stickerStoreNameChi2",
        "stickerStoreNameEng": "stickerStoreNameEng",
        "stickerStoreNameThai": "stickerStoreNameThai"
    },
    "isSuccess": true
}

[x] 4.7 Update sticker store (backend)

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

Query parameters:

Field Description Optional Auth
stickerStoreNameEng Name Eng of the sticker in the store No admin
stickerStoreNameThai Name Thai of the sticker in the store No admin
stickerStoreNameChi1 Name Chinese of the sticker in the store No admin
stickerStoreNameChi2 Name Chinese 2 of the sticker in the store No admin
stickerStoreDetailEng Sticker’s detail English Yes admin
stickerStoreDetailThai Sticker’s detail Thai Yes admin
stickerStoreDetailChi1 Sticker’s detail Chainese Yes admin
stickerStoreDetailChi2 Sticker’s detail Chainese 2 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": "5b88c593aaea3c37c4281948",
        "coin": 1,
        "createAt": "2018-08-31T04:35:31.797Z",
        "diamon": 1,
        "diamond": 0,
        "isActive": true,
        "lastModified": "2018-08-31T04:32:53.031Z",
        "stickerStoreDetailChi1": "stickerStoreDetailChi1",
        "stickerStoreDetailChi2": "stickerStoreDetailChi2",
        "stickerStoreDetailEng": "stickerStoreDetailEng",
        "stickerStoreDetailThai": "stickerStoreDetailThai",
        "stickerStoreImage": "https://vignette.wikia.nocookie.net/pokemon/images/d/df/158Totodile.png/revision/latest/scale-to-width-down/200?cb=20140329012507",
        "stickerStoreLevel": 1,
        "stickerStoreNameChi1": "stickerStoreName",
        "stickerStoreNameChi2": "stickerStoreName",
        "stickerStoreNameEng": "stickerStoreName",
        "stickerStoreNameThai": "stickerStoreName"
    },
    "isSuccess": true
}

Clone this wiki locally