You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
podgrab/docs/swagger.json

294 lines
8.9 KiB

{
"swagger": "2.0",
"info": {
"description": "This is the api documentation for Podgrab.",
"title": "Podgrab API",
"contact": {
"name": "Podgrab Github",
"url": "https://www.github.com/akhilrex/podgrab"
},
"version": "1.0"
},
"paths": {
"/podcasts": {
"get": {
"description": "Get all Podcasts",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get all Podcasts",
"operationId": "get-all-podcasts",
"parameters": [
{
"type": "string",
"description": "Sort by property",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "Sort by asc/desc",
"name": "order",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/db.Podcast"
}
}
}
}
}
},
"/podcasts/{id}": {
"get": {
"description": "Get single podcast by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Get single podcast by ID",
"operationId": "get-podcast-by-id",
"parameters": [
{
"type": "string",
"description": "Podcast id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/db.Podcast"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"delete": {
"description": "Delete single podcast by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Delete single podcast by ID",
"operationId": "delete-podcast-by-id",
"parameters": [
{
"type": "string",
"description": "Podcast id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
},
"definitions": {
"db.Podcast": {
"type": "object",
"properties": {
"allEpisodesCount": {
"type": "integer"
},
"author": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"deletedAt": {
"type": "string"
},
"downloadedEpisodesCount": {
"type": "integer"
},
"downloadingEpisodesCount": {
"type": "integer"
},
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"lastEpisode": {
"type": "string"
},
"podcastItems": {
"type": "array",
"items": {
"$ref": "#/definitions/db.PodcastItem"
}
},
"summary": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"$ref": "#/definitions/db.Tag"
}
},
"title": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"db.PodcastItem": {
"type": "object",
"properties": {
"bookmarkDate": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"deletedAt": {
"type": "string"
},
"downloadDate": {
"type": "string"
},
"downloadPath": {
"type": "string"
},
"downloadStatus": {
"type": "integer"
},
"duration": {
"type": "integer"
},
"episodeType": {
"type": "string"
},
"fileURL": {
"type": "string"
},
"guid": {
"type": "string"
},
"id": {
"type": "string"
},
"image": {
"type": "string"
},
"isPlayed": {
"type": "boolean"
},
"localImage": {
"type": "string"
},
"podcast": {
"$ref": "#/definitions/db.Podcast"
},
"podcastID": {
"type": "string"
},
"pubDate": {
"type": "string"
},
"summary": {
"type": "string"
},
"title": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
}
},
"db.Tag": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"deletedAt": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"podcasts": {
"type": "array",
"items": {
"$ref": "#/definitions/db.Podcast"
}
},
"updatedAt": {
"type": "string"
}
}
}
}
}