Get season by ID

Returns a leaderboard list for a particular season

@param int   $id      The season to lookup
@param array $options Options

@return ResponseInterface
344792
public function getSeasonById($id, array $options = [])
    {
        $options['access_token'] = $this->blizzardClient->getAccessToken();

        return $this->request('/data/d3/season/'.(int) $id, $options);
    }
177230
public function find($id, array $options = [])
    {
        $topic = Arr::get($options, 'topic');

        if ($topic == 'payment') {
            $response = $this->gateway->commit('get', $this->gateway->buildUrlFromString('collections/notifications').'/'.$id);

            if (!$response->success()) {
                return $response;
            }

            $responseData = $response->data();

            $id = Arr::get($responseData, 'merchant_order_id');
        }

        return $this->gateway->commit('get', $this->gateway->buildUrlFromString('merchant_orders').'/'.$id, [], $options);
    }
263306
public function getCredentialsById($strategy, $kuid, array $options = [])
    {
        $options['httpParams'][':strategy'] = $strategy;
        $options['httpParams'][':kuid'] = $kuid;

        return $this->kuzzle->query($this->buildQueryArgs('getCredentialsById'), [], $options)['result'];
    }
776156
public function getEpisodesByShowID($ID){

		$url = self::APIURL.'/shows/'.$ID.'/episodes';

		$episodes = $this->getFile($url);

		$allEpisodes = [];
		foreach($episodes as $episode){
			$ep = new Episode($episode);
			$allEpisodes[] = $ep;
		}

		return $allEpisodes;
	}
946788
public function getMany(array $id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		$preparedIds = array_map([$this, 'prepareId'], $id);
		$result      = $this->getClient()->get($preparedIds);
		
		if ($this->namespace === null) {
			return $result;
		}
		
		$ids = array_intersect_key(array_combine($preparedIds, $id), $result);
		return array_combine(array_values($ids), array_values($result));
	}
1034425
public function delete($id, $options = [])
    {
        return $this->gateway->commit('delete', $this->gateway->buildUrlFromString('payees/'.$id));
    }
366329
public function getAthleteStats($id)
    {
        try {
            return $this->service->getAthleteStats($id);
        } catch (ServiceException $e) {
            throw new ClientException('[SERVICE] ' . $e->getMessage());
        }
    }
1022893
public function getEpisodeByNumber($ID, $season, $episode)
	{
		$ep = false;
		$url = self::APIURL . '/shows/' . $ID . '/episodebynumber?season='. $season . '&number=' . $episode;
		$response = $this->getFile($url);
		if (is_array($response)) {
			$ep = new Episode($response);
		}
		return $ep;
	}
361634
public static function confirm($id, $options = null)
    {
        $url = static::classUrl().'/'.$id;
        $params = array('status' => 'pending');
        return static::_directRequest('put', $url, $params, $options);
    }
1081633
public function find($id, array $options = [])
    {
        $test = $this->gateway->getConfig()['test'];

        foreach ($options as $key => $value) {
            $options[$key] = $value == null ? '' : $value;
        }

        $params = array_merge(
            ['cmd' => '_notify-validate'],
            $options
        );

        $url = $test
            ? 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr'
            : 'https://ipnpb.paypal.com/cgi-bin/webscr';

        return $this->gateway->commit('post', $url, $params);
    }
311384
public function view(string $id)
    {
        $dashboard = $this->Dashboards->get($id, [
            'contain' => [
                'Roles',
                'Widgets'
            ]
        ]);

        $query = $this->Dashboards->getUserDashboards($this->Auth->user());
        /**
         * @var \Search\Model\Table\WidgetsTable $widgetsTable
         */
        $widgetsTable = TableRegistry::get('Search.Widgets');

        $userDashboards = $query->find('list')->toArray();
        if (!array_key_exists($dashboard->id, $userDashboards)) {
            throw new ForbiddenException();
        }

        $widgets = [];

        foreach ($dashboard->get('widgets') as $k => $item) {
            $opts = $widgetsTable->getWidgetOptions($item);

            $x = (int)$opts['x'];
            $y = (int)$opts['y'];

            if (isset($widgets[$y][$x])) {
                $widgets[$y][] = $item;
            } else {
                $widgets[$y][$x] = $item;
            }
        }

        ksort($widgets);

        foreach ($widgets as $k => $items) {
            if (count($items) < 2) {
                continue;
            }

            usort($widgets[$k], function ($a, $b) {
                $opts_a = json_decode($a->widget_options, true);
                $opts_b = json_decode($b->widget_options, true);

                $x_a = (int)$opts_a['x'];
                $x_b = (int)$opts_b['x'];

                if ($x_a == $x_b) {
                    return 0;
                }

                return ($x_a < $x_b) ? -1 : 1;
            });
        }

        $this->set('dashboardWidgets', $widgets);
        $this->set('columns', Configure::readOrFail('Search.dashboard.columns'));
        $this->set('user', $this->Auth->user());
        $this->set('dashboard', $dashboard);
        $this->set('_serialize', ['dashboard']);
    }
55494
public function listTeamMembers(int $id): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/teams/:id/members', (string)$id));
    }
654214
public function rankingTeamMedalsAction($id)
    {
        $group = $this->getDoctrine()->getRepository('VideoGamesRecordsCoreBundle:Group')->getWithGame($id);

        $breadcrumbs = $this->getGroupBreadcrumbs($group);
        $breadcrumbs->addItem('game.medalranking.full');

        return $this->render(
            'VideoGamesRecordsTeamBundle:Ranking:medals.html.twig',
            [
                'ranking' => $this->getDoctrine()->getRepository('VideoGamesRecordsTeamBundle:TeamGroup')->getRankingMedals($id, 100, null),
            ]
        );
    }
247839
public function ranked($identity)
	{
		$summonerId = $this->extractId($identity);

		$params = [];
		if ( ! is_null($this->season))
		{
			$params['season'] = $this->season;
		}
		$info  = $this->request('stats/by-summoner/'.$summonerId.'/ranked', $params);
		$stats = $this->attachStaticDataToDto(new RankedStats($info));

		$this->attachResponse($identity, $stats, 'rankedStats');

		return $stats;
	}
448905
public function findOneById($id) {
		$response = $this->get($this->baseUri . 'show.json', array('id' => $id));

		return $this->mapResponseToObjects($response, Tweet::class);
	}
123240
public function startTask($id, $options=array()){

        $data = array();
        
        $data['id'] = $id;

        $data = array_merge($data, $options);

        return $this->request($this->taskStartUrl, $data);
    }
503857
public static function find($id = null, array $options = array())
	{
		$timestamp_end_name = static::temporal_property('end_column');
		$max_timestamp = static::temporal_property('max_timestamp');

		switch ($id)
		{
			case 'all':
			case 'first':
			case 'last':
				break;
			default:
				$id = (array) $id;
				$count = 0;
				foreach(static::getNonTimestampPks() as $key)
				{
					$options['where'][] = array($key, $id[$count]);

					$count++;
				}
				break;
		}

		$options['where'][] = array($timestamp_end_name, $max_timestamp);

		static::enable_id_only_primary_key();
		$result = parent::find($id, $options);
		static::disable_id_only_primary_key();

		return $result;
	}