swagger: "2.0"
schemes:
  - https
host: apis.hubhopper.com
basePath: /partner
info:
  description: This is an interactive document explaining the API(s) that could be used to fetch data from [Hubhopper](https://hubhopper.com). Use the api key provided to authorize `x-api-key` and test the API(s). The output data models are also available for reference.
  title: Hubhopper Partner Integration API(s) - Production
  version: v5
  x-apisguru-categories:
    - entertainment
  x-origin:
    - format: swagger
      url: https://docs.hubhopper.com/api/integrations/partner/swagger.yaml
      version: "2.0"
  x-providerName: hubhopper.com
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_apis.guru_assets_images_no-logo.svg
securityDefinitions:
  api_key:
    in: header
    name: x-api-key
    type: apiKey
  partner_id:
    in: header
    name: hhPartnerId
    type: apiKey
tags:
  - description: API(s) related to Categories.
    name: Category
  - description: API(s) related to Podcasts and Episodes.
    name: Podcast
  - description: API(s) related to Content Utility on Hubhopper.
    name: Util
paths:
  /categories:
    get:
      description: Get the list of all content categories.
      parameters:
        - description: Provide the size of the page to fetch.
          in: query
          name: pageSize
          required: false
          type: string
        - description: Provide the page number to fetch.
          in: query
          name: page
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/CategoryList"
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Category
  "/categories/{categoryId}":
    get:
      description: Get specific content category.
      parameters:
        - description: Unique qualifier for a category.
          in: path
          name: categoryId
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/SingleCategory"
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Category
  "/categories/{categoryId}/podcasts":
    get:
      description: Get a list of all podcasts under a category.
      parameters:
        - description: Unique qualifier for a category.
          in: path
          name: categoryId
          required: true
          type: string
        - description: Provide the page number to fetch.
          in: query
          name: page
          required: false
          type: string
        - description: Provide the size of the page to fetch.
          in: query
          name: pageSize
          required: false
          type: string
        - description: Order the items by 'newest' | 'random'
          in: query
          name: order
          required: false
          type: string
        - description: |-
            Takes filters like 'lang' in a url encoded json. 
            Example:
            1)Single ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
            2)Multiple ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en","hi"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
          in: query
          name: filters
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/PodcastList"
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Category
  /podcasts:
    get:
      description: Get the list of all podcasts.
      parameters:
        - description: Provide the page number to fetch.
          in: query
          name: page
          required: false
          type: string
        - description: Provide the size of the page to fetch.
          in: query
          name: pageSize
          required: false
          type: string
        - description: Order the items by 'newest' | 'random'
          in: query
          name: order
          required: false
          type: string
        - description: |-
            Takes filters like 'lang' in a url encoded json. 
            Example:
            1)Single ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
            2)Multiple ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en","hi"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
          in: query
          name: filters
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/PodcastList"
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Podcast
  "/podcasts/{podcastId}":
    get:
      description: Get a single Podcast.
      parameters:
        - description: Unique qualifier for a podcast.
          in: path
          name: podcastId
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/SinglePodcast"
        "404":
          description: 404 response
          schema:
            $ref: "#/definitions/Error"
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Podcast
  "/podcasts/{podcastId}/episodes":
    get:
      description: Get a list of all episodes under a podcast.
      parameters:
        - description: Provide the page number to fetch.
          in: query
          name: page
          required: false
          type: string
        - description: Provide the size of the page to fetch.
          in: query
          name: pageSize
          required: false
          type: string
        - description: Order the items by 'newest' | 'random'
          in: query
          name: order
          required: false
          type: string
        - description: |-
            Takes filters like 'lang' in a url encoded json. 
            Example:
            1)Single ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
            2)Multiple ->
            &nbsp;&nbsp;&nbsp;&nbsp; var filterJson = {"lang":["en","hi"]};
            &nbsp;&nbsp;&nbsp;&nbsp; var url = baseUrl+'?'+filters=enocdeURI(JSON.stringify(filterJson));
          in: query
          name: filters
          required: false
          type: string
        - description: Unique qualifier for a podcast.
          in: path
          name: podcastId
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          headers:
            Access-Control-Allow-Origin:
              type: string
          schema:
            $ref: "#/definitions/PodcastEpisodeList"
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Podcast
  /util/languages:
    get:
      parameters:
        - description: Provide the size of the page to fetch.
          in: query
          name: pageSize
          required: false
          type: string
        - description: Provide the page number to fetch.
          in: query
          name: page
          required: false
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: 200 response
          schema:
            $ref: "#/definitions/LanguageList"
        "204":
          description: 204 response
        "401":
          description: 401 response
        "404":
          description: 404 response
        "500":
          description: 500 response
      security:
        - api_key: []
          partner_id: []
      tags:
        - Util
definitions:
  CategoryList:
    properties:
      categories:
        items:
          $ref: "#/definitions/CategoryListCategoriesItem"
        type: array
      noOfPages:
        type: integer
      page:
        type: integer
      pageSize:
        type: integer
      total:
        type: integer
    title: CategoryListOutputModel
    type: object
  CategoryListCategoriesItem:
    properties:
      id:
        type: integer
      name:
        type: string
      url:
        type: string
    type: object
  Empty:
    title: Empty Schema
    type: object
  Error:
    properties:
      message:
        type: string
    title: Error Schema
    type: object
  LanguageItem:
    properties:
      code:
        type: string
      id:
        type: integer
      name:
        type: string
    title: LanguageItem
    type: object
  LanguageList:
    properties:
      languages:
        items:
          $ref: "#/definitions/LanguageItem"
        type: array
      noOfPages:
        type: integer
      page:
        type: integer
      pageSize:
        type: integer
      total:
        type: integer
    title: LanguageList
    type: object
  PodcastEpisodeList:
    properties:
      episodes:
        items:
          $ref: "#/definitions/PodcastEpisodeListEpisodesItem"
        type: array
      noOfPages:
        type: integer
      page:
        type: integer
      pageSize:
        type: integer
      total:
        type: integer
    title: PodcastEpisodeListOutputModel
    type: object
  PodcastEpisodeListEpisodesItem:
    properties:
      author:
        type: string
      description:
        type: string
      episodeId:
        type: integer
      episodeUrl:
        type: string
      image:
        type: string
      isNew:
        type: boolean
      play:
        properties:
          duration:
            type: string
          durationInSec:
            type: integer
          size:
            type: string
          type:
            type: string
          url:
            type: string
        type: object
      podcastId:
        type: integer
      podcastUrl:
        type: string
      publishTime:
        type: string
      publishedOn:
        type: integer
      title:
        type: string
    type: object
  PodcastList:
    properties:
      noOfPages:
        type: integer
      page:
        type: integer
      pageSize:
        type: integer
      podcasts:
        items:
          $ref: "#/definitions/PodcastListPodcastsItem"
        type: array
      total:
        type: integer
    title: PodcastListOutputModel
    type: object
  PodcastListPodcastsItem:
    properties:
      author:
        type: string
      category:
        properties:
          id:
            type: integer
          name:
            type: string
        type: object
      categoryId:
        type: integer
      description:
        type: string
      episodes:
        type: integer
      featured:
        properties:
          id:
            type: integer
          name:
            type: string
        type: object
      featuredId:
        type: integer
      image:
        type: string
      keywords:
        type: string
      latestEpisodeTime:
        type: string
      podcastId:
        type: integer
      title:
        type: string
      url:
        type: string
    type: object
  SingleCategory:
    description: Model to fetch a single category.
    properties:
      category:
        $ref: "#/definitions/SingleCategoryCategory"
    title: SingleCategoryOutputModel
    type: object
  SingleCategoryCategory:
    properties:
      id:
        type: integer
      name:
        type: string
      url:
        type: string
    type: object
  SinglePodcast:
    properties:
      podcast:
        $ref: "#/definitions/SinglePodcastPodcast"
    title: SinglePodcastOutputModel
    type: object
  SinglePodcastPodcast:
    properties:
      author:
        type: string
      category:
        properties:
          id:
            type: integer
          name:
            type: string
        type: object
      categoryId:
        type: integer
      description:
        type: string
      episodes:
        type: integer
      featured:
        properties:
          id:
            type: integer
          name:
            type: string
        type: object
      featuredId:
        type: integer
      image:
        type: string
      keywords:
        type: string
      latest_episode_time:
        type: string
      podcastId:
        type: integer
      title:
        type: string
      url:
        type: string
      website:
        type: string
    type: object
