openapi: 3.0.0
servers:
  - url: https://art19.com
info:
  contact:
    email: support@art19.com
    name: ART19 Engineering Team
    x-twitter: art19co
  description: |
    The ART19 Content API conforms to the [JSON:API specification](http://jsonapi.org).

    API requests **MUST** use the HTTP Accept header:

    `Accept: application/vnd.api+json`

    API requests **MUST** be authenticated using the HTTP Authorization header:

    `Authorization: Token token="your-token", credential="your-credential"`

    ## General Notes

    Some query parameters use unencoded [ and ] characters simply for readability. Defaults, examples, and
    possible values are additionally rendered in double quotes for readability. In practice, query parameters should
    not have quotes around the values (e.g., `foo=bar` is valid, not `foo="bar"`), and both query parameter keys
    and values must be percent-encoded, per the requirements in [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).

    ## Rate Limiting

    In order to provide a fair distribution of available resources, all API calls are subject to rate limits.
    If you exceed the number of API calls per minute granted to your credential, a `429 Too Many Requests`
    error response will be returned.

    In that case, a `Retry-After` header MAY be included in the response, describing the number of seconds
    after which a request can be retried.

    If you run into a high number of 429 errors, please reach out to ART19 Support to adjust your rate limit.

    ### Example

    In the following example the request can be retried after waiting for 21 seconds:

        HTTP/1.1 429 Too Many Requests
        Content-Type: text/html
        Retry-After: 21

    ## Pagination

    Requests to collection endpoints **SHOULD** provide pagination parameters.
    Some endpoints **REQUIRE** pagination parameters to be provided.
    Whenever pagination is provided, it **MUST** be valid.
    Failing to provide pagination when it is required or providing wrong or incomplete pagination
    always results in a `400 Bad Request` error response.

    The page numbering starts with `1` and the maximum page size (if not otherwise documented
    on an endpoint) is `100`. Pagination **MUST NOT** be specified if requesting a list of IDs (using an `ids[]` parameter).

    Providing invalid values for page number or page size, as well as providing only a page number or only a page size,
    is considered an error. Pagination is provided like this:

    `page[number]=1&page[size]=25`

    Responses conform to the [JSON:API specification's pagination section](https://jsonapi.org/format/#fetching-pagination)
    by including pagination links. Your requested page size will be carried into the pagination links.

    ## Sorting

    Requests to collection endpoints usually accept a `sort` parameter. Please refer to the
    [JSON:API Specification's sorting section](https://jsonapi.org/format/#fetching-sorting) for further details.

    ## Relationship Linking

    Currently, resources return all of their relationships, in no particular order, pursuant to how relationships
    should be returned [according to the JSON:API specification](https://jsonapi.org/format/#document-resource-object-relationships). Consumers of this API
    **MUST NOT** make assumptions about the order of these collections. Even though this data is not currently paginated, consumers **MUST** support
    paginating relationships per the JSON:API specification if this data is important for their application.
  termsOfService: https://art19.com/business-terms
  title: ART19 Content API Documentation
  version: 1.0.0
  x-apisguru-categories:
    - media
  x-logo:
    url: https://twitter.com/art19co/profile_image?size=original
  x-origin:
    - format: openapi
      url: https://art19.com/swagger_json/external/content.json
      version: "3.0"
  x-providerName: art19.com
security:
  - api_key: []
paths:
  /classification_inclusions:
    get:
      description: |
        Classification Inclusions connect classifications with entities like series, episodes, or campaigns, amongst others.

        In order to retrieve a set of classification inclusions, at least one of the following filter parameters must
        be provided. Failing to do so renders a `400 Bad Request` response.

        - `ids[]`
        - `classified_id` and `classified_type`
        - `classified_id` and `classification_type`
        - `classification_id` and `classified_type`
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Limit the result to classification inclusions linked to a classification with this ID.
          example: a90609c0-9f0c-48fd-8a41-83eb8414bedb
          in: query
          name: classification_id
          schema:
            format: uuid
            type: string
        - description: |
            The type of classification that the classification inclusions are linked to.
            Depending on the permissions of your credential, only a subset of these types are usable.
          in: query
          name: classification_type
          schema:
            enum:
              - AlternateFeedType
              - Genre
              - Industry
              - Language
              - MediaRating
            type: string
        - description: |
            Limit the result to classification inclusions linked to a resource with this ID.
            You will have to use this filter together with either `classified_type` or `classification_type`.
          example: fee1976e-f1bc-48a9-9ee8-58800f4d3462
          in: query
          name: classified_id
          schema:
            format: uuid
            type: string
        - description: Limit the result to classification inclusions linked to this type of entity.
          in: query
          name: classified_type
          schema:
            enum:
              - Series
              - Season
              - Episode
            type: string
        - description: |
            Limit the result to classification inclusions linked to a classification containing
            the parameter value disregarding case.
          in: query
          name: q
          schema:
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: created_at
            items:
              enum:
                - classification_value
                - created_at
                - position
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/ClassificationInclusion"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. At least one filter parameter is required.
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get ClassificationInclusion records
      tags:
        - ClassificationInclusion
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/classification_inclusions",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="ad3f51ff-4d11-43b9-9612-6a55ecefe2df"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/classification_inclusions?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="0f1a0647-0efb-487d-a736-fb2fcf516a42"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/classification_inclusions');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="1f653814-5fa6-492e-86ad-2cfc88c0936e"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/classification_inclusions?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="fc346b8c-62c4-4483-8bb6-e4b810466778"' \
              --compressed
  "/classification_inclusions/{id}":
    get:
      parameters:
        - description: The ID of the classification inclusion resource to load.
          example: 3c1da8b0-fce6-4b8e-b5e3-fd007472206b
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ClassificationInclusion"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific classification inclusion
      tags:
        - ClassificationInclusion
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="30cfe370-809a-4a88-bc42-e44dae664cb4"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="e9c8c90b-2df7-4337-94ad-c5d82305ecce"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="7410ebaf-5459-4c29-a51e-affe5900832c"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="9e419a11-990c-4156-925b-8c5c0d776cdb"' \
              --compressed
  /classifications:
    get:
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: |
            Limit the result to classifications of this type. The possible values for types
            depends on the privileges of the provided credential.
          example: Genre
          in: query
          name: type
          schema:
            enum:
              - AlternateFeedType
              - Genre
              - Industry
              - Language
              - MediaRating
            type: string
        - description: |
            Limit the result to classifications with a value containing the parameter value
            disregarding case.
          in: query
          name: q
          schema:
            type: string
        - description: |
            If this parameter is provided and not empty, limit the result to classifications
            of type `Geography` representing countries. The credential must have at least one
            privilege with a network, series, or advertiser profile.
          example: "true"
          in: query
          name: is_country
          schema:
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: value
            items:
              enum:
                - created_at
                - updated_at
                - value
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Classification"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. Filtering by type for AudienceSegment, AudienceTag, ListeningPlatform, and UserDevice is no longer supported.
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of classifications
      tags:
        - Classification
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/classifications",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="4814609f-e1cb-4232-bcf8-cddb03771710"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/classifications?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="ed13badd-d235-4303-a572-cf5b2640a127"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/classifications');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="0673cdce-d5b6-425f-b113-761ce249d775"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/classifications?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="6bb1e316-8593-4242-a9ac-bd8f0e45da89"' \
              --compressed
  "/classifications/{id}":
    get:
      parameters:
        - description: The ID of the classification resource to load.
          example: aafe5a7a-bbb3-4b7e-8cc5-4b8231639c28
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Classification"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific classification
      tags:
        - Classification
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="b3427539-3fa8-4c65-91d6-f12cd38a0d7f"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="52f9f879-936f-4a8e-be61-134a57b71967"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="ea6f3275-7207-43b6-ae2d-e123bb228ce3"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="b7c457a5-27d8-4e8e-849c-bdcaefa5a3d0"' \
              --compressed
  /credits:
    get:
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: |
            Limit the result to credits for the entity with this ID only. If the entity is not
            published, the credential needs to have the right privilege to list the credits for it.
          example: 76654e16-76ce-4945-92e9-e0a381917853
          in: query
          name: creditable_id
          schema:
            format: uuid
            type: string
        - description: |
            Limit the result to credits linked to this type of entity only.
            Depending on the privileges of the credential, this list might be further reduced to
            only published entities.
          in: query
          name: creditable_type
          schema:
            enum:
              - Series
              - Season
              - Episode
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: position
            items:
              enum:
                - created_at
                - position
                - updated_at
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Credit"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of credits
      tags:
        - Credit
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/credits",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="6e9f43df-ba69-4b34-a7bf-a404a1ce2c91"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/credits?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="d24beb73-0d00-4f8a-9965-1428c13ffa10"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/credits');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="86aa529e-7e7c-405b-9d7c-343df164bf04"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/credits?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="a32f46a0-5a99-40e6-b7fc-2f43b29847d2"' \
              --compressed
  "/credits/{id}":
    get:
      parameters:
        - description: The ID of the credit resource to load.
          example: 446a6df2-7565-4088-a045-fc5cf0c460c4
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Credit"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific credit
      tags:
        - Credit
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="2ef2148d-4f43-4533-a876-e38109642432"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="9e247e02-3a42-4a5c-9c4c-0db783dcb40b"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="f600984a-7e2a-4245-872f-b2c16d6d44ac"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="20de6005-8606-43a2-87da-b7b215d75224"' \
              --compressed
  /episodes:
    get:
      description: |
        One initial filter must be provided (`ids`, `series_id`, or `season_id`), otherwise a `400 Bad Request` response
        will be returned. Additional filters are allowed.

        This API will only return episodes that your credential has permission to access, which may not be exclusive to
        your account, depending on the filter(s) being used. Be careful to filter the results as needed.
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          required: true
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          required: true
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Limit the result to episodes usable with an inventory management calendar for the provided AdDeal ID.
          example: b97239ef-1776-489a-a1df-5f70a8407148
          in: query
          name: included_in_inventory_calendar
          schema:
            format: uuid
            type: string
        - description: Limit the result to episodes released in this month.
          in: query
          name: month
          schema:
            type: string
        - description: |
            If `true`, limit the result to published episodes only.
            If `false`, limit the result to _unpublished_ episodes only.
          in: query
          name: published
          schema:
            type: boolean
        - description: Limit the result to episodes with a title containing this parameter in a case-insensitive way.
          in: query
          name: q
          schema:
            type: string
        - description: Limit the result to episodes released after this timestamp.
          in: query
          name: released_after
          schema:
            format: date-time
            type: string
        - description: Limit the result to episodes released before this timestamp.
          in: query
          name: released_before
          schema:
            format: date-time
            type: string
        - description: |
            If `true`, limit the result to published and released episodes holding an available media file.
            If this is `true`, it also changes the default sort order to `-released_at`.
          in: query
          name: rss
          schema:
            type: boolean
        - description: Limit result to episodes linked to this season.
          example: 30e7b568-d099-486b-9a8e-51b7594cab7d
          in: query
          name: season_id
          schema:
            format: uuid
            type: string
        - description: Limit the result to episodes linked to this series.
          example: d0ceb1ff-b95b-4c1e-a7e5-a36ed7b4d3b7
          in: query
          name: series_id
          schema:
            format: uuid
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: sort_title
            items:
              enum:
                - created_at
                - earliest_released_at
                - released_at
                - released_or_created_at
                - sort_title
                - title
                - updated_at
              type: string
            type: array
          style: form
        - description: Limit the result to episodes released in this year.
          in: query
          name: year
          schema:
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Episode"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must be present and have a positive page number and a page size no larger than 100. One initial filter must be provided (`ids`, `series_id`, or `season_id`).
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of episodes
      tags:
        - Episode
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/episodes",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="1c6bf089-bf44-41ff-8548-00633174949c"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/episodes?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="69c4a3cb-7262-490c-94be-4dea70bb1cd8"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/episodes');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="5cdc08c4-b1c1-4c85-bab8-05c07a0448fc"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/episodes?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="772b87aa-9fe0-4fa4-b24f-cb086b1d3ce6"' \
              --compressed
  "/episodes/{id}":
    get:
      parameters:
        - description: The ID of the episode resource to load.
          example: ee10fd32-c808-493c-b804-0de9359a7203
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Episode"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific episode
      tags:
        - Episode
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="084d390a-a53a-4e6a-a5a6-7558e101dc2d"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="c5ddc856-8762-48b9-99aa-7a68d4d85852"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="fd5732d8-0cbc-4388-bdc6-7c9a28411410"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="bf5f8eaf-b12b-47b1-84af-88f2179e6bac"' \
              --compressed
  "/episodes/{id}/next_sibling":
    get:
      parameters:
        - description: The ID of the episode to find the one episode released right after it.
          example: 68879bce-6127-4383-9860-b7beda43b48f
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - description: |
            If `true`, get the next released and published episode with an available media file.
          in: query
          name: rss
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Episode"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get the episode released right after the specified one
      tags:
        - Episode
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/episodes/eac56e99-c7a3-4985-b44c-9ea2374bfd6f/next_sibling",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="4ea0f6af-2876-44ab-8235-ebc1c3d7017c"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/episodes/eac56e99-c7a3-4985-b44c-9ea2374bfd6f/next_sibling', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="a4f48847-4b6a-443b-8cd4-f4a6a95b7ff1"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/episodes/eac56e99-c7a3-4985-b44c-9ea2374bfd6f/next_sibling');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="d21582c4-16b1-437b-8391-31ada8b7a742"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/episodes/eac56e99-c7a3-4985-b44c-9ea2374bfd6f/next_sibling' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="8534b3b5-ead1-40b5-8820-fbd1eeeae465"' \
              --compressed
  "/episodes/{id}/previous_sibling":
    get:
      parameters:
        - description: The ID of the episode to find the one episode released right before it.
          example: 841eef4c-b141-424e-a5ea-9a2452da263d
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - description: |
            If `true`, get the previously released and published episode with an available media file.
          in: query
          name: rss
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Episode"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get the episode released right before the specified one
      tags:
        - Episode
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/episodes/09b3beee-d1e2-4559-8eab-43ddc7204382/previous_sibling",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="df9311d5-3e1f-41d1-b6c9-0e5a03b53a95"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/episodes/09b3beee-d1e2-4559-8eab-43ddc7204382/previous_sibling', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="37d68b4d-1558-41aa-b0c2-84f5346ed333"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/episodes/09b3beee-d1e2-4559-8eab-43ddc7204382/previous_sibling');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="ae22404e-28f1-4941-89e0-f84bb528a17c"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/episodes/09b3beee-d1e2-4559-8eab-43ddc7204382/previous_sibling' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="da643b8c-43ea-4cdd-b108-27e58bf6eff8"' \
              --compressed
  /images:
    get:
      description: |+
        An image represents a piece of artwork attached to some entity like a series, season, or episode,
        and is _owned_ by an entity called the `bucket`.
        An image is also a container for several `MediaAssets` representing the physical files for various
        styles used.

        ## Media Asset Styles for Images

        Most media assets use square images. You may upload and use a square image, or upload an image of any
        shape and crop it to a square by specifying the cropping area. This area – identified by a coordinate
        `x, y` and a `width` & `height` – is the portion of the image used for all cover art. If an image has
        cropping defined, the cropped version of the image will be used in any `regular` or `square` style of media
        asset. If the original file is rectangular and does not have cropping, then the system will use a squared
        version of the original file with the smaller of width or height as the square size.

        The original image as uploaded into the system is always retained unmodified and available through
        the style `original`. All media asset styles except `stripped-original` consist of the cropped image.

        An image has media assets with the following styles:

        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `stripped-original`: The original file with all metadata (EXIF, XMP, PNG metadata, etc.) removed.
          This should be used for any application needing the original, uncropped, image.
        - `regular`: If the image has cropping defined, this is the cropped image.
          If not, this is a square version of the original.
        - `thumb`: A square thumbnail of the image with a size of `100x100` pixels.
        - `square-400`: A square version of the image with a size of `400x400` pixels.
        - `square-640`: A square version of the image with a size of `640x640` pixels.
        - `square-888`: A square version of the image with a size of `888x888` pixels.
        - `square-3000`: A square version of the image with a size of `3000x3000` pixels.
          This variant is only created if the cropped width & height are each at least 3000.
        - `itunes`: A square version of the image with a size of `1400x1400` pixels.

        ### Preferred image used in feeds

        For the main series image used in feeds, it is ideal to use the `square-3000` version.
        If that is not available, the `itunes` version should be used instead.

      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: true
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Image"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of images
      tags:
        - Image
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/images",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="4289d71b-545f-41d9-a419-14eb25ff2a00"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/images?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="11adf3b0-0052-47e3-8633-33486368a73c"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/images');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="de981c92-2c80-4c1a-a1f2-e4fa78ed0562"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/images?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="0ddb38cd-f04c-4b97-8254-12d1daae737f"' \
              --compressed
  "/images/{id}":
    get:
      description: |+
        An image represents a piece of artwork attached to some entity like a series, season, or episode,
        and is _owned_ by an entity called the `bucket`.
        An image is also a container for several `MediaAssets` representing the physical files for various
        styles used.

        ## Media Asset Styles for Images

        Most media assets use square images. You may upload and use a square image, or upload an image of any
        shape and crop it to a square by specifying the cropping area. This area – identified by a coordinate
        `x, y` and a `width` & `height` – is the portion of the image used for all cover art. If an image has
        cropping defined, the cropped version of the image will be used in any `regular` or `square` style of media
        asset. If the original file is rectangular and does not have cropping, then the system will use a squared
        version of the original file with the smaller of width or height as the square size.

        The original image as uploaded into the system is always retained unmodified and available through
        the style `original`. All media asset styles except `stripped-original` consist of the cropped image.

        An image has media assets with the following styles:

        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `stripped-original`: The original file with all metadata (EXIF, XMP, PNG metadata, etc.) removed.
          This should be used for any application needing the original, uncropped, image.
        - `regular`: If the image has cropping defined, this is the cropped image.
          If not, this is a square version of the original.
        - `thumb`: A square thumbnail of the image with a size of `100x100` pixels.
        - `square-400`: A square version of the image with a size of `400x400` pixels.
        - `square-640`: A square version of the image with a size of `640x640` pixels.
        - `square-888`: A square version of the image with a size of `888x888` pixels.
        - `square-3000`: A square version of the image with a size of `3000x3000` pixels.
          This variant is only created if the cropped width & height are each at least 3000.
        - `itunes`: A square version of the image with a size of `1400x1400` pixels.

        ### Preferred image used in feeds

        For the main series image used in feeds, it is ideal to use the `square-3000` version.
        If that is not available, the `itunes` version should be used instead.

      parameters:
        - description: The ID of the image resource to load.
          example: 7494968c-e16b-4a73-b0c9-dbf73ec49d1c
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Image"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific image
      tags:
        - Image
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/images/86362d4e-cc3a-4f4c-aedd-50bd9fa2da77",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="aac0f7f4-aa1c-440e-b072-ed0f47bf061b"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/images/86362d4e-cc3a-4f4c-aedd-50bd9fa2da77', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="e98b6ba7-eda2-4402-aaa1-263c841f019e"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/images/86362d4e-cc3a-4f4c-aedd-50bd9fa2da77');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="c792691c-ba00-441c-b387-b99c3133bdff"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/images/86362d4e-cc3a-4f4c-aedd-50bd9fa2da77' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="3313bb3c-19f9-4de4-bb30-55d1684fca2d"' \
              --compressed
  /media_assets:
    get:
      description: |+
        A media asset is part of a collection of assets or files representing an image or a piece of audio content
        like an episode or an ad. Images, for example, have differently sized versions for better rendering performance,
        and a piece of audio content usually comes in different encoding formats.

        The `style` attribute of a media asset describes the role an asset plays in the context of the collection.
        The collection is what an asset is attached to (`attachment_id|type`).

        ## Styles for Images

        Most media assets use square images. You may upload and use a square image, or upload an image of any
        shape and crop it to a square by specifying the cropping area. This area – identified by a coordinate
        `x, y` and a `width` & `height` – is the portion of the image used for all cover art. If an image has
        cropping defined, the cropped version of the image will be used in any `regular` or `square` style of media
        asset. If the original file is rectangular and does not have cropping, then the system will use a squared
        version of the original file with the smaller of width or height as the square size.

        The original image as uploaded into the system is always retained unmodified and available through
        the style `original`. All media asset styles except `stripped-original` consist of the cropped image.

        An image has media assets with the following styles:

        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `stripped-original`: The original file with all metadata (EXIF, XMP, PNG metadata, etc.) removed.
          This should be used for any application needing the original, uncropped, image.
        - `regular`: If the image has cropping defined, this is the cropped image.
          If not, this is a square version of the original.
        - `thumb`: A square thumbnail of the image with a size of `100x100` pixels.
        - `square-400`: A square version of the image with a size of `400x400` pixels.
        - `square-640`: A square version of the image with a size of `640x640` pixels.
        - `square-888`: A square version of the image with a size of `888x888` pixels.
        - `square-3000`: A square version of the image with a size of `3000x3000` pixels.
          This variant is only created if the cropped width & height are each at least 3000.
        - `itunes`: A square version of the image with a size of `1400x1400` pixels.

        ### Preferred image used in feeds

        For the main series image used in feeds, it is ideal to use the `square-3000` version.
        If that is not available, the `itunes` version should be used instead.


        ## Styles for Audio

        - `medium`: A medium-quality version of the audio asset in various formats.
        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `waveform_data`: The generated BBC Audiowaveform data in JSON or binary format.

      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: true
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/MediaAsset"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of media assets
      tags:
        - MediaAsset
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/media_assets",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="6d9b60fa-7b4c-4f32-b337-2d6a97eb0b3b"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/media_assets?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="e4a37606-2b84-4f14-8da0-43c3a0b4079c"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/media_assets');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="4739a124-9f84-4484-a4e0-5413eac9c122"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/media_assets?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="e53cb949-b867-4bda-8b37-5d8090834aa0"' \
              --compressed
  "/media_assets/{id}":
    get:
      description: |+
        A media asset is part of a collection of assets or files representing an image or a piece of audio content
        like an episode or an ad. Images, for example, have differently sized versions for better rendering performance,
        and a piece of audio content usually comes in different encoding formats.

        The `style` attribute of a media asset describes the role an asset plays in the context of the collection.
        The collection is what an asset is attached to (`attachment_id|type`).

        ## Styles for Images

        Most media assets use square images. You may upload and use a square image, or upload an image of any
        shape and crop it to a square by specifying the cropping area. This area – identified by a coordinate
        `x, y` and a `width` & `height` – is the portion of the image used for all cover art. If an image has
        cropping defined, the cropped version of the image will be used in any `regular` or `square` style of media
        asset. If the original file is rectangular and does not have cropping, then the system will use a squared
        version of the original file with the smaller of width or height as the square size.

        The original image as uploaded into the system is always retained unmodified and available through
        the style `original`. All media asset styles except `stripped-original` consist of the cropped image.

        An image has media assets with the following styles:

        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `stripped-original`: The original file with all metadata (EXIF, XMP, PNG metadata, etc.) removed.
          This should be used for any application needing the original, uncropped, image.
        - `regular`: If the image has cropping defined, this is the cropped image.
          If not, this is a square version of the original.
        - `thumb`: A square thumbnail of the image with a size of `100x100` pixels.
        - `square-400`: A square version of the image with a size of `400x400` pixels.
        - `square-640`: A square version of the image with a size of `640x640` pixels.
        - `square-888`: A square version of the image with a size of `888x888` pixels.
        - `square-3000`: A square version of the image with a size of `3000x3000` pixels.
          This variant is only created if the cropped width & height are each at least 3000.
        - `itunes`: A square version of the image with a size of `1400x1400` pixels.

        ### Preferred image used in feeds

        For the main series image used in feeds, it is ideal to use the `square-3000` version.
        If that is not available, the `itunes` version should be used instead.


        ## Styles for Audio

        - `medium`: A medium-quality version of the audio asset in various formats.
        - `original`: This is the original file provided. May not be available, depending on permissions
          and file type.
        - `waveform_data`: The generated BBC Audiowaveform data in JSON or binary format.

      parameters:
        - description: The ID of the media asset resource to load.
          example: 1da164cd-b463-4a03-8485-90892013a785
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/MediaAsset"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific media asset
      tags:
        - MediaAsset
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/media_assets/cf755c0b-4f26-428d-9f5f-e7fac7ab5395",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="e4e3b373-e0d1-4cb7-9a65-4fc8a7ef6870"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/media_assets/cf755c0b-4f26-428d-9f5f-e7fac7ab5395', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="51f5542c-6c05-4fc4-84b6-2d197a6b6863"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/media_assets/cf755c0b-4f26-428d-9f5f-e7fac7ab5395');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="943a9931-ecc3-4a98-9663-f636a73a945d"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/media_assets/cf755c0b-4f26-428d-9f5f-e7fac7ab5395' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="83d96204-fd4b-468b-b0a0-b79b7b4349aa"' \
              --compressed
  /networks:
    get:
      description: |
        ### Deprecations

        - The attribute `cover_image_id` has been replaced with the relationship `cover_image`
          and will be removed from the response in a future release.
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Limit the result to networks with a name containing this parameter in a case-insensitive way.
          in: query
          name: q
          schema:
            type: string
        - description: |
            Limit the result to networks containing at least one series with an ad deal of this Ad Ops profile.
          in: query
          name: ad_rep_account_id
          schema:
            format: uuid
            type: string
        - description: |
            Limit the result to networks containing at least one series with an ad deal matching one of the
            values in this parameter.
          explode: false
          in: query
          name: ad_deal_status
          schema:
            items:
              enum:
                - active
                - inactive
                - pending_active
                - pending_inactive
              type: string
            type: array
          style: form
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: name
            items:
              enum:
                - created_at
                - name
                - updated_at
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Network"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of networks
      tags:
        - Network
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/networks",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="80ca3d76-0aab-4a30-81b8-34e02cc7934e"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/networks?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="f26ef368-91dc-4974-8561-d893729b5134"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/networks');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="9f05c5bc-841e-491a-993d-7a3a02e48eda"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/networks?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="ab9095b7-87cc-430b-9f93-4c61f24b704d"' \
              --compressed
  "/networks/{id}":
    get:
      description: |
        ### Deprecations

        - The attribute `cover_image_id` has been replaced with the relationship `cover_image`
          and will be removed from the response in a future release.
      parameters:
        - description: The ID of the network resource to load.
          example: 033b09a7-5aa4-4491-bd2c-d8a2d46e3473
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Network"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific network
      tags:
        - Network
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/networks/47189776-fbc7-4d38-aca5-85c9af9e1a00",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="71d166b0-b936-41e8-8045-e8f8081a578d"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/networks/47189776-fbc7-4d38-aca5-85c9af9e1a00', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="d4171b37-283a-4e2a-949a-12619da2c624"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/networks/47189776-fbc7-4d38-aca5-85c9af9e1a00');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="2fe8bbf5-4c32-45db-8e2d-4096dffacaf9"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/networks/47189776-fbc7-4d38-aca5-85c9af9e1a00' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="6ec5d1c3-081c-491d-9521-069c8b0919b2"' \
              --compressed
  /people:
    get:
      description: |
        Each series, season, and episode has a Credits section where you may add people and roles.
        This is an internal tool to recognize contributors. It is not related to ART19 users or account permissions.
        Each Person added will have no additional access or permissions granted as a result of being included in the Credits section.
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Limit the result to people with a full name containing this parameter in a case-insensitive way.
          in: query
          name: q
          schema:
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: last_name,first_name
            items:
              enum:
                - created_at
                - first_name
                - last_name
                - updated_at
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Person"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of people
      tags:
        - Person
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/people",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="e3278a89-d98d-48fc-a7fd-6665bec43380"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/people?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="8df1493a-c9c8-4c9a-9d00-c022ad97d586"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/people');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="ee4283f8-ad65-46c0-8e78-84eefe9f3fee"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/people?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="9faadd2e-aeca-4e85-97e0-29b402ee5cc0"' \
              --compressed
  "/people/{id}":
    get:
      description: |
        Each series, season, and episode has a Credits section where you may add people and roles.
        This is an internal tool to recognize contributors. It is not related to ART19 users or account permissions.
        Each Person added will have no additional access or permissions granted as a result of being included in the Credits section.
      parameters:
        - description: The ID of the person resource to load.
          example: 1d47dde9-36e4-41b8-8918-4678852e0e5f
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Person"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific person
      tags:
        - Person
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/people/0772230c-beae-4db2-ab5c-af2bd4cb4c06",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="8e234c91-bb03-4d6a-9722-9ac9ccbdf14a"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/people/0772230c-beae-4db2-ab5c-af2bd4cb4c06', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="9c2a6802-62cd-4fd2-8a9c-b143419bde2e"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/people/0772230c-beae-4db2-ab5c-af2bd4cb4c06');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="95840612-7f40-4098-8836-4cff3e855df8"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/people/0772230c-beae-4db2-ab5c-af2bd4cb4c06' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="662633c7-d790-4ed3-af3f-5ed47fa76959"' \
              --compressed
  /seasons:
    get:
      description: |
        When retrieving a list of seasons, the result is automatically filtered depending on the
        privileges the used credential holds. If there are no specific privileges to a series or network,
        only active seasons for active series are included.
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: Limit the result to seasons owned by this series.
          example: 7ebd702d-07c8-4da9-a7a8-cf18ec414d5c
          in: query
          name: series_id
          schema:
            format: uuid
            type: string
        - description: Limit the result to seasons with a title containing this parameter in a case-insensitive way.
          in: query
          name: q
          schema:
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: sort_title
            items:
              enum:
                - created_at
                - sort_title
                - title
                - updated_at
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Season"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of seasons
      tags:
        - Season
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/seasons",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="338ae7a0-3eec-4b1f-b8b2-e112e2880a86"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/seasons?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="7576efc3-3346-4181-a8c5-8694cdd391df"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/seasons');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="175aa287-dcf2-4f1f-8360-1c86c3e53107"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/seasons?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="e096fb61-23c2-498d-a50d-d5d5173daa28"' \
              --compressed
  "/seasons/{id}":
    get:
      parameters:
        - description: The ID of the season resource to load.
          example: 5d97bfa9-fbea-4bbf-bc13-5eb005a888e3
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Season"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific season
      tags:
        - Season
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/seasons/2fd364c9-daca-443d-8167-c1dcaac7a6bb",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="8168ad0a-b203-425d-915e-66795e0a8255"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/seasons/2fd364c9-daca-443d-8167-c1dcaac7a6bb', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="4e1bf678-e4dd-40a9-bb45-22a9613342c9"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/seasons/2fd364c9-daca-443d-8167-c1dcaac7a6bb');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="8448bd77-df67-4525-887c-db36ab2dc6f8"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/seasons/2fd364c9-daca-443d-8167-c1dcaac7a6bb' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="11ef1dd1-0ecc-4e93-a364-773fe88a9980"' \
              --compressed
  /series:
    get:
      description: |
        When retrieving a list of series, the result is automatically filtered depending on the
        privileges the used credential holds. All credentials will have access to active series
        with a public page enabled (on ART19). Utilizing a filter to limit the result to series
        associated with your account is recommended.
      parameters:
        - description: |
            The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.
            The brackets *MUST* be percent-encoded, per the requirements in
            [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).
          explode: true
          in: query
          name: ids[]
          required: false
          schema:
            items:
              format: uuid
              type: string
            type: array
            uniqueItems: true
        - description: |+
            Select which page number to receive results for. Pages are numbered starting at 1.

          in: query
          name: page[number]
          schema:
            minimum: 1
            type: integer
        - description: |+
            Indicate how many records to return per page. The maximum is 100.

          in: query
          name: page[size]
          schema:
            maximum: 100
            minimum: 1
            type: integer
        - description: |
            Limit the result to series with an ad deal of this Ad Ops profile.
          example: 35eb02fc-54db-4650-98e0-4695b101b71d
          in: query
          name: ad_rep_account_id
          schema:
            format: uuid
            type: string
        - description: Limit the result to series owned by this network.
          example: 5317358a-527e-4365-a343-361854286cc7
          in: query
          name: network_id
          schema:
            format: uuid
            type: string
        - description: Limit the result to series with a title or slug containing this parameter in a case-insensitive way.
          in: query
          name: q
          schema:
            type: string
        - description: |
            Specify how to sort the result. Please refer to either the top section or the
            [JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.
          explode: false
          in: query
          name: sort
          schema:
            default: sort_title
            items:
              enum:
                - created_at
                - episode_released_at
                - sort_title
                - title
                - updated_at
              type: string
            type: array
          style: form
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/Series"
                    type: array
                  links:
                    $ref: "#/components/schemas/Links"
                type: object
          description: Success
        "400":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  errors:
                    description: |
                      An error object describing the problem. Please check out the
                      [JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full
                      description of the returned object.
                    items:
                      properties:
                        code:
                          description: An application-specific error code, expressed as a string value
                          type: string
                        detail:
                          description: |
                            A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
                          example: Required query parameter “series_id” is missing
                          type: string
                        source:
                          description: |
                            An object containing references to the source of the error, optionally including any of the following members.
                          nullable: true
                          properties:
                            parameter:
                              description: A string indicating which URI query parameter caused the error.
                              example: series_id
                              type: string
                            pointer:
                              description: |
                                A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) to the associated entity in the request document (e.g. `/data` for a primary data object, or `/data/attributes/title` for a specific attribute).
                              example: /data/attributes/name
                              type: string
                          type: object
                        status:
                          description: "The HTTP status code applicable to this problem, expressed as a string value: 400"
                          example: "400"
                          type: string
                        title:
                          description: |
                            A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the
                            problem, except for purposes of localization.
                          example: Bad Request
                          type: string
                      type: object
                    type: array
                type: object
          description: |
            Bad Request

            Parameters requiring a specific format must adhere to that format.
            Pagination must have a positive page number and a page size no larger than 100. 
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a list of series
      tags:
        - Series
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/series",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="929d09d8-988b-45d6-a617-32ce1641f21a"'
              },
              params: {
                # add filters if desired
                page: { number: 1, size: 25 }
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/series?page%5Bnumber%5D=1&page%5Bsize%5D=25', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="cdcaccd9-14f1-46f1-a579-2a5160cd02f7"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // The API endpoint to request data from
              $url = array('https://art19.com/series');

              // Provide extra parameters like filters or pagination to the request
              $url[] = http_build_query(array(
                'page' => array('number' => 1, 'size' => 25)
              ));

              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, implode('?', $url));
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="133d3f55-3aa4-43d7-9077-c8041b0eea6a"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/series?page%5Bnumber%5D=1&page%5Bsize%5D=25' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="0cc5bb72-9bba-4b45-adcd-0e2c0119e870"' \
              --compressed
  "/series/{id}":
    get:
      parameters:
        - description: The ID of the series resource to load.
          example: f2fd57b8-23c2-4e9f-b0a9-405648cdc7ab
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/vnd.api+json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/Series"
                  links:
                    $ref: "#/components/schemas/ResourceLink"
                type: object
          description: Success
        "401":
          $ref: "#/components/responses/unauthorized"
        "403":
          $ref: "#/components/responses/forbidden"
        "404":
          $ref: "#/components/responses/not_found"
        "406":
          $ref: "#/components/responses/not_acceptable"
        "429":
          $ref: "#/components/responses/rate_limit_exceeded"
      security:
        - api_key: []
      summary: Get a specific series
      tags:
        - Series
      x-codeSamples:
        - label: Ruby - Typhoeus
          lang: ruby
          source: |
            response = Typhoeus.get(
              "https://art19.com/series/3b2e252e-6819-457e-a389-17d206635fb9",
              accept_encoding: 'gzip',
              headers: {
                Accept:        'application/vnd.api+json',
                Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="1b9a6052-aaa1-4130-a973-ad53d215a4ee"'
              },
              timeout: 10
            )
            if response.success?
              # HTTP 2xx - JSON:API available to be parsed in response.body
            elsif response.timed_out?
              # Request timed out
            elsif response.code.zero?
              # cURL didn't get back an HTTP response, the reason is in response.return_message
            else
              # Other HTTP status, check response.code for which
            end
        - label: JavaScript - Fetch
          lang: javascript
          source: |
            try {
              const response = await fetch('https://art19.com/series/3b2e252e-6819-457e-a389-17d206635fb9', {
                headers: {
                  Accept:        'application/vnd.api+json',
                  Authorization: 'Token token="UVd4c0lFTnZjSKbElFSm", credential="1a54b00c-69b4-48ef-9377-2392f9a9f8e6"'
                }
              });

              if (response.ok) {
                // Get the response body if HTTP-status is 200-299
                const json = await response.json();
              } else {
                // HTTP request failed, handle error
              }
            } catch(err) {
              // A network error occured
            }
        - label: PHP - cURL
          lang: php
          source: |
            <?php
            // Initialize a cURL resource for a request
            $request = curl_init();

            try {
              // Configure the cURL options
              curl_setopt($request, CURLOPT_URL, 'https://art19.com/series/3b2e252e-6819-457e-a389-17d206635fb9');
              curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
              curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($request, CURLOPT_ENCODING, '');
              curl_setopt($request, CURLOPT_HTTPHEADER, array(
                'Accept: application/vnd.api+json',
                'Authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="ed1470ed-e4a4-41f3-b40a-13a42edf6642"'
              ));

              // Execute the request and grab all status information
              $output = curl_exec($request);
              $info   = curl_getinfo($request);
              $code   = $info['http_code'];

              if ($code >= 200 && $code < 300) {
                // HTTP 2xx - JSON:API response available to be parsed in $output
                $json = json_decode($output);
              } else if ($code >= 400 && $code < 500) {
                // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output
                if (strlen($output) > 0) {
                  $errors = json_decode($output);
                }
              } else {
                // Other HTTP status, treat according to workflow
              }
            } finally {
              // Free up the resource to clear out memory
              curl_close($request);
            }
            ?>
        - label: cURL
          lang: shell
          source: |
            curl 'https://art19.com/series/3b2e252e-6819-457e-a389-17d206635fb9' \
              -H 'accept: application/vnd.api+json' \
              -H 'authorization: Token token="UVd4c0lFTnZjSKbElFSm", credential="6ae8356d-6049-4606-a33f-28364ad4704c"' \
              --compressed
components:
  responses:
    forbidden:
      description: |
        Forbidden

        The provided credential is not authorized to access the requested resource or collection.
        [See RFC 7231 § 6.5.3](https://tools.ietf.org/html/rfc7231#section-6.5.3)
    not_acceptable:
      description: |
        Not Acceptable

        The client requested a response format which cannot be satisfied. Ensure that you specify the
        correct `Accept` header. [See RFC 7231 § 6.5.6](https://tools.ietf.org/html/rfc7231#section-6.5.6).
    not_found:
      description: |
        Not Found

        The requested resource/collection does not exist. [See RFC 7231 § 6.5.4](https://tools.ietf.org/html/rfc7231#section-6.5.4).
    rate_limit_exceeded:
      description: Rate limit exceeded
      headers:
        Retry-After:
          description: |
            The number of seconds after which the request can be retried.
            Since the rate limit is per minute, this value ranges from 1 to 59.
            Conforms to [RFC 7231 § 7.1.3](https://tools.ietf.org/html/rfc7231#section-7.1.3).
          schema:
            type: integer
    unauthorized:
      description: |
        Unauthorized

        A valid credential was not supplied, but one is required.
        [See RFC 7235 § 3.1](https://tools.ietf.org/html/rfc7235#section-3.1).
        A `WWW-Authenticate` header is not currently returned.
  schemas:
    Classification:
      description: |
        A classification, in general, is something that can describe other resources, such as countries, genres or
        languages. How they're described (included or excluded, and whether they're the primary classification
        of this type) is handled using other resources. Different functions of ART19 rely on classifications differently,
        and could have an effect only on directory information, or may have an effect on ad decisioning.
      properties:
        attributes:
          properties:
            created_at:
              format: date-time
              type: string
            display_name:
              description: Human readable representation of the classification
              type: string
            metadata:
              description: |
                An object with more detailed information about the classification.
                The possible members are different per type of classification.
              type: object
            parent_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `parent` in a future update.<br/>
                For hierarchical classifications, this is the ID of the parent classification
              format: uuid
              type: string
            tree_path:
              description: |
                For hierarchical classifications this is the list of IDs reflecting the hierarchy starting
                with the root level node.
              example:
                - e93856cc-e41d-432f-9dc3-c77374b0a184
                - 68d04c27-0f6c-47cb-9763-bc4059707399
              items:
                format: uuid
                type: string
              type: array
            type:
              description: |
                The type of classification. The type of retrievable classifications depends on the privileges
                of the credential being used.
              enum:
                - AlternateFeedType
                - Genre
                - Industry
                - Language
                - MediaRating
              example: Genre
              type: string
            updated_at:
              format: date-time
              type: string
            value:
              description: |
                The value the classification represents. The meaning of this attribute depends on the type of classification.
              type: string
            value_path:
              description: |
                For hierarchical classifications this is a concatenated string of all the classification
                values from the root to this classification using a `: ` as separator.
              example: "Comedy: Standup"
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        type:
          description: The type of resource. This is always `classifications`
          example: classifications
          type: string
      type: object
    ClassificationInclusion:
      description: |
        Connects a Classification with a classified item like a Series, Season or Episode.
      properties:
        attributes:
          properties:
            classification_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `classification` in a future update.<br/>
                The ID of the classification linked to the entity
              example: 497aad13-1c96-41d8-80e2-9a5aa7bc96fa
              format: uuid
              type: string
            classification_type:
              deprecated: true
              description: This will be replaced by the relationship `classification` in a future update.<br/>
              enum:
                - AlternateFeedType
                - Genre
                - Industry
                - Language
                - MediaRating
              type: string
            classified_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `classified` in a future update.<br/>
                The ID of the entity linked to the classification
              example: 8e9dc5d8-8a16-424e-ba96-6a7261a9a23b
              format: uuid
              type: string
            classified_type:
              deprecated: true
              description: This will be replaced by the relationship `classified` in a future update.<br/>
              enum:
                - Series
                - Season
                - Episode
              type: string
            created_at:
              format: date-time
              type: string
            position:
              description: The position or order of the linked classification within the classified resource
              type: integer
            primary:
              description: |
                When `true` it describes the best classification of a specific type for a given
                classified item
              type: boolean
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            classification:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
          type: object
        type:
          description: The type of resource. This is always `classification_inclusion`
          example: classification_inclusion
          type: string
      type: object
    Credit:
      description: |
        A credit links a specific person to a series, season, or episode in a specific role.
      properties:
        attributes:
          properties:
            created_at:
              format: date-time
              type: string
            position:
              description: The order of this credit within all credits of the referenced creditable entity
              type: integer
            type:
              description: The type of credit the linked person has on the referenced entity
              enum:
                - AnchorCredit
                - AssociateProducerCredit
                - AuthorCredit
                - CastCredit
                - CoHostCredit
                - ComposerCredit
                - CreatorCredit
                - Credit
                - DirectorCredit
                - EditorCredit
                - EngineerCredit
                - ExecutiveProducerCredit
                - GuestCoHostCredit
                - GuestCredit
                - GuestHostCredit
                - HeadWriterCredit
                - HostCredit
                - ProducerCredit
                - ReporterCredit
                - SeniorProducerCredit
                - SidekickCredit
                - VideoProducerCredit
                - WriterCredit
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            creditable:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            person:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
          type: object
        type:
          description: The type of resource. This is always `credits`
          example: credits
          type: string
      type: object
    Episode:
      properties:
        attributes:
          properties:
            allow_user_comments:
              description: |
                Only visible to credentials having write privileges for the series.
              type: boolean
            cascaded_cover_image_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `cascaded_cover_image` in a future update.<br/>
                The image ID of the cover art for this episode. This is the preferred image ID to use.
                If there is no specific cover for the episode, the image ID of the season or the
                series will be returned, whichever has one defined.
                The `/images` endpoint provides details to the image.
              example: ec8f13bf-77c0-40fe-933a-8c088c16bc17
              format: uuid
              type: string
            cover_image_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `cover_image` in a future update.<br/>
                The image ID of the cover art for this episode, if an episode-specific image has been provided.
                The `/images` endpoint provideds details to the image.
              example: ec8f13bf-77c0-40fe-933a-8c088c16bc17
              format: uuid
              type: string
            created_at:
              format: date-time
              type: string
            description:
              description: The description of the episode, possibly in HTML format
              example: <p><strong>Some</strong> funny example.</p>
              type: string
            description_is_html:
              description: Determines whether `description` is in HTML format or plain.
              type: boolean
            description_plain:
              description: |
                The description with all HTML markup removed. If the description does not contain markup,
                this is identical to `description`.
              example: Some funny example.
              type: string
            file_name:
              description: The file name, without extension, to present users when downloading the episode
              type: string
            itunes_type:
              description: The type of the episode according to Apple's type categorization
              enum:
                - full
                - bonus
                - trailer
              type: string
            listen_count:
              description: |
                The number of total downloads all time for this episode.
                Only visible if the credential has the right privilege on the series.
              type: integer
            premium_status:
              description: The current premium status of the episode
              enum:
                - active
                - inactive
                - force-active
                - force-inactive
              type: string
            published:
              description: |
                If `true`, the episode will be available for download and included in the feed as soon as its
                release time is reached, provided it has a valid media file, and `release_end_at` is in the future (if applicable).
              type: boolean
            release_end_at:
              description: |
                The date and time when an episode will no longer be included in the feed, or available for download.
                `Published` will remain `true` unless the episode is manually unpublished.
              format: date-time
              type: string
            release_immediately:
              deprecated: true
              description: |
                If `true`, the episode's release time is set in a way it is considered released right away.
                Only visible if the credential has write privileges on the series.
              type: boolean
            released_at:
              description: |
                The date and time when an episode will be released. It will be available for download and included
                in the feed if this time is reached, `published` is set to `true`, and the episode has a media file.
              format: date-time
              type: string
            rss_guid:
              description: |
                A globally unique identifier describing the episode. This ID is commonly used by podcast applications
                to determine whether an episode has already been downloaded or not.
              type: string
            season_id:
              deprecated: true
              description: |
                Use the relationship `season` instead.<br />
                The ID of the season an episode belongs to. This can be `null`. A series can have episodes with and
                without seasons at the same time.
              example: eba5523d-e73a-43ec-bfd9-140ce9db76ac
              format: uuid
              type: string
            series_id:
              deprecated: true
              description: |
                Use the relationship `series` instead.<br />
                The ID of the series an episode belongs to.
              example: 9897f8cb-ffa7-4674-9529-c6037826c738
              format: uuid
              type: string
            sort_title:
              description: |
                The title of the episode modified for sorting. This converts all characters to
                lower case, removes an eventually leading `The` as well as leading and trailling whitespace characters.
              example: big hit
              type: string
            status:
              description: The status of an episode
              enum:
                - active
                - inactive
              type: string
            title:
              description: The title of the episode
              example: The Big Hit
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            cascaded_cover_image:
              description: |
                The cover art for this episode. This is the preferred image to use.
                If there is no specific cover image for the episode, the cover of the season or the
                series will be returned, whichever has one defined.
                The `/images` endpoint provides details to the image.
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            classification_inclusions:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of classifications associated with the episode
              type: object
            cover_image:
              description: |
                The cover art for this episode, if an episode-specific image has been provided.
                The `/images` endpoint provideds details to the image.
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            credits:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of credits given to people in the episode
              type: object
            default_marker_points:
              description: Only visible if the credential has write privileges on the series
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of default (WarpFeed) marker points
              type: object
            episode_versions:
              description: Only visible if the credential has write privileges on the series
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of episode versions for this episode
              type: object
            images:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: Both the cover image and the cascaded cover image for the season
              type: object
            season:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              title: The season the episode belongs to
              type: object
            segment_lists:
              description: Only visible if the credential has write privileges on the series
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of segment lists directly attached to the episode
              type: object
            series:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              title: The series an episode belongs to
              type: object
            taggings:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of associations linking tags to the episodes.
              type: object
            tags:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of tags associated with the episodes
              type: object
          type: object
        type:
          description: The type of resource. This is always `episodes`
          example: episodes
          type: string
      type: object
    Image:
      properties:
        attributes:
          properties:
            bucket_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `bucket` in a future update.<br/>
                The ID of the owning entity
              example: 687282a1-faf7-4d37-8f4a-cbddedf6db8f
              format: uuid
              type: string
            bucket_type:
              deprecated: true
              description: |
                This will be replaced by the relationship `bucket` in a future update.<br/>
                The type of the owning entity
              enum:
                - AdRepAccount
                - Agency
                - Network
                - Series
                - User
              type: string
            created_at:
              format: date-time
              type: string
            crop_data:
              properties:
                height:
                  description: The height of the crop area
                  example: 3000
                  format: float
                  type: number
                left:
                  description: The left coordinate of the crop area
                  example: 100
                  format: float
                  type: number
                top:
                  description: The top coordinate of the crop area
                  example: 150
                  format: float
                  type: number
                width:
                  description: The width of the crop area
                  example: 3000
                  format: float
                  type: number
              title: The crop area within the original media asset
              type: object
            status:
              description: |
                The current value of the image state machine. It starts with `uploaded` and
                transitions to `processing` once a worker has picked it up. If all variations and
                styles of an image have been successfully created, the status becomes `valid`. In
                case of a problem during the processing it changes to `invalid`.
              enum:
                - invalid
                - processing
                - uploaded
                - valid
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            media_assets:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: All media assets available for this image
              type: object
          type: object
        type:
          description: The type of resource. This is always `images`
          example: images
          type: string
      type: object
    Links:
      properties:
        first:
          description: A URL to retrieve the first page of data keeping the provided page size
          type: string
        last:
          description: A URL to retrieve the last page of data keeping the provided page size
          type: string
        next:
          description: A URL to retrieve the next page of data keeping the provided page size
          type: string
        prev:
          description: A URL to retrieve the previous page of keeping using the provided page size
          type: string
        self:
          description: A URL to retrieve the collection as the primary data
          type: string
      type: object
    MediaAsset:
      properties:
        attributes:
          properties:
            attachment_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `attachment` in a future update.<br/>
                The ID of the entity this media asset is attached to
              example: 09a93847-d5bf-47b4-90d6-854e95011951
              format: uuid
              type: string
            attachment_type:
              deprecated: true
              description: |
                This will be replaced by the relationship `attachment` in a future update.<br/>
                The type of the entity this media asset is attached to
              enum:
                - Image
                - Segment
                - SegmentList
              type: string
            cdn_url:
              description: The CDN-URL where the media asset is available
              type: string
            content_type:
              description: The MIME type of the media asset
              example: image/jpeg
              type: string
            created_at:
              format: date-time
              type: string
            file_name:
              description: |
                The filename of the media asset without any path components.
              type: string
            file_size:
              description: The size in bytes of the media asset
              example: 2544307
              type: integer
            size_height:
              description: The height in pixels of the media asset, if the media asset is an image
              example: 1839
              type: integer
            size_width:
              description: The width in pixels of the media asset, if the media asset is an image
              example: 1839
              type: integer
            style:
              description: |
                The style of the media asset. A media asset is part of a collection of related media files,
                for example an image or an episode (audio). Images usually have differently sized versions,
                and episodes can have different audio formats.
              enum:
                - info
                - itunes
                - medium
                - original
                - regular
                - square-400
                - square-640
                - square-888
                - square-3000
                - stripped-original
                - thumb
                - waveform_data
              example: regular
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        type:
          description: The type of resource. This is always `media_assets`
          example: media_assets
          type: string
      type: object
    Network:
      properties:
        attributes:
          properties:
            copyright:
              description: The copyright of the network
              type: string
            created_at:
              format: date-time
              type: string
            description:
              description: The description of the network eventually in HTML format
              example: <p><strong>Some</strong> funny example.</p>
              type: string
            description_is_html:
              description: Determines whether `description` is in HTML format or plain.
              type: boolean
            description_plain:
              description: |
                The description with all HTML markup removed. If the description does not contain markup
                this is identitcal to `description`.
              example: Some funny example.
              type: string
            facebook_url:
              description: Where to find this network on Facebook
              type: string
            instagram_url:
              description: Where to find this network on Instagram
              type: string
            linkedin_url:
              description: Where to find the network on LinkedIn
              type: string
            name:
              description: The name of the network
              type: string
            public_email:
              description: A public point of contact through email
              type: string
            public_page_enabled:
              description: |
                If this is `true`, a public web page for this network is available under
                `https://art19.com/networks/{slug}`, where `slug` is the value of the corresponding attribute.
                This public page provides details about the network as well as descriptive links to all its
                series' public pages. If this is `false`, no such public page is available.
              type: boolean
            slug:
              description: |
                The unique slug for the network also used on its public page for example.
                This value is unique system-wide amongst all networks _and_ series.
              type: string
            tumblr_url:
              description: Where to find the network on Tumblr
              type: string
            twitter_url:
              description: Where to find the network on Twitter
              type: string
            updated_at:
              format: date-time
              type: string
            website_url:
              description: A public website for the network
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            cover_image:
              description: The cover image for the network
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            images:
              description: |
                A collection of images linked to the network. This currently only includes
                the cover image for the network.
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              type: object
            parent:
              description: The parent network of the network
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            series:
              description: List of series within the network which are accessible to you
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              type: object
          type: object
        type:
          description: The type of resource. This is always `networks`
          example: networks
          type: string
      type: object
    Person:
      properties:
        attributes:
          properties:
            avatar_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `avatar` in a future update.<br/>
                The image ID of an avatar or head shot of the person. Details can be
                retrieved using the `/images` endpoint.
              example: 686ae786-6bbe-42f4-9a51-9e1cf207fc8b
              format: uuid
              type: string
            biography:
              description: The biography of the person without markup.
              type: string
            born:
              description: The birthday of the person
              format: date
              type: string
            created_at:
              format: date-time
              type: string
            died:
              description: The day of death of the person
              format: date
              type: string
            first_name:
              description: The first name of the person
              type: string
            from_country:
              description: The country the person is from
              type: string
            from_locality:
              description: The locality or city the person is from
              type: string
            from_region:
              description: The region/state/province the person is from
              type: string
            last_name:
              description: The last name of the person
              type: string
            public_email:
              description: The public email contact for the person
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            avatar:
              description: |
                The avatar or head shot of the person. Details can be retrieved using the `/images` endpoint.
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
          type: object
        type:
          description: The type of resource. This is always `people`
          example: people
          type: string
      type: object
    ResourceIdentifier:
      properties:
        id:
          description: The ID of the resource
          example: 5ea7da99-be17-45d5-84f5-c7bc01a2b1d6
          format: uuid
          type: string
        type:
          description: The type of the resource
          type: string
      type: object
    ResourceLink:
      description: Links related to the retrieved resource
      properties:
        self:
          description: A URL to retrieve the resource as the primary data
          type: string
      title: Links
      type: object
    Season:
      properties:
        attributes:
          properties:
            cascaded_cover_image_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `cascaded_cover_image` in a future update.<br/>
                The image ID of the cover art for this season. If there is no specific cover for the season,
                the image ID of the series' cover art will be returned.
                The `/images` endpoint provideds details to the image.
              example: ec8f13bf-77c0-40fe-933a-8c088c16bc17
              format: uuid
              type: string
            cover_image_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `cover_image` in a future update.<br/>
                The image ID of the cover art for this season. The `/images` endpoint provideds details to the image.
              example: ec8f13bf-77c0-40fe-933a-8c088c16bc17
              format: uuid
              type: string
            created_at:
              format: date-time
              type: string
            description:
              description: The description of the season eventually in HTML format
              example: <p><strong>Some</strong> funny example.</p>
              type: string
            description_is_html:
              description: Determines whether `description` is in HTML format or plain.
              type: boolean
            description_plain:
              description: |
                The description with all HTML markup removed. If the description does not contain markup
                this is identitcal to `description`.
              example: Some funny example.
              type: string
            first_released_episode_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `first_released_episode` in a future update.<br/>
                The ID of the first released episode within the season
              example: 73a97f1a-5c3c-4226-8ab3-1d7f9e486e4d
              format: uuid
              type: string
            last_released_episode_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `last_released_episode` in a future update.<br/>
                The ID of the most recently released episode within the season
              example: a50b7a22-2128-46d7-b3df-2b308df21bf0
              format: uuid
              type: string
            season_number:
              description: The number of the season. This could be `null` as well.
              example: 1
              type: integer
            sort_title:
              description: |
                The title of the season modified for sorting. This converts all characters to
                lower case, removes an eventually leading `The` as well as leading and trailling whitespace characters.
              example: awesome season
              type: string
            status:
              description: The current status of the season
              enum:
                - active
                - inactive
              type: string
            title:
              description: The title of the season
              example: The Aweseom Season
              type: string
            updated_at:
              format: date-time
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            cascaded_cover_image:
              description: |
                The cover art for this season. If there is no specific cover for the season,
                the cover image of the series' cover art will be returned.
                The `/images` endpoint provideds details to the image.
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            classification_inclusions:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of classifications associated with the season
              type: object
            cover_image:
              description: The cover image for the season
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            credits:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of credits given to people in the season
              type: object
            episodes:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of published and released episodes with an actual media file within the season
              type: object
            first_released_episode:
              description: The first released episode within the season
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            images:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: Both the cover image and the cascaded cover image for the season
              type: object
            last_released_episode:
              description: The most recently released episode within the season
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            series:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              title: The series the season belongs to
              type: object
            taggings:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of associations linking tags to the season.
              type: object
            tags:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of tags associated with the season
              type: object
          type: object
        type:
          description: The type of resource. This is always `seasons`
          example: seasons
          type: string
      type: object
    Series:
      properties:
        attributes:
          properties:
            amazon_subscription_badge_enabled:
              description: If `null` or `true`, the ART19 web player will render an Amazon subscription badge
              type: boolean
            amazon_subscription_url:
              description: The Amazon Music subscription URL
              type: string
            castbox_subscription_url:
              description: The CastBox subscription URL
              type: string
            cover_image_id:
              deprecated: true
              description: |
                This will be replaced by the relationship `cover_image` in a future update.<br/>
                The image ID of the cover art for this series. The `/images` endpoint provideds details to the image.
              example: ec8f13bf-77c0-40fe-933a-8c088c16bc17
              format: uuid
              type: string
            created_at:
              format: date-time
              type: string
            description:
              description: The description of the series eventually in HTML format
              example: <p><strong>Some</strong> funny example.</p>
              type: string
            description_is_html:
              description: Determines whether `description` is in HTML format or plain.
              type: boolean
            description_plain:
              description: |
                The description with all HTML markup removed. If the description does not contain markup
                this is identitcal to `description`.
              example: Some funny example.
              type: string
            facebook_url:
              description: The URL of the series on Facebook
              type: string
            google_subscription_url:
              description: The Google subscription URL
              type: string
            iheart_subscription_url:
              description: The iHeartRadio subscription URL
              type: string
            instagram_url:
              description: The URL of the series on Instagram
              type: string
            itunes_subscription_badge_enabled:
              description: If `null` or `true`, the ART19 web player will render an iTunes subscription badge
              type: boolean
            itunes_subscription_url:
              description: The Apple iTunes subscription URL
              type: string
            linkedin_url:
              description: The URL of the series on LinkedIn
              type: string
            pocket_casts_subscription_url:
              description: The Pocket Casts subscription URL
              type: string
            podcast_subscription_url:
              description: The URL of the RSS feed
              example: https://rss.art19.com/greatest-show-ever
              type: string
            public_page_enabled:
              description: |
                If this is `true`, a public web page for this series is available under
                `https://art19.com/shows/{slug}`, where `slug` is the value of the corresponding attribute.
                This public page provides details about the series as well as descriptive links to all its
                episodes. If this is `false`, no such public page is available.
              type: boolean
            public_title:
              description: If present, this is the preferred title for the series in the RSS Feed
              type: string
            radio_public_subscription_url:
              description: The RadioPublic subscription URL
              type: string
            rss_author:
              description: The author responsible for the RSS feed
              type: string
            rss_copyright:
              description: The copyright disclaimer for the contents of the show, appearing after a © symbol, e.g. `2020 ART19, Inc.`
              type: string
            rss_email:
              description: The pubic point of contact for the show
              type: string
            rss_owner:
              description: The name of the contact for the show
              type: string
            slug:
              description: |
                This slug is unique over all series and networks system wide and is used to access the series' feed
                as well as its eventually enabled public page on ART19.
              example: greatest-show-ever
              type: string
            sort_title:
              description: |
                The title of the series modified for sorting. This converts all characters to
                lower case, removes an eventually leading `The` as well as leading and trailling whitespace characters.
              example: greatest show ever
              type: string
            spotify_subscription_badge_enabled:
              description: If `null` or `true`, the ART19 web player will render a Spotify subscription badge
              type: boolean
            spotify_subscription_url:
              description: The Spotify subscription URL
              type: string
            status:
              description: The status of the series
              enum:
                - active
                - inactive
              type: string
            stitcher_subscription_badge_enabled:
              description: If `null` or `true`, the ART19 web player will render a Stitcher subscription badge
              type: boolean
            stitcher_subscription_url:
              description: The Stitcher subscription URL
              type: string
            title:
              description: The title of the series
              example: The greatest show ever
              type: string
            tumblr_url:
              description: The URL of the series on Tumblr
              type: string
            tune_in_subscription_url:
              description: The TuneIn subscription URL
              type: string
            twitter_url:
              description: The URL of the series on Twitter
              type: string
            type:
              description: The type of the series
              enum:
                - Series
              type: string
            updated_at:
              format: date-time
              type: string
            website_url:
              description: The custom website URL for the series
              type: string
          type: object
        id:
          example: c1fbb1bf-45b1-4803-986e-123166f7f427
          format: uuid
          type: string
        relationships:
          properties:
            classification_inclusions:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of classifications associated with the series
              type: object
            cover_image:
              description: The cover image for the series
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              type: object
            credits:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of credits given to people in the series
              type: object
            episodes:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of published and released episodes with an actual media file
              type: object
            images:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: The cover image for the series
              type: object
            network:
              properties:
                data:
                  $ref: "#/components/schemas/ResourceIdentifier"
              title: The network the series belongs to
              type: object
            seasons:
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of seasons in the series
              type: object
            taggings:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of associations linking tags to the series
              type: object
            tags:
              deprecated: true
              properties:
                data:
                  items:
                    $ref: "#/components/schemas/ResourceIdentifier"
                  type: array
              title: A list of tags associated with the series
              type: object
          type: object
        type:
          description: The type of resource. This is always `series`
          example: series
          type: string
      type: object
  securitySchemes:
    api_key:
      description: |
        Authentication is **REQUIRED** for all APIs using an API token, which is placed into an HTTP Authorization header.

        This token is generated by ART19 Support and consists of a shared secret placed in the `token`
        parameter and a credential ID placed in the `credential` parameter.

        The final Authorization header will look like this:

        ```
        Authorization: Token token="V2h5LCBoZWxsbyB0aGVyZSE=", credential="8f71320c-fdbc-4934-b3b9-f1eda4fb39a9"
        ```
      in: header
      name: Authorization
      type: apiKey
