{
  "openapi": "3.0.1",
  "info": {
    "title": "StreamUP API",
    "description": "General-purpose API powering several StreamUP.Tips products",
    "contact": {
      "name": "StreamUP.tips",
      "url": "https://streamup.tips",
      "email": ""
    },
    "version": "v1"
  },
  "paths": {
    "/cardsAgainstHumanity/black": {
      "get": {
        "tags": [
          "CardsAgainstHumanity"
        ],
        "summary": "Gets a 'black' Cards Against Humanity card.",
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/cardsAgainstHumanity/white": {
      "get": {
        "tags": [
          "CardsAgainstHumanity"
        ],
        "summary": "Gets a 'white' Cards Against Humanity card.",
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/feedback/submit": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "summary": "Submit product feedback.",
        "requestBody": {
          "description": "The feedback request.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Feedback submitted successfully."
          },
          "400": {
            "description": "Invalid input."
          }
        }
      }
    },
    "/game": {
      "get": {
        "tags": [
          "GameBoxArt"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/general/datetime": {
      "get": {
        "tags": [
          "GeneralPurpose"
        ],
        "summary": "Get ISO 8601 compliant DateTime information.",
        "parameters": [
          {
            "name": "input",
            "in": "query",
            "description": "The DateTime input to be parsed.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation."
          },
          "400": {
            "description": "Invalid input."
          }
        }
      }
    },
    "/general/googleFonts": {
      "get": {
        "tags": [
          "GeneralPurpose"
        ],
        "summary": "Get an array of google fonts that are available",
        "responses": {
          "200": {
            "description": "Successful operation."
          }
        }
      }
    },
    "/joke/cow": {
      "get": {
        "tags": [
          "Joke"
        ],
        "summary": "Gets a random cow related joke.",
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input / No available words."
          }
        }
      }
    },
    "/plugins": {
      "get": {
        "tags": [
          "Plugin"
        ],
        "summary": "Gets the information of OBS Studio Plugins",
        "responses": {
          "200": {
            "description": "Successful operation."
          }
        }
      }
    },
    "/pokemon/index/{pokedexNumber}": {
      "get": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Gets a Pokémon by index.",
        "parameters": [
          {
            "name": "pokedexNumber",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language of the Pokémon name and Pokedex descriptions",
            "schema": {
              "enum": [
                "cs",
                "de",
                "en",
                "es",
                "fr",
                "it",
                "ja",
                "ja-Hrkt",
                "ko",
                "pt-BR",
                "roomaji",
                "zh-Hans",
                "zh-Hant"
              ],
              "type": "string",
              "default": "en"
            }
          },
          {
            "name": "shinyChance",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pokemon"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "400": {
            "description": "Invalid input / No available words."
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ]
      }
    },
    "/pokemon/name/{englishName}": {
      "get": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Gets a Pokémon by name.",
        "parameters": [
          {
            "name": "englishName",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language of the Pokémon name and Pokedex descriptions",
            "schema": {
              "enum": [
                "cs",
                "de",
                "en",
                "es",
                "fr",
                "it",
                "ja",
                "ja-Hrkt",
                "ko",
                "pt-BR",
                "roomaji",
                "zh-Hans",
                "zh-Hant"
              ],
              "type": "string",
              "default": "en"
            }
          },
          {
            "name": "shinyChance",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pokemon"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "400": {
            "description": "Invalid input / No available words."
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ]
      }
    },
    "/pokemon/random": {
      "get": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Gets a random Pokémon.",
        "parameters": [
          {
            "name": "generation",
            "in": "query",
            "description": "The latest generation of which to return a Pokémon.",
            "schema": {
              "enum": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8
              ],
              "type": "integer",
              "format": "int32",
              "default": 2
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language of the Pokémon name and Pokedex descriptions",
            "schema": {
              "enum": [
                "cs",
                "de",
                "en",
                "es",
                "fr",
                "it",
                "ja",
                "ja-Hrkt",
                "ko",
                "pt-BR",
                "roomaji",
                "zh-Hans",
                "zh-Hant"
              ],
              "type": "string",
              "default": "en"
            }
          },
          {
            "name": "shinyChance",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pokemon"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "400": {
            "description": "Invalid input / No available words."
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ]
      }
    },
    "/pokemon/pokedex/{streamerId}": {
      "get": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Gets a streamer's Pokédex.",
        "parameters": [
          {
            "name": "streamerId",
            "in": "path",
            "description": "The channelId of the streamer.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pokemon"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input."
          }
        }
      }
    },
    "/pokemon/pokedex": {
      "delete": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Deletes a streamer's Pokédex.",
        "responses": {
          "204": {
            "description": "Successful operation."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ]
      }
    },
    "/pokemon/catch": {
      "post": {
        "tags": [
          "Pokemon"
        ],
        "summary": "Post a Pokémon catch request.",
        "parameters": [
          {
            "name": "language",
            "in": "query",
            "description": "The language of the Pokémon name and Pokedex descriptions",
            "schema": {
              "enum": [
                "cs",
                "de",
                "en",
                "es",
                "fr",
                "it",
                "ja",
                "ja-Hrkt",
                "ko",
                "pt-BR",
                "roomaji",
                "zh-Hans",
                "zh-Hant"
              ],
              "type": "string",
              "default": "en"
            }
          },
          {
            "name": "catchValue",
            "in": "query",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0
            }
          }
        ],
        "requestBody": {
          "description": "The catch request details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatchRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CatchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "security": [
          {
            "oauth2": [ ]
          }
        ]
      }
    },
    "/product/info": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the information of all StreamUP Products",
        "responses": {
          "200": {
            "description": "Successful operation."
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/product/info/{productId}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the information of a StreamUP Product",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation."
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/product/version/{productId}": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the version number of a StreamUP Product",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/product/dsi/actions": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the available actions for the Dynamic Stream Island",
        "responses": {
          "200": {
            "description": "Successful operation."
          }
        }
      }
    },
    "/product/dsi/actions/v2": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the available actions for the Dynamic Stream Island",
        "responses": {
          "200": {
            "description": "Successful operation."
          }
        }
      }
    },
    "/product/dsi/extensions": {
      "get": {
        "tags": [
          "Product"
        ],
        "summary": "Gets the available actions for the Dynamic Stream Island",
        "responses": {
          "200": {
            "description": "Successful operation."
          }
        }
      }
    },
    "/random/word/{min}/{max}": {
      "get": {
        "tags": [
          "Random"
        ],
        "summary": "Gets a random English word.",
        "parameters": [
          {
            "name": "min",
            "in": "path",
            "description": "The minimum length of the word.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "max",
            "in": "path",
            "description": "The maximum length of the word.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation."
          },
          "400": {
            "description": "Invalid input / No available words."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CatchRequest": {
        "type": "object",
        "properties": {
          "pokemonId": {
            "type": "integer",
            "format": "int32"
          },
          "viewerId": {
            "type": "integer",
            "format": "int32"
          },
          "preferedUserName": {
            "type": "string",
            "nullable": true
          },
          "captureRate": {
            "type": "number",
            "format": "double"
          },
          "isShiny": {
            "type": "boolean"
          },
          "hash": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeedbackRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "productName": {
            "type": "string",
            "nullable": true
          },
          "productNumber": {
            "type": "string",
            "nullable": true
          },
          "productVersion": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Pokemon": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The numerical Pokédex Id of the Pokémon.",
            "format": "int32",
            "example": 25
          },
          "name": {
            "type": "string",
            "description": "The name of the Pokémon",
            "nullable": true,
            "example": "Pikachu"
          },
          "captureRate": {
            "type": "number",
            "description": "The capture rate of the Pokémon.",
            "format": "double",
            "example": 0.33
          },
          "isShiny": {
            "type": "boolean",
            "description": "A <seealso cref=\"T:System.Boolean\" /> indicating if the Pokémon is shiny.",
            "example": false
          },
          "spriteUriDict": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "format": "uri"
            },
            "description": "The string containing the location of the Pokémons sprite.",
            "nullable": true
          },
          "spriteUri": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "descriptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of Pokédex entries.",
            "nullable": true,
            "example": [
              "It has small electric sacs on both its cheeks. If threatened, it looses electric charges from the sacs."
            ]
          },
          "hash": {
            "type": "string",
            "description": "A simple hash so we can validate requests.",
            "nullable": true,
            "readOnly": true,
            "example": "V1:FBDBFC7AF61BB33EC63EC9CFBB8422D9BD1E91794C6E0BDB02FE2F5674AEB8AA"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "apiKey",
        "description": "StreamUP Streamer Key",
        "name": "X-StreamUP-Streamer-Key",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "Feedback",
      "description": "API for submitting product feedback."
    },
    {
      "name": "GeneralPurpose",
      "description": "General-purpose API."
    },
    {
      "name": "Joke",
      "description": "General-purpose API for joke responses."
    },
    {
      "name": "Plugin",
      "description": "OBS Studio Plugin information API"
    },
    {
      "name": "Pokemon",
      "description": "API for the cloud version of Pokémon and Friends."
    },
    {
      "name": "Product",
      "description": "StreamUP Product information API"
    },
    {
      "name": "Random",
      "description": "General-purpose API for random responses."
    }
  ]
}