Skip to content

Latest commit

 

History

History
224 lines (198 loc) · 5.66 KB

follow.md

File metadata and controls

224 lines (198 loc) · 5.66 KB

Follow API Documentation

🔒 GET Get Following

Get list of following from user

Resource URL

/api/v2/follow/get_following

Parameters
  • id_user optional User whose following. Default active user
  • limit optional Limit list of following. Default 20
  • offset .optional Offset list of following. Default 0
Sample Request
curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/get_following
Sample Response
{
    "status": 1,
    "count": 2,
    "follower": [
        {
            "avatar": null,
            "name": "null",
            "id": "304",
            "following": 1
        },
        {
            "avatar": "2655.jpg",
            "name": "imelyaa",
            "id": "2655",
            "following": 1
        }
    ]
}

🔒 GET Get Follower

Get list of follower from user

Resource URL

/api/v2/follow/get_follower

Parameters
  • id_user optional User whose follow by other user. Default active user
  • limit optional Limit list of follower. Default 20
  • offset .optional Offset list of follower. Default 0
Sample Request
curl -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/get_follower?id_user=1
Sample Response
{
    "status": 1,
    "count": 15,
    "follower": [
        {
            "avatar": null,
            "name": "",
            "id": "344",
            "following": 0
        },
        {
            "avatar": null,
            "name": "",
            "id": "372",
            "following": 0
        },
        {
            "avatar": null,
            "name": "",
            "id": "388",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "615",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "666",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "672",
            "following": 0
        },
        {
            "avatar": null,
            "name": "putra",
            "id": "687",
            "following": 0
        },
        {
            "avatar": null,
            "name": "wek",
            "id": "688",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "715",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "719",
            "following": 0
        },
        {
            "avatar": null,
            "name": "aku",
            "id": "828",
            "following": 0
        },
        {
            "avatar": null,
            "name": "putra",
            "id": "2617",
            "following": 0
        },
        {
            "avatar": null,
            "name": "afi",
            "id": "2621",
            "following": 0
        },
        {
            "avatar": null,
            "name": "",
            "id": "2695",
            "following": 0
        },
        {
            "avatar": null,
            "name": "[email protected]",
            "id": "2743",
            "following": 0
        }
    ]
}

🔒 POST Follow

Follow another user

Resource URL

/api/v2/follow/set_follow

Parameters
  • id_user required User who want to follow. Use this if you have only one user to follow.
  • user required Array ser who want to follow. Use this if you have multiple user to follow.
Sample Request
curl -X POST --data "user[]=5&user[]=4" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/set_follow
Sample Response
{
    "status": 1
}

🔒 POST Unfollow

Unfollow another user

Resource URL

/api/v2/follow/set_unfollow

Parameters
  • id_user required User who want to follow. type integer
Sample Request
curl -X POST --data "id_user=4" -H "X-API-KEY: 4974328ce522a3eb86ecf73a193490314cf98c74" http://shoop.dev/api/v2/follow/set_unfollow
Sample Response
{
    "status": 1
}