UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 172 kB
{"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).\n\nAPI requests **MUST** use the HTTP Accept header:\n\n`Accept: application/vnd.api+json`\n\nAPI requests **MUST** be authenticated using the HTTP Authorization header:\n\n`Authorization: Token token=\"your-token\", credential=\"your-credential\"`\n\n## General Notes\n\nSome query parameters use unencoded [ and ] characters simply for readability. Defaults, examples, and\npossible values are additionally rendered in double quotes for readability. In practice, query parameters should\nnot have quotes around the values (e.g., `foo=bar` is valid, not `foo=\"bar\"`), and both query parameter keys\nand values must be percent-encoded, per the requirements in [RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).\n\n## Rate Limiting\n\nIn order to provide a fair distribution of available resources, all API calls are subject to rate limits.\nIf you exceed the number of API calls per minute granted to your credential, a `429 Too Many Requests`\nerror response will be returned.\n\nIn that case, a `Retry-After` header MAY be included in the response, describing the number of seconds\nafter which a request can be retried.\n\nIf you run into a high number of 429 errors, please reach out to ART19 Support to adjust your rate limit.\n\n### Example\n\nIn the following example the request can be retried after waiting for 21 seconds:\n\n HTTP/1.1 429 Too Many Requests\n Content-Type: text/html\n Retry-After: 21\n\n## Pagination\n\nRequests to collection endpoints **SHOULD** provide pagination parameters.\nSome endpoints **REQUIRE** pagination parameters to be provided.\nWhenever pagination is provided, it **MUST** be valid.\nFailing to provide pagination when it is required or providing wrong or incomplete pagination\nalways results in a `400 Bad Request` error response.\n\nThe page numbering starts with `1` and the maximum page size (if not otherwise documented\non an endpoint) is `100`. Pagination **MUST NOT** be specified if requesting a list of IDs (using an `ids[]` parameter).\n\nProviding invalid values for page number or page size, as well as providing only a page number or only a page size,\nis considered an error. Pagination is provided like this:\n\n`page[number]=1&page[size]=25`\n\nResponses conform to the [JSON:API specification's pagination section](https://jsonapi.org/format/#fetching-pagination)\nby including pagination links. Your requested page size will be carried into the pagination links.\n\n## Sorting\n\nRequests to collection endpoints usually accept a `sort` parameter. Please refer to the\n[JSON:API Specification's sorting section](https://jsonapi.org/format/#fetching-sorting) for further details.\n\n## Relationship Linking\n\nCurrently, resources return all of their relationships, in no particular order, pursuant to how relationships\nshould be returned [according to the JSON:API specification](https://jsonapi.org/format/#document-resource-object-relationships). Consumers of this API\n**MUST NOT** make assumptions about the order of these collections. Even though this data is not currently paginated, consumers **MUST** support\npaginating relationships per the JSON:API specification if this data is important for their application.\n","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.\n\nIn order to retrieve a set of classification inclusions, at least one of the following filter parameters must\nbe provided. Failing to do so renders a `400 Bad Request` response.\n\n- `ids[]`\n- `classified_id` and `classified_type`\n- `classified_id` and `classification_type`\n- `classification_id` and `classified_type`\n","parameters":[{"description":"The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.\nThe brackets *MUST* be percent-encoded, per the requirements in\n[RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).\n","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.\n\n","in":"query","name":"page[number]","schema":{"minimum":1,"type":"integer"}},{"description":"Indicate how many records to return per page. The maximum is 100.\n\n","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.\nDepending on the permissions of your credential, only a subset of these types are usable.\n","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.\nYou will have to use this filter together with either `classified_type` or `classification_type`.\n","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\nthe parameter value disregarding case.\n","in":"query","name":"q","schema":{"type":"string"}},{"description":"Specify how to sort the result. Please refer to either the top section or the\n[JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.\n","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\n[JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full\ndescription of the returned object.\n","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.\n","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.\n","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).\n","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\nproblem, except for purposes of localization.\n","example":"Bad Request","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Bad Request\n\nParameters requiring a specific format must adhere to that format.\nPagination must have a positive page number and a page size no larger than 100. At least one filter parameter is required.\n"},"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(\n \"https://art19.com/classification_inclusions\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"ad3f51ff-4d11-43b9-9612-6a55ecefe2df\"'\n },\n params: {\n # add filters if desired\n page: { number: 1, size: 25 }\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/classification_inclusions?page%5Bnumber%5D=1&page%5Bsize%5D=25', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"0f1a0647-0efb-487d-a736-fb2fcf516a42\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // The API endpoint to request data from\n $url = array('https://art19.com/classification_inclusions');\n\n // Provide extra parameters like filters or pagination to the request\n $url[] = http_build_query(array(\n 'page' => array('number' => 1, 'size' => 25)\n ));\n\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, implode('?', $url));\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"1f653814-5fa6-492e-86ad-2cfc88c0936e\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/classification_inclusions?page%5Bnumber%5D=1&page%5Bsize%5D=25' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"fc346b8c-62c4-4483-8bb6-e4b810466778\"' \\\n --compressed\n"}]}},"/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(\n \"https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"30cfe370-809a-4a88-bc42-e44dae664cb4\"'\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"e9c8c90b-2df7-4337-94ad-c5d82305ecce\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, 'https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123');\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"7410ebaf-5459-4c29-a51e-affe5900832c\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/classification_inclusions/a3d7bca1-d6c8-41e9-8640-9b0950be5123' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"9e419a11-990c-4156-925b-8c5c0d776cdb\"' \\\n --compressed\n"}]}},"/classifications":{"get":{"parameters":[{"description":"The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.\nThe brackets *MUST* be percent-encoded, per the requirements in\n[RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).\n","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.\n\n","in":"query","name":"page[number]","schema":{"minimum":1,"type":"integer"}},{"description":"Indicate how many records to return per page. The maximum is 100.\n\n","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\ndepends on the privileges of the provided credential.\n","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\ndisregarding case.\n","in":"query","name":"q","schema":{"type":"string"}},{"description":"If this parameter is provided and not empty, limit the result to classifications\nof type `Geography` representing countries. The credential must have at least one\nprivilege with a network, series, or advertiser profile.\n","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\n[JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.\n","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\n[JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full\ndescription of the returned object.\n","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.\n","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.\n","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).\n","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\nproblem, except for purposes of localization.\n","example":"Bad Request","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Bad Request\n\nParameters requiring a specific format must adhere to that format.\nPagination 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.\n"},"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(\n \"https://art19.com/classifications\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"4814609f-e1cb-4232-bcf8-cddb03771710\"'\n },\n params: {\n # add filters if desired\n page: { number: 1, size: 25 }\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/classifications?page%5Bnumber%5D=1&page%5Bsize%5D=25', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"ed13badd-d235-4303-a572-cf5b2640a127\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // The API endpoint to request data from\n $url = array('https://art19.com/classifications');\n\n // Provide extra parameters like filters or pagination to the request\n $url[] = http_build_query(array(\n 'page' => array('number' => 1, 'size' => 25)\n ));\n\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, implode('?', $url));\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"0673cdce-d5b6-425f-b113-761ce249d775\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/classifications?page%5Bnumber%5D=1&page%5Bsize%5D=25' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"6bb1e316-8593-4242-a9ac-bd8f0e45da89\"' \\\n --compressed\n"}]}},"/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(\n \"https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"b3427539-3fa8-4c65-91d6-f12cd38a0d7f\"'\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"52f9f879-936f-4a8e-be61-134a57b71967\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, 'https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c');\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"ea6f3275-7207-43b6-ae2d-e123bb228ce3\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/classifications/1f209989-fdb6-492b-b42d-feb7fcc5d77c' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"b7c457a5-27d8-4e8e-849c-bdcaefa5a3d0\"' \\\n --compressed\n"}]}},"/credits":{"get":{"parameters":[{"description":"The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.\nThe brackets *MUST* be percent-encoded, per the requirements in\n[RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).\n","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.\n\n","in":"query","name":"page[number]","schema":{"minimum":1,"type":"integer"}},{"description":"Indicate how many records to return per page. The maximum is 100.\n\n","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\npublished, the credential needs to have the right privilege to list the credits for it.\n","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.\nDepending on the privileges of the credential, this list might be further reduced to\nonly published entities.\n","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\n[JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.\n","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\n[JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full\ndescription of the returned object.\n","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.\n","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.\n","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).\n","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\nproblem, except for purposes of localization.\n","example":"Bad Request","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Bad Request\n\nParameters requiring a specific format must adhere to that format.\nPagination must have a positive page number and a page size no larger than 100. \n"},"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(\n \"https://art19.com/credits\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"6e9f43df-ba69-4b34-a7bf-a404a1ce2c91\"'\n },\n params: {\n # add filters if desired\n page: { number: 1, size: 25 }\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/credits?page%5Bnumber%5D=1&page%5Bsize%5D=25', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"d24beb73-0d00-4f8a-9965-1428c13ffa10\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // The API endpoint to request data from\n $url = array('https://art19.com/credits');\n\n // Provide extra parameters like filters or pagination to the request\n $url[] = http_build_query(array(\n 'page' => array('number' => 1, 'size' => 25)\n ));\n\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, implode('?', $url));\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"86aa529e-7e7c-405b-9d7c-343df164bf04\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/credits?page%5Bnumber%5D=1&page%5Bsize%5D=25' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"a32f46a0-5a99-40e6-b7fc-2f43b29847d2\"' \\\n --compressed\n"}]}},"/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(\n \"https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"2ef2148d-4f43-4533-a876-e38109642432\"'\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"9e247e02-3a42-4a5c-9c4c-0db783dcb40b\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, 'https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1');\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"f600984a-7e2a-4245-872f-b2c16d6d44ac\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/credits/552a4535-6b9a-41a7-875b-94d1145b55a1' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"20de6005-8606-43a2-87da-b7b215d75224\"' \\\n --compressed\n"}]}},"/episodes":{"get":{"description":"One initial filter must be provided (`ids`, `series_id`, or `season_id`), otherwise a `400 Bad Request` response\nwill be returned. Additional filters are allowed.\n\nThis API will only return episodes that your credential has permission to access, which may not be exclusive to\nyour account, depending on the filter(s) being used. Be careful to filter the results as needed.\n","parameters":[{"description":"The list of IDs to filter by. Repeat this parameter for each ID you want to include in the filter.\nThe brackets *MUST* be percent-encoded, per the requirements in\n[RFC 3986 § 3.4](https://tools.ietf.org/html/rfc3986#section-3.4).\n","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.\n\n","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.\n\n","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.\nIf `false`, limit the result to _unpublished_ episodes only.\n","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.\nIf this is `true`, it also changes the default sort order to `-released_at`.\n","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\n[JSON:API specification](https://jsonapi.org/format/#fetching-sorting) on how sorting works in general.\n","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\n[JSON:API Error document reference](https://jsonapi.org/format/#error-objects) for a full\ndescription of the returned object.\n","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.\n","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.\n","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).\n","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\nproblem, except for purposes of localization.\n","example":"Bad Request","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Bad Request\n\nParameters requiring a specific format must adhere to that format.\nPagination 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`).\n"},"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(\n \"https://art19.com/episodes\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"1c6bf089-bf44-41ff-8548-00633174949c\"'\n },\n params: {\n # add filters if desired\n page: { number: 1, size: 25 }\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/episodes?page%5Bnumber%5D=1&page%5Bsize%5D=25', {\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"69c4a3cb-7262-490c-94be-4dea70bb1cd8\"'\n }\n });\n\n if (response.ok) {\n // Get the response body if HTTP-status is 200-299\n const json = await response.json();\n } else {\n // HTTP request failed, handle error\n }\n} catch(err) {\n // A network error occured\n}\n"},{"label":"PHP - cURL","lang":"php","source":"<?php\n// Initialize a cURL resource for a request\n$request = curl_init();\n\ntry {\n // The API endpoint to request data from\n $url = array('https://art19.com/episodes');\n\n // Provide extra parameters like filters or pagination to the request\n $url[] = http_build_query(array(\n 'page' => array('number' => 1, 'size' => 25)\n ));\n\n // Configure the cURL options\n curl_setopt($request, CURLOPT_URL, implode('?', $url));\n curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($request, CURLOPT_ENCODING, '');\n curl_setopt($request, CURLOPT_HTTPHEADER, array(\n 'Accept: application/vnd.api+json',\n 'Authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"5cdc08c4-b1c1-4c85-bab8-05c07a0448fc\"'\n ));\n\n // Execute the request and grab all status information\n $output = curl_exec($request);\n $info = curl_getinfo($request);\n $code = $info['http_code'];\n\n if ($code >= 200 && $code < 300) {\n // HTTP 2xx - JSON:API response available to be parsed in $output\n $json = json_decode($output);\n } else if ($code >= 400 && $code < 500) {\n // HTTP 4xx - Client error; JSON:API response evt. available to be parsed in $output\n if (strlen($output) > 0) {\n $errors = json_decode($output);\n }\n } else {\n // Other HTTP status, treat according to workflow\n }\n} finally {\n // Free up the resource to clear out memory\n curl_close($request);\n}\n?>\n"},{"label":"cURL","lang":"shell","source":"curl 'https://art19.com/episodes?page%5Bnumber%5D=1&page%5Bsize%5D=25' \\\n -H 'accept: application/vnd.api+json' \\\n -H 'authorization: Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"772b87aa-9fe0-4fa4-b24f-cb086b1d3ce6\"' \\\n --compressed\n"}]}},"/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(\n \"https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b\",\n accept_encoding: 'gzip',\n headers: {\n Accept: 'application/vnd.api+json',\n Authorization: 'Token token=\"UVd4c0lFTnZjSKbElFSm\", credential=\"084d390a-a53a-4e6a-a5a6-7558e101dc2d\"'\n },\n timeout: 10\n)\nif response.success?\n # HTTP 2xx - JSON:API available to be parsed in response.body\nelsif response.timed_out?\n # Request timed out\nelsif response.code.zero?\n # cURL didn't get back an HTTP response, the reason is in response.return_message\nelse\n # Other HTTP status, check response.code for which\nend\n"},{"label":"JavaScript - Fetch","lang":"javascript","source":"try {\n const response = await fetch('https://art19.com/episodes/41f1a82c-0010-40ce-a757-034b05d1350b', {\n headers: {\n Accept: 'application/vnd.ap