swagger: "2.0"
schemes:
  - http
host: hashtag.peel-ci.com
basePath: /
info:
  contact:
    x-twitter: peeltv
  description: The machine learning service APIs utilize hashtags from Twitter to find related, trending shows, related Twitter hashtags in real time and to generate direct tune-in URLs.
  title: Peel Tune-in API
  version: 1.0.0
  x-apisguru-categories:
    - media
  x-logo:
    url: https://twitter.com/peeltv/profile_image?size=original
  x-origin:
    - converter:
        url: https://github.com/lucybot/api-spec-converter
        version: 2.7.11
      format: swagger
      url: https://s3-us-west-2.amazonaws.com/tuneinapi.peel-ci.com/resources.json
      version: "1.2"
  x-providerName: peel-ci.com
produces:
  - application/json
tags:
  - description: Operations about hashtags
    name: hashtag
  - description: Operations about health of Tune-in service
    name: health
  - description: Operations about statuses
    name: status
paths:
  /hashtag/related:
    get:
      description: Returns any official hashtag and any hashtags which were learned within the most recent time window for the show.
      operationId: getRelatedHashtags
      parameters:
        - description: Unique ID for a show
          in: query
          name: showID
          required: true
          type: string
        - description: Time window in seconds (default is 2 hours)
          in: query
          name: timeWindow
          required: false
          type: string
      responses:
        "200":
          description: No response was specified
      summary: Gets related hashtags for a show.
      tags:
        - hashtag
  /hashtag/trendingShows:
    get:
      operationId: getTrendingShows
      parameters:
        - description: Number of trending shows (default is 20)
          in: query
          name: limit
          required: false
          type: string
        - description: Time window in seconds (default is 2 hours)
          in: query
          name: timeWindow
          required: false
          type: string
      responses:
        "200":
          description: No response was specified
      summary: Gets trending shows.
      tags:
        - hashtag
  /hashtag/tuneinlinks:
    get:
      description: Either use <b>tweet</b>, <b>hashtags</b>, or <b>showID</b> as the parameter. The tunein URLs that match best are returned in order of best match.<br/><br/>A <b>tweet</b> in this context is shorthand for text from a social networking conversation, e.g., it could be from Facebook, Twitter, LinkedIn, etc., and be greater than 140 characters.
      operationId: getTuneinLinks
      parameters:
        - description: Text from a social networking conversation
          in: query
          name: tweet
          required: false
          type: string
        - description: Comma separated list of hashtags and @mentions
          in: query
          name: hashtags
          required: false
          type: string
        - description: Unique ID for a show
          in: query
          name: showID
          required: false
          type: string
      responses:
        "200":
          description: No response was specified
      summary: Gets tunein URLs (links) from either a tweet, hashtags, @mentions, or show ID.
      tags:
        - hashtag
  /health:
    get:
      operationId: getHealth
      responses:
        "200":
          description: No response was specified
      summary: Get health of Tune-in service (which includes its uptime).
      tags:
        - health
  "/status/{showID}":
    get:
      description: For Twitter, statuses are synonymous with tweets.
      operationId: getStatuses
      parameters:
        - description: Unique ID for a show
          in: path
          name: showID
          required: true
          type: string
      responses:
        "200":
          description: No response was specified
      summary: Gets the last 100 statuses for this show.
      tags:
        - status
