Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (96 sloc) 2.5 KB
<?php
namespace JasonRoman\NbaApi\Request\Stats\Stats\Games;
use JasonRoman\NbaApi\Constraints as ApiAssert;
use JasonRoman\NbaApi\Params\LeagueIdParam;
use JasonRoman\NbaApi\Params\SeasonParam;
use JasonRoman\NbaApi\Params\Stats\CounterParam;
use JasonRoman\NbaApi\Params\Stats\DirectionParam;
use JasonRoman\NbaApi\Params\Stats\PlayerOrTeamParam;
use JasonRoman\NbaApi\Params\Stats\SeasonTypeParam;
use JasonRoman\NbaApi\Params\Stats\SorterParam;
use JasonRoman\NbaApi\Request\Stats\Stats\AbstractStatsStatsRequest;
use Symfony\Component\Validator\Constraints as Assert;
class LeagueGameLogRequest extends AbstractStatsStatsRequest
{
const ENDPOINT = '/stats/leaguegamelog';
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(LeagueIdParam::OPTIONS_NBA_G_LEAGUE)
*
* @var string
*/
public $leagueId;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiRegex(SeasonParam::FORMAT_WITH_ALL_TIME_ALT)
*
* @var string
*/
public $season;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(SeasonTypeParam::OPTIONS_WITH_BOTH_ALL_STAR)
*
* @var string
*/
public $seasonType;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(PlayerOrTeamParam::OPTIONS_ABBREV)
*
* @var string
*/
public $playerOrTeam;
/**
* @Assert\NotBlank()
* @Assert\Type("int")
* @Assert\Range(min = CounterParam::MIN_ALL, max = CounterParam::MAX)
*
* @var int
*/
public $counter;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(SorterParam::OPTIONS)
*
* @var string
*/
public $sorter;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(DirectionParam::OPTIONS)
*
* @var string
*/
public $direction;
/**
* @Assert\Type("\DateTime")
*
* @var \DateTime
*/
public $dateFrom;
/**
* @Assert\Type("\DateTime")
*
* @var \DateTime
*/
public $dateTo;
/**
* {@inheritdoc}
*/
public static function getExampleValues(): array
{
return array_merge(parent::getExampleValues(), [
'playerOrTeam' => PlayerOrTeamParam::PLAYER_ABBREV,
'counter' => CounterParam::MIN_ALL,
'sorter' => SorterParam::POINTS,
'direction' => DirectionParam::ASC,
]);
}
}
You can’t perform that action at this time.