<commit_before><?php

declare(strict_types=1);

namespace NewTwitchApi\Resources;

use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;

class SubscriptionsApi extends AbstractResource
{
    /**
     * @throws GuzzleException
     * @link https://dev.twitch.tv/docs/api/reference/#get-broadcaster-s-subscribers
     */
    public function getBroadcasterSubscriptions(string $broadcasterId, array $ids = [], string $bearer): ResponseInterface
    {
        $queryParamsMap = [];

        $queryParamsMap[] = ['key' => 'broadcaster_id', 'value' => $broadcasterId];

        foreach ($ids as $id) {
            $queryParamsMap[] = ['key' => 'user_id', 'value' => $id];
        }

        return $this->callApi('subscriptions', $queryParamsMap, $bearer);
    }
}<commit_msg>Completed SubscriptionsApi<commit_after><?php

declare(strict_types=1);

namespace NewTwitchApi\Resources;

use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;

class SubscriptionsApi extends AbstractResource
{

  /**
   * @throws GuzzleException
   * @link https://dev.twitch.tv/docs/api/reference/#get-broadcaster-subscriptions
 */
  public function getBroadcasterSubscriptions(string $broadcasterId, string $bearer): ResponseInterface
  {
      $queryParamsMap = [];

      $queryParamsMap[] = ['key' => 'broadcaster_id', 'value' => $broadcasterId];

      return $this->callApi('subscriptions', $queryParamsMap, $bearer);
  }
  /**
   * @throws GuzzleException
   * @link https://dev.twitch.tv/docs/api/reference/#get-broadcaster-s-subscribers
 */

  public function getBroadcasterSubscribers(string $broadcasterId, array $ids = [], string $bearer): ResponseInterface
  {
      $queryParamsMap = [];

      $queryParamsMap[] = ['key' => 'broadcaster_id', 'value' => $broadcasterId];

      foreach ($ids as $id) {
          $queryParamsMap[] = ['key' => 'user_id', 'value' => $id];
      }

      return $this->callApi('subscriptions', $queryParamsMap, $bearer);
  }

  /**
   * @throws GuzzleException
   * @link https://dev.twitch.tv/docs/api/reference/#get-subscription-events
 */

  public function getSubscriptionEvents(string $broadcasterId, string $eventId = null, string $userId = null, int $first = null, string $after = null, string $bearer): ResponseInterface
  {
    $queryParamsMap = [];

    $queryParamsMap[] = ['key' => 'broadcaster_id', 'value' => $broadcasterId];

    if ($eventId) {
        $queryParamsMap[] = ['key' => 'id', 'value' => $eventId];
    }

    if ($userId) {
        $queryParamsMap[] = ['key' => 'user_id', 'value' => $userId];
    }

    if ($first) {
        $queryParamsMap[] = ['key' => 'first', 'value' => $first];
    }

    if ($after) {
        $queryParamsMap[] = ['key' => 'after', 'value' => $after];
    }

    return $this->callApi('subscriptions/events', $queryParamsMap, $bearer);
  }
}
{'fraction_non_alphanumeric': 0.16405433646812956, 'fraction_numerical': 0.0006966213862765587, 'mean_word_length': 3.700490998363339, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '4732291', 'n_tokens_mistral': 931, 'n_tokens_neox': 890, 'n_words': 171}