mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 15:30:05 +00:00
559 lines
13 KiB
JSON
559 lines
13 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "osu_music.proto",
|
|
"version": "version not set"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "MusicBackend"
|
|
}
|
|
],
|
|
"consumes": ["application/json"],
|
|
"produces": ["application/json"],
|
|
"paths": {
|
|
"/api/v1/artist/{artist}": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Artist",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1ArtistResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "artist",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/collections": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Collections",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1CollectionResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/favorites": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Favorite",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1FavoriteResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "query",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/recent": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Recent",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1RecentResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/search": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Search",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1SearchSharedResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "query",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/search/artists": {
|
|
"get": {
|
|
"operationId": "MusicBackend_SearchArtists",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1SearchArtistResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "query",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/search/collections": {
|
|
"get": {
|
|
"operationId": "MusicBackend_SearchCollections",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1SearchCollectionResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "query",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/api/v1/song/{hash}": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Song",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1SongResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "hash",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
},
|
|
"/ping": {
|
|
"get": {
|
|
"operationId": "MusicBackend_Ping",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1PingResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "ping",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": ["MusicBackend"]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"apiv1Artist": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artist": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"apiv1Song": {
|
|
"type": "object",
|
|
"properties": {
|
|
"beatmapId": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"md5Hash": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"artist": {
|
|
"type": "string"
|
|
},
|
|
"creator": {
|
|
"type": "string"
|
|
},
|
|
"folder": {
|
|
"type": "string"
|
|
},
|
|
"file": {
|
|
"type": "string"
|
|
},
|
|
"audio": {
|
|
"type": "string"
|
|
},
|
|
"totalTime": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "===== models ====="
|
|
},
|
|
"protobufAny": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": {}
|
|
},
|
|
"rpcStatus": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/protobufAny"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1ArtistResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"songs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1CollectionPreview": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"v1CollectionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"songs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1FavoriteResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"songs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1PingResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pong": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1RecentResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"songs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1SearchArtistResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Artists": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Artist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1SearchCollectionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"collections": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/v1CollectionPreview"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1SearchSharedResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"artist": {
|
|
"type": "string"
|
|
},
|
|
"songs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1SongResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"song": {
|
|
"$ref": "#/definitions/apiv1Song"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|