forked from amy/hosted
Delete page "api"
parent
7d78968524
commit
2a3155ebca
1 changed files with 0 additions and 526 deletions
526
api.md
526
api.md
|
@ -1,526 +0,0 @@
|
|||
<!-- Generator: Widdershins v4.0.1 -->
|
||||
|
||||
<h1 id="personal-web-services-api">Personal Web Services API v1.0.0</h1>
|
||||
|
||||
> 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
|
||||
|
||||
<h1 id="personal-web-services-api-discord-lookup">Discord Lookup</h1>
|
||||
|
||||
Discord user information lookup service
|
||||
|
||||
## Look up Discord user information
|
||||
|
||||
`GET /v1/user/{userId}`
|
||||
|
||||
Retrieves information about a Discord user using their ID
|
||||
|
||||
<h3 id="look-up-discord-user-information-parameters">Parameters</h3>
|
||||
|
||||
|Name|In|Type|Required|Description|
|
||||
|---|---|---|---|---|
|
||||
|userId|path|string|true|none|
|
||||
|
||||
> Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<h3 id="look-up-discord-user-information-responses">Responses</h3>
|
||||
|
||||
|Status|Meaning|Description|Schema|
|
||||
|---|---|---|---|
|
||||
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful response with user information|[DiscordUser](#schemadiscorduser)|
|
||||
|
||||
<aside class="success">
|
||||
This operation does not require authentication
|
||||
</aside>
|
||||
|
||||
<h1 id="personal-web-services-api-review-system">Review System</h1>
|
||||
|
||||
Backend review system for website
|
||||
|
||||
## Get reviews
|
||||
|
||||
`GET /getreviews`
|
||||
|
||||
Retrieves reviews from the backend review system
|
||||
|
||||
> Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"reviewID": 1,
|
||||
"discordID": "712653921692155965",
|
||||
"reviewText": "meow",
|
||||
"timestamp": "1708902649485"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
<h3 id="get-reviews-responses">Responses</h3>
|
||||
|
||||
|Status|Meaning|Description|Schema|
|
||||
|---|---|---|---|
|
||||
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Successful response with reviews|Inline|
|
||||
|
||||
<h3 id="get-reviews-responseschema">Response Schema</h3>
|
||||
|
||||
Status Code **200**
|
||||
|
||||
|Name|Type|Required|Restrictions|Description|
|
||||
|---|---|---|---|---|
|
||||
|*anonymous*|[[Review](#schemareview)]|false|none|none|
|
||||
|» reviewID|integer|false|none|none|
|
||||
|» discordID|string|false|none|none|
|
||||
|» reviewText|string|false|none|none|
|
||||
|» timestamp|string|false|none|none|
|
||||
|
||||
<aside class="success">
|
||||
This operation does not require authentication
|
||||
</aside>
|
||||
|
||||
<h1 id="personal-web-services-api-song-link-cache">Song Link Cache</h1>
|
||||
|
||||
Cached proxy for song.link API
|
||||
|
||||
## Get cached song.link data
|
||||
|
||||
`GET /`
|
||||
|
||||
Cached proxy for song.link API responses with CORS support
|
||||
|
||||
<h3 id="get-cached-song.link-data-parameters">Parameters</h3>
|
||||
|
||||
|Name|In|Type|Required|Description|
|
||||
|---|---|---|---|---|
|
||||
|url|query|string|true|Encoded song URL or identifier|
|
||||
|
||||
> Example responses
|
||||
|
||||
> 200 Response
|
||||
|
||||
```json
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<h3 id="get-cached-song.link-data-responses">Responses</h3>
|
||||
|
||||
|Status|Meaning|Description|Schema|
|
||||
|---|---|---|---|
|
||||
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Cached song.link response|[SongLinkResponse](#schemasonglinkresponse)|
|
||||
|
||||
<aside class="success">
|
||||
This operation does not require authentication
|
||||
</aside>
|
||||
|
||||
# Schemas
|
||||
|
||||
<h2 id="tocS_DiscordUser">DiscordUser</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemadiscorduser"></a>
|
||||
<a id="schema_DiscordUser"></a>
|
||||
<a id="tocSdiscorduser"></a>
|
||||
<a id="tocsdiscorduser"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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](#schemadiscordavatar)|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](#schemadiscordbanner)|false|none|none|
|
||||
|raw|[DiscordRawData](#schemadiscordrawdata)|false|none|none|
|
||||
|
||||
<h2 id="tocS_DiscordAvatar">DiscordAvatar</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemadiscordavatar"></a>
|
||||
<a id="schema_DiscordAvatar"></a>
|
||||
<a id="tocSdiscordavatar"></a>
|
||||
<a id="tocsdiscordavatar"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
||||
<h2 id="tocS_DiscordBanner">DiscordBanner</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemadiscordbanner"></a>
|
||||
<a id="schema_DiscordBanner"></a>
|
||||
<a id="tocSdiscordbanner"></a>
|
||||
<a id="tocsdiscordbanner"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
||||
<h2 id="tocS_DiscordRawData">DiscordRawData</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemadiscordrawdata"></a>
|
||||
<a id="schema_DiscordRawData"></a>
|
||||
<a id="tocSdiscordrawdata"></a>
|
||||
<a id="tocsdiscordrawdata"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
||||
<h2 id="tocS_Review">Review</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemareview"></a>
|
||||
<a id="schema_Review"></a>
|
||||
<a id="tocSreview"></a>
|
||||
<a id="tocsreview"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
||||
<h2 id="tocS_SongLinkResponse">SongLinkResponse</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemasonglinkresponse"></a>
|
||||
<a id="schema_SongLinkResponse"></a>
|
||||
<a id="tocSsonglinkresponse"></a>
|
||||
<a id="tocssonglinkresponse"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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](#schemasongentity)|false|none|none|
|
||||
|linksByPlatform|object|false|none|none|
|
||||
|» **additionalProperties**|[PlatformLink](#schemaplatformlink)|false|none|none|
|
||||
|
||||
<h2 id="tocS_SongEntity">SongEntity</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemasongentity"></a>
|
||||
<a id="schema_SongEntity"></a>
|
||||
<a id="tocSsongentity"></a>
|
||||
<a id="tocssongentity"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
||||
<h2 id="tocS_PlatformLink">PlatformLink</h2>
|
||||
<!-- backwards compatibility -->
|
||||
<a id="schemaplatformlink"></a>
|
||||
<a id="schema_PlatformLink"></a>
|
||||
<a id="tocSplatformlink"></a>
|
||||
<a id="tocsplatformlink"></a>
|
||||
|
||||
```json
|
||||
{
|
||||
"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|
|
||||
|
Loading…
Reference in a new issue