/
LeagueScheduleMonthRequest.php
66 lines (58 loc) · 1.67 KB
/
LeagueScheduleMonthRequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
namespace JasonRoman\NbaApi\Request\Data\MobileTeams\Schedule;
use JasonRoman\NbaApi\Constraints as ApiAssert;
use JasonRoman\NbaApi\Params\Data\LeagueSlugParam;
use JasonRoman\NbaApi\Params\Data\MonthNumParam;
use JasonRoman\NbaApi\Params\FormatParam;
use JasonRoman\NbaApi\Params\LeagueIdParam;
use JasonRoman\NbaApi\Request\Data\MobileTeams\AbstractDataMobileTeamsRequest;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Get the league schedule for a given month of the year. Note that games from January through the end
* of the season will still have the season year, not the actual year (year 2016 month 05 would get games in May 2017).
*/
class LeagueScheduleMonthRequest extends AbstractDataMobileTeamsRequest
{
const ENDPOINT =
'/v2015/{format}/mobile_teams/{leagueSlug}/{year}/league/{leagueId}_league_schedule_{monthNum}.{format}';
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(FormatParam::OPTIONS)
*
* @var string
*/
public $format;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(LeagueSlugParam::OPTIONS)
*
* @var string
*/
public $leagueSlug;
/**
* @Assert\NotBlank()
* @Assert\Type("int")
* @Assert\Range(min = 2014)
*
* @var int
*/
public $year;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(MonthNumParam::OPTIONS)
*
* @var int
*/
public $monthNum;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiChoice(LeagueIdParam::OPTIONS)
*
* @var string
*/
public $leagueId;
}