<commit_before>base_path: "/twitch"
endpoints:
    - route: ""
      notes:
        - 'Lists the currently available endpoints - <strong>Returns a JSON object</strong>'
    - route: "chat_rules/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name to retrieve the chat rules for.'
      notes:
        - 'Gives a "newlined" list of chat rules for the specified channel.'
    - route: "clusters/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel to check chat cluster for.'
      notes:
        - 'Retrieves the chat cluster name for the channel specified.'
        - 'Note that this is essentially useless from now on, as all requests will (most likely) return <code>aws</code>.'
    - route: "creation/{USER}"
      parameters:
        - name: "{USER}"
          description: "The name of the user."
      notes:
        - Retrieves the creation date/time of the specified user.
      qs:
        - name: "format"
          description:
            - 'Formats the date/time based on the <a href="https://secure.php.net/manual/en/function.date.php#refsect1-function.date-parameters">format string</a> specified.'
            - 'Default format: <code>M j. Y - h:i:s A (e)</code>'
          required: false
          type: "string"
        - name: "tz"
          description: 'Specify the timezone that you want the date/time to be displayed as. <a href="https://secure.php.net/manual/en/timezones.php">Click here for valid timezones</a>'
          required: false
          type: "string"
    - route: "emoteslots/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The name of the channel. Will only be used for reference.'
      qs:
        - name: "subscribers"
          description: 'The amount of subscribers, used for calculating how many subscribers are needed to get the next amount of emote slots.'
          required: true
          type: "int"
    - route: "followage/{CHANNEL}/{USER}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name that will be used as reference for checking the "follow age".'
        - name: "{USER}"
          description: 'The name of the user that you wish to check the "follow age" for.'
      qs:
        - name: "precision"
          description: 'How precise the timestamp should be in terms of years, months, weeks, days, hours, minutes & seconds.- Default: <code>2</code>.'
          type: "int"
      notes:
        - 'Gets the time difference (also known as the "follow age") between when <code>{USER}</code> followed <code>{CHANNEL}</code>'
    - route: "followed/{CHANNEL}/{USER}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
        - name: "{USER}"
          description: 'The name of the user.'
      notes:
        - 'Retrieves the date and time of when the user followed the channel.'
        - 'Example format: <code>Mar 13. 2016 - 07:31:29 PM (UTC)</code>'
    - route: "followers/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name of the channel you wish to retrieve followers for.'
      qs:
        - name: "count"
          description: 'How many followers to get with the request. Default: <code>1</code>. Max: <code>100</code>.'
          type: "int"
        - name: "offset"
          description: 'How many followers to offset from the beginning of the object.'
          type: "int"
        - name: "direction"
          description: "What direction to retrieve followers in. Can either be 'asc' or 'desc'. Default: <code>desc</code>."
          type: "string"
        - name: "num"
          description: "Prefixes each follower with a number."
          type: "none"
      notes:
        - 'Lists the most recent follower(s) a channel has.'
    - route: "game/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: "The channel name."
      notes:
        - 'Retrieves the current game the channel has been set to.'
    - route: "help/{SEARCH}"
      parameters:
        - name: "{SEARCH}"
          description: 'The string to search for in the titles of the help articles.'
      qs:
        - name: "list"
          description: 'If this is specified at all, a list of available help articles will be returned instead.'
      notes:
        - 'Allows you to search help article titles and return the full title + URL.'
        - '<strong>JSON results are supported for most requests</strong> (search + help articles).'
    - route: "highlight/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      notes:
        - 'Retrieves the latest "highlight" of the specified channel.'
    - route: "hosts/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      qs:
        - name: "display_name"
          description: 'If specified, this will use the display names instead of the usernames of the users that are hosting.'
        - name: "list"
          description: 'If specified, the list will be in plaintext (using newlines) instead of in a JSON object.'
        - name: "implode"
          description: 'If specified, the list will be returned comma-separated (", ") instead of JSON/a "newlined" list.'
        - name: "limit"
          description: "If specified, the list will be comma-separated up until the maximum 'limit' of channels. Example: If 10 channels are hosting you, and the limit is set to '2', then it will for example say: decicus, mellow and 8 others"
      notes:
        - 'Returns a list of channel names hosting the specified channel.'
        - '<strong>JSON results are returned by default. See <code>list/implode</code> query string.</strong>.'
    - route: "hostscount/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      notes:
        - 'This will return the <strong>channel count</strong> of how many channels are currently hosting the <i>specified channel</i>.'
    - route: "id/{USER}"
      parameters:
        - name: "{USER}"
          description: 'The name of the user.'
      notes:
        - 'Returns the Twitch user ID of the specified user (if valid).'
    - route: "ingests"
      notes:
        - 'Returns a formatted list of available ingest servers.'
    - route: "multi/{STREAMS}"
      parameters:
        - name: "{STREAMS}"
          description: 'A space-separated list of streams to generate a multi link with.'
      qs:
        - name: "streams"
          description: 'Can be used as an alternative to the <code>{STREAMS}</code> route parameter.'
        - name: "service"
          description: 'Chooses which multistream service you want to use. Specify something bogus for this parameter to get a list of available services. Default: <code>multistream</code>.'
      notes:
        - 'Generates a "multi stream" URL based on the channel names passed to it.'
        - 'While the <code>streams</code> <strong>query</strong> parameter is optional, you have to specify the streams as <strong>either</strong> a <strong>route</strong> parameter or as the <code>streams</code> <strong>query</strong> parameter.'
    - route: "random_sub"
      qs:
        - name: "token"
          required: true
          description: 'The channel\'s OAuth token with the <code>channel_subscriptions</code> scope.'
        - name: "count"
          description: "The amount of subscribers to retrieve - Default: <code>1</code>."
          type: "int"
        - name: "field"<commit_msg>Fix YAML for /twitch/random_sub<commit_after>base_path: "/twitch"
endpoints:
    - route: ""
      notes:
        - 'Lists the currently available endpoints - <strong>Returns a JSON object</strong>'
    - route: "chat_rules/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name to retrieve the chat rules for.'
      notes:
        - 'Gives a "newlined" list of chat rules for the specified channel.'
    - route: "clusters/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel to check chat cluster for.'
      notes:
        - 'Retrieves the chat cluster name for the channel specified.'
        - 'Note that this is essentially useless from now on, as all requests will (most likely) return <code>aws</code>.'
    - route: "creation/{USER}"
      parameters:
        - name: "{USER}"
          description: "The name of the user."
      notes:
        - Retrieves the creation date/time of the specified user.
      qs:
        - name: "format"
          description:
            - 'Formats the date/time based on the <a href="https://secure.php.net/manual/en/function.date.php#refsect1-function.date-parameters">format string</a> specified.'
            - 'Default format: <code>M j. Y - h:i:s A (e)</code>'
          required: false
          type: "string"
        - name: "tz"
          description: 'Specify the timezone that you want the date/time to be displayed as. <a href="https://secure.php.net/manual/en/timezones.php">Click here for valid timezones</a>'
          required: false
          type: "string"
    - route: "emoteslots/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The name of the channel. Will only be used for reference.'
      qs:
        - name: "subscribers"
          description: 'The amount of subscribers, used for calculating how many subscribers are needed to get the next amount of emote slots.'
          required: true
          type: "int"
    - route: "followage/{CHANNEL}/{USER}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name that will be used as reference for checking the "follow age".'
        - name: "{USER}"
          description: 'The name of the user that you wish to check the "follow age" for.'
      qs:
        - name: "precision"
          description: 'How precise the timestamp should be in terms of years, months, weeks, days, hours, minutes & seconds.- Default: <code>2</code>.'
          type: "int"
      notes:
        - 'Gets the time difference (also known as the "follow age") between when <code>{USER}</code> followed <code>{CHANNEL}</code>'
    - route: "followed/{CHANNEL}/{USER}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
        - name: "{USER}"
          description: 'The name of the user.'
      notes:
        - 'Retrieves the date and time of when the user followed the channel.'
        - 'Example format: <code>Mar 13. 2016 - 07:31:29 PM (UTC)</code>'
    - route: "followers/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name of the channel you wish to retrieve followers for.'
      qs:
        - name: "count"
          description: 'How many followers to get with the request. Default: <code>1</code>. Max: <code>100</code>.'
          type: "int"
        - name: "offset"
          description: 'How many followers to offset from the beginning of the object.'
          type: "int"
        - name: "direction"
          description: "What direction to retrieve followers in. Can either be 'asc' or 'desc'. Default: <code>desc</code>."
          type: "string"
        - name: "num"
          description: "Prefixes each follower with a number."
          type: "none"
      notes:
        - 'Lists the most recent follower(s) a channel has.'
    - route: "game/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: "The channel name."
      notes:
        - 'Retrieves the current game the channel has been set to.'
    - route: "help/{SEARCH}"
      parameters:
        - name: "{SEARCH}"
          description: 'The string to search for in the titles of the help articles.'
      qs:
        - name: "list"
          description: 'If this is specified at all, a list of available help articles will be returned instead.'
      notes:
        - 'Allows you to search help article titles and return the full title + URL.'
        - '<strong>JSON results are supported for most requests</strong> (search + help articles).'
    - route: "highlight/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      notes:
        - 'Retrieves the latest "highlight" of the specified channel.'
    - route: "hosts/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      qs:
        - name: "display_name"
          description: 'If specified, this will use the display names instead of the usernames of the users that are hosting.'
        - name: "list"
          description: 'If specified, the list will be in plaintext (using newlines) instead of in a JSON object.'
        - name: "implode"
          description: 'If specified, the list will be returned comma-separated (", ") instead of JSON/a "newlined" list.'
        - name: "limit"
          description: "If specified, the list will be comma-separated up until the maximum 'limit' of channels. Example: If 10 channels are hosting you, and the limit is set to '2', then it will for example say: decicus, mellow and 8 others"
      notes:
        - 'Returns a list of channel names hosting the specified channel.'
        - '<strong>JSON results are returned by default. See <code>list/implode</code> query string.</strong>.'
    - route: "hostscount/{CHANNEL}"
      parameters:
        - name: "{CHANNEL}"
          description: 'The channel name.'
      notes:
        - 'This will return the <strong>channel count</strong> of how many channels are currently hosting the <i>specified channel</i>.'
    - route: "id/{USER}"
      parameters:
        - name: "{USER}"
          description: 'The name of the user.'
      notes:
        - 'Returns the Twitch user ID of the specified user (if valid).'
    - route: "ingests"
      notes:
        - 'Returns a formatted list of available ingest servers.'
    - route: "multi/{STREAMS}"
      parameters:
        - name: "{STREAMS}"
          description: 'A space-separated list of streams to generate a multi link with.'
      qs:
        - name: "streams"
          description: 'Can be used as an alternative to the <code>{STREAMS}</code> route parameter.'
        - name: "service"
          description: 'Chooses which multistream service you want to use. Specify something bogus for this parameter to get a list of available services. Default: <code>multistream</code>.'
      notes:
        - 'Generates a "multi stream" URL based on the channel names passed to it.'
        - 'While the <code>streams</code> <strong>query</strong> parameter is optional, you have to specify the streams as <strong>either</strong> a <strong>route</strong> parameter or as the <code>streams</code> <strong>query</strong> parameter.'
    - route: "random_sub"
      qs:
        - name: "token"
          required: true
          description: 'The OAuth token belonging to the channel owner with the <code>channel_subscriptions</code> scope.'
        - name: "count"
          description: "The amount of subscribers to retrieve - Default: <code>1</code>."
          type: "int"
        - name: "field"
{'fraction_non_alphanumeric': 0.11064499213424227, 'fraction_numerical': 0.003015207131620346, 'mean_word_length': 2.281781028178103, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5870642', 'n_tokens_mistral': 4106, 'n_tokens_neox': 4006, 'n_words': 1644}