5 api
GitLGBT Action edited this page 2024-10-26 20:56:16 +00:00

Personal Web Services API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Documentation for various web services hosted under mono.exhq.dev

Discord Lookup

Discord user information lookup service

Look up Discord user information

GET /v1/user/{userId}

Retrieves information about a Discord user using their ID

Parameters

Name In Type Required Description
userId path string true none

Example responses

200 Response

{
  "id": "712639419785412668",
  "created_at": "2020-05-20T12:14:37.877Z",
  "username": "exhq",
  "avatar": {
    "id": "93dd1fc1629fb1ec652c68203af4f3f1",
    "link": "https://cdn.discordapp.com/avatars/712639419785412668/93dd1fc1629fb1ec652c68203af4f3f1",
    "is_animated": false
  },
  "avatar_decoration": null,
  "badges": [
    "HOUSE_BALANCE"
  ],
  "accent_color": null,
  "global_name": "ECHO 🐈",
  "banner": {
    "id": null,
    "link": null,
    "is_animated": false,
    "color": null
  },
  "raw": {
    "id": "712639419785412668",
    "username": "exhq",
    "avatar": "93dd1fc1629fb1ec652c68203af4f3f1",
    "discriminator": "0",
    "public_flags": 256,
    "flags": 256,
    "banner": null,
    "accent_color": null,
    "global_name": "ECHO 🐈",
    "avatar_decoration_data": null,
    "banner_color": null,
    "clan": null
  }
}

Responses

Status Meaning Description Schema
200 OK Successful response with user information DiscordUser

Review System

Backend review system for website

Get reviews

GET /getreviews

Retrieves reviews from the backend review system

Example responses

200 Response

[
  {
    "reviewID": 1,
    "discordID": "712653921692155965",
    "reviewText": "meow",
    "timestamp": "1708902649485"
  }
]

Responses

Status Meaning Description Schema
200 OK Successful response with reviews Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Review] false none none
» reviewID integer false none none
» discordID string false none none
» reviewText string false none none
» timestamp string false none none

Song Link Cache

Cached proxy for song.link API

GET /

Cached proxy for song.link API responses with CORS support

Name In Type Required Description
url query string true Encoded song URL or identifier

Example responses

200 Response

{
  "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
  "userCountry": "US",
  "pageUrl": "https://song.link/s/6BJHsLiE47Sk0wQkuppqhr",
  "entitiesByUniqueId": {
    "property1": {
      "id": "6BJHsLiE47Sk0wQkuppqhr",
      "type": "song",
      "title": "From the Start",
      "artistName": "Good Kid",
      "thumbnailUrl": "https://i.scdn.co/image/ab67616d0000b273e67835d0a5d81fa4f268b513",
      "thumbnailWidth": 640,
      "thumbnailHeight": 640,
      "apiProvider": "spotify",
      "platforms": [
        "spotify"
      ]
    },
    "property2": {
      "id": "6BJHsLiE47Sk0wQkuppqhr",
      "type": "song",
      "title": "From the Start",
      "artistName": "Good Kid",
      "thumbnailUrl": "https://i.scdn.co/image/ab67616d0000b273e67835d0a5d81fa4f268b513",
      "thumbnailWidth": 640,
      "thumbnailHeight": 640,
      "apiProvider": "spotify",
      "platforms": [
        "spotify"
      ]
    }
  },
  "linksByPlatform": {
    "property1": {
      "country": "US",
      "url": "https://open.spotify.com/track/6BJHsLiE47Sk0wQkuppqhr",
      "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriMobile": "spotify:track:6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriDesktop": "spotify:track:6BJHsLiE47Sk0wQkuppqhr"
    },
    "property2": {
      "country": "US",
      "url": "https://open.spotify.com/track/6BJHsLiE47Sk0wQkuppqhr",
      "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriMobile": "spotify:track:6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriDesktop": "spotify:track:6BJHsLiE47Sk0wQkuppqhr"
    }
  }
}
Status Meaning Description Schema
200 OK Cached song.link response SongLinkResponse

Schemas

DiscordUser

{
  "id": "712639419785412668",
  "created_at": "2020-05-20T12:14:37.877Z",
  "username": "exhq",
  "avatar": {
    "id": "93dd1fc1629fb1ec652c68203af4f3f1",
    "link": "https://cdn.discordapp.com/avatars/712639419785412668/93dd1fc1629fb1ec652c68203af4f3f1",
    "is_animated": false
  },
  "avatar_decoration": null,
  "badges": [
    "HOUSE_BALANCE"
  ],
  "accent_color": null,
  "global_name": "ECHO 🐈",
  "banner": {
    "id": null,
    "link": null,
    "is_animated": false,
    "color": null
  },
  "raw": {
    "id": "712639419785412668",
    "username": "exhq",
    "avatar": "93dd1fc1629fb1ec652c68203af4f3f1",
    "discriminator": "0",
    "public_flags": 256,
    "flags": 256,
    "banner": null,
    "accent_color": null,
    "global_name": "ECHO 🐈",
    "avatar_decoration_data": null,
    "banner_color": null,
    "clan": null
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
created_at string(date-time) false none none
username string false none none
avatar DiscordAvatar false none none
avatar_decoration string¦null false none none
badges [string] false none none
accent_color string¦null false none none
global_name string false none none
banner DiscordBanner false none none
raw DiscordRawData false none none

DiscordAvatar

{
  "id": "93dd1fc1629fb1ec652c68203af4f3f1",
  "link": "https://cdn.discordapp.com/avatars/712639419785412668/93dd1fc1629fb1ec652c68203af4f3f1",
  "is_animated": false
}

Properties

Name Type Required Restrictions Description
id string false none none
link string false none none
is_animated boolean false none none

DiscordBanner

{
  "id": null,
  "link": null,
  "is_animated": false,
  "color": null
}

Properties

Name Type Required Restrictions Description
id string¦null false none none
link string¦null false none none
is_animated boolean false none none
color string¦null false none none

DiscordRawData

{
  "id": "712639419785412668",
  "username": "exhq",
  "avatar": "93dd1fc1629fb1ec652c68203af4f3f1",
  "discriminator": "0",
  "public_flags": 256,
  "flags": 256,
  "banner": null,
  "accent_color": null,
  "global_name": "ECHO 🐈",
  "avatar_decoration_data": null,
  "banner_color": null,
  "clan": null
}

Properties

Name Type Required Restrictions Description
id string false none none
username string false none none
avatar string false none none
discriminator string false none none
public_flags integer false none none
flags integer false none none
banner string¦null false none none
accent_color string¦null false none none
global_name string false none none
avatar_decoration_data string¦null false none none
banner_color string¦null false none none
clan string¦null false none none

Review

{
  "reviewID": 1,
  "discordID": "712653921692155965",
  "reviewText": "meow",
  "timestamp": "1708902649485"
}

Properties

Name Type Required Restrictions Description
reviewID integer false none none
discordID string false none none
reviewText string false none none
timestamp string false none none

SongLinkResponse

{
  "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
  "userCountry": "US",
  "pageUrl": "https://song.link/s/6BJHsLiE47Sk0wQkuppqhr",
  "entitiesByUniqueId": {
    "property1": {
      "id": "6BJHsLiE47Sk0wQkuppqhr",
      "type": "song",
      "title": "From the Start",
      "artistName": "Good Kid",
      "thumbnailUrl": "https://i.scdn.co/image/ab67616d0000b273e67835d0a5d81fa4f268b513",
      "thumbnailWidth": 640,
      "thumbnailHeight": 640,
      "apiProvider": "spotify",
      "platforms": [
        "spotify"
      ]
    },
    "property2": {
      "id": "6BJHsLiE47Sk0wQkuppqhr",
      "type": "song",
      "title": "From the Start",
      "artistName": "Good Kid",
      "thumbnailUrl": "https://i.scdn.co/image/ab67616d0000b273e67835d0a5d81fa4f268b513",
      "thumbnailWidth": 640,
      "thumbnailHeight": 640,
      "apiProvider": "spotify",
      "platforms": [
        "spotify"
      ]
    }
  },
  "linksByPlatform": {
    "property1": {
      "country": "US",
      "url": "https://open.spotify.com/track/6BJHsLiE47Sk0wQkuppqhr",
      "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriMobile": "spotify:track:6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriDesktop": "spotify:track:6BJHsLiE47Sk0wQkuppqhr"
    },
    "property2": {
      "country": "US",
      "url": "https://open.spotify.com/track/6BJHsLiE47Sk0wQkuppqhr",
      "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriMobile": "spotify:track:6BJHsLiE47Sk0wQkuppqhr",
      "nativeAppUriDesktop": "spotify:track:6BJHsLiE47Sk0wQkuppqhr"
    }
  }
}

Properties

Name Type Required Restrictions Description
entityUniqueId string false none none
userCountry string false none none
pageUrl string false none none
entitiesByUniqueId object false none none
» additionalProperties SongEntity false none none
linksByPlatform object false none none
» additionalProperties PlatformLink false none none

SongEntity

{
  "id": "6BJHsLiE47Sk0wQkuppqhr",
  "type": "song",
  "title": "From the Start",
  "artistName": "Good Kid",
  "thumbnailUrl": "https://i.scdn.co/image/ab67616d0000b273e67835d0a5d81fa4f268b513",
  "thumbnailWidth": 640,
  "thumbnailHeight": 640,
  "apiProvider": "spotify",
  "platforms": [
    "spotify"
  ]
}

Properties

Name Type Required Restrictions Description
id string false none none
type string false none none
title string false none none
artistName string false none none
thumbnailUrl string false none none
thumbnailWidth integer false none none
thumbnailHeight integer false none none
apiProvider string false none none
platforms [string] false none none
{
  "country": "US",
  "url": "https://open.spotify.com/track/6BJHsLiE47Sk0wQkuppqhr",
  "entityUniqueId": "SPOTIFY_SONG::6BJHsLiE47Sk0wQkuppqhr",
  "nativeAppUriMobile": "spotify:track:6BJHsLiE47Sk0wQkuppqhr",
  "nativeAppUriDesktop": "spotify:track:6BJHsLiE47Sk0wQkuppqhr"
}

Properties

Name Type Required Restrictions Description
country string false none none
url string false none none
entityUniqueId string false none none
nativeAppUriMobile string false none none
nativeAppUriDesktop string false none none