Skip to content

API Documentation

kakajuro edited this page Aug 30, 2024 · 2 revisions

Install

Used to create a clientID and uninstallKey when the user installs the extension

Requires authorisation

GET /api/install

Response:

{
  "clientID": "example-client-id"
  "uninstallKey": "example-uninstall-key"
}

Uninstall

Handles data being removed when the extension is uninstalled

Requires authorisation

GET /api/uninstall

Response:

{
  "message": "Extension uninstalled sucessfully"
}

Get Stats

Get the global stats for the extension

GET /api/stats Response:

{
    "removeAdCompanionSlots": 999,
    "removeAdsFromReccomendations": 999,
    "removeFeaturedBanners": 999,
    "removeForYouFromChannel": 999,
    "removeForYouFromSearch": 999,
    "removeFromRelatedSearches": 999,
    "removeLatestPostsFromSearch": 999,
    "removeLatestVideosFromSearch": 999,
    "removeNewChannelsFromSearch": 999,
    "removeNews": 999,
    "removePeopleAlsoSearchFor": 999,
    "removePeopleAlsoWatchedFromSearch": 999,
    "removePopups": 999,
    "removePreviouslyWatchedFromSearch": 999,
    "removeShortsExplore": 999,
    "removeShortsFromChannel": 999,
    "removeShortsFromSearch": 999,
    "removeShortsPlayback": 999,
    "removeShortsRemixingThisVideo": 999,
    "removeShortsWhileWatching": 999
}

Update Stats

Update the stats store

Requires authorisation

POST /api/updateStats

Body Type Description
incomingStats Object Required. Data to update the stats store

Request body example:

  {
    "message": "Stats updated sucessfully"
  }

Response:

  {
    "removeAdCompanionSlots": 999,
    "removeAdsFromReccomendations": 999,
    "removeFeaturedBanners": 999,
    "removeForYouFromChannel": 999,
    "removeForYouFromSearch": 999,
    "removeFromRelatedSearches": 999,
    "removeLatestPostsFromSearch": 999,
    "removeLatestVideosFromSearch": 999,
    "removeNewChannelsFromSearch": 999,
    "removeNews": 999,
    "removePeopleAlsoSearchFor": 999,
    "removePeopleAlsoWatchedFromSearch": 999,
    "removePopups": 999,
    "removePreviouslyWatchedFromSearch": 999,
    "removeShortsExplore": 999,
    "removeShortsFromChannel": 999,
    "removeShortsFromSearch": 999,
    "removeShortsPlayback": 999,
    "removeShortsRemixingThisVideo": 999,
    "removeShortsWhileWatching": 999
  }

me

Gets the information about the user from a given client ID. Used to verify the existence of a user primarily. Returns the timestamp of the user's install and the number of their install. E.g. the 505th install will get the install no 505

GET /api/me

Request body example:

  {
    "clientID": "example-client-id"
  }

Response:

  {
    "timestamp": 1713622800,
    "installNo": 420
  }
Clone this wiki locally