Add initial rest client files

This commit is contained in:
jeffvli
2022-10-12 13:31:23 -07:00
parent dd6b80795e
commit 9d09b830f9
8 changed files with 236 additions and 0 deletions
+17
View File
@@ -26,5 +26,22 @@
"test/**/__snapshots__": true,
"package-lock.json": true,
"*.{css,sass,scss}.d.ts": true
},
"rest-client.environmentVariables": {
"$shared": {
"host": "http://localhost:9321"
},
"dev-user": {
"token": "",
"refreshToken": "",
"authUsername": "user",
"authPassword": "user"
},
"dev-admin": {
"token": "",
"refreshToken": "",
"authUsername": "admin",
"authPassword": "admin"
}
}
}
+22
View File
@@ -0,0 +1,22 @@
@serverId =
@albumArtistId =
###
# skip: The number of rows to skip before returning rows. Must be a non-negative integer.
# take: The number of rows to return. Must be a non-negative integer.
# orderBy: asc | desc
# sortBy: date_added | date_added_remote | date_released | random | rating | title | year
GET {{host}}/api/servers/{{serverId}}/albumArtists
?skip=0
&take=100
&sortBy=title
&orderBy=desc
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}/albumArtists/{{albumArtistId}}
Content-Type: application/json
Authorization: Bearer {{token}}
+22
View File
@@ -0,0 +1,22 @@
@serverId =
@albumId =
###
# skip: The number of rows to skip before returning rows. Must be a non-negative integer.
# take: The number of rows to return. Must be a non-negative integer.
# orderBy: asc | desc
# sortBy: date_added | date_added_remote | date_released | random | rating | title | year
GET {{host}}/api/servers/{{serverId}}/albums
?skip=0
&take=100
&sortBy=title
&orderBy=desc
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}/albums/{{albumId}}
Content-Type: application/json
Authorization: Bearer {{token}}
+22
View File
@@ -0,0 +1,22 @@
@serverId =
@artistId =
###
# skip: The number of rows to skip before returning rows. Must be a non-negative integer.
# take: The number of rows to return. Must be a non-negative integer.
# orderBy: asc | desc
# sortBy: date_added | date_added_remote | date_released | random | rating | title | year
GET {{host}}/api/servers/{{serverId}}/artists
?skip=0
&take=100
&sortBy=title
&orderBy=desc
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}/artists/{{artistId}}
Content-Type: application/json
Authorization: Bearer {{token}}
+52
View File
@@ -0,0 +1,52 @@
###
POST {{host}}/api/auth/login
Content-Type: application/json
{
"username": "{{authUsername}}",
"password": "{{authPassword}}"
}
###
POST {{host}}/api/auth/logout
Content-Type: application/json
Authorization: {{token}}
{
"username": "{{authUsername}}",
"password": "{{authPassword}}"
}
###
POST {{host}}/api/auth/refresh
Content-Type: application/json
{
"refreshToken": "{{refreshToken}}"
}
###
# @prompt username Login username
# @prompt password Login password
POST {{host}}/api/auth/register
Content-Type: application/json
{
"username": "{{username}}",
"password": "{{password}}"
}
###
GET {{host}}/api/auth/ping
Content-Type: application/json
@contentType = application/json
@serverId =
+66
View File
@@ -0,0 +1,66 @@
@serverId =
###
GET {{host}}/api/servers
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}/folder
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}/refresh
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/servers/{{serverId}}
Content-Type: application/json
Authorization: Bearer {{token}}
###
# name: Nickname for the server
# type: SUBSONIC | JELLYFIN | NAVIDROME
# url: The URL of the server e.g. http://192.168.1.1:8096
# @prompt username The user which will be used to login and scan from the server
# @prompt password The password for the user
POST {{host}}/api/servers/
Content-Type: application/json
Authorization: Bearer {{token}}
{
"name": "My Jellyfin Server",
"type": "JELLYFIN",
"url": "http://192.168.14.11:8097",
"username": "{{username}}",
"password": "{{password}}"
}
###
POST {{host}}/api/servers/{{serverId}}/scan
Content-Type: application/json
Authorization: Bearer {{token}}
{
"serverFolderIds": [""]
}
+14
View File
@@ -0,0 +1,14 @@
@serverId =
###
# skip: The number of rows to skip before returning rows. Must be a non-negative integer.
# take: The number of rows to return. Must be a non-negative integer.
# orderBy: asc | desc
# sortBy: date_added | date_added_remote | date_released | random | rating | title | year
GET {{host}}/api/servers/{{serverId}}/songs
?skip=0
&take=100
&sortBy=title
&orderBy=desc
Content-Type: application/json
Authorization: Bearer {{token}}
+21
View File
@@ -0,0 +1,21 @@
@userId =
###
# skip: The number of rows to skip before returning rows. Must be a non-negative integer.
# take: The number of rows to return. Must be a non-negative integer.
# orderBy: asc | desc
# sortBy: date_added | date_added_remote | date_released | random | rating | title | year
GET {{host}}/api/users
?skip=0
&take=100
&sortBy=title
&orderBy=desc
Content-Type: application/json
Authorization: Bearer {{token}}
###
GET {{host}}/api/users/{{userId}}
Content-Type: application/json
Authorization: Bearer {{token}}