Skip to content

Social Media Engagement API Documentation

Ganesh Prasad Kumble edited this page Apr 24, 2023 · 5 revisions

Wiki for the Social Media Engagement API

Get the user's engagement level from Twitter

Request:
GET https://qa-sm.moinet.io/api/v1/engagement/twitter/<USERNAME OR ID>

Response:

{
    "status": "OK",
    "data": {
        "id": "1",
        "level": 7
    }
}

Get the user's engagement level from Telegram

Request:
GET https://qa-sm.moinet.io/api/v1/engagement/telegram/<USERNAME OR ID>

Response:

{
    "status": "OK",
    "data": {
        "id": "3",
        "level": 10
    }
}

Get the user's engagement level from Discord

Request:
GET https://qa-sm.moinet.io/api/v1/engagement/discord/<USERNAME OR ID>

Response:

{
    "status": "OK",
    "data": {
        "id": "19",
        "level": 3
    }
}

Scenarios and response codes

  • A good request generally leads to a HTTP Status 200.
  • However, in the case of invalid request data, the response leads to a HTTP Status 400 with an error message.
  • Invalid routes will result in HTTP Status 404.
  • Level value nested in the response is always expected to range from 0 to an unsigned finite number. Nevertheless, we only consider levels upto 10 while calculating points.
  • If the username is not found in the DB or does not have enough XPs, expect the API to return the value 0.