-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPlayersPerGameRequest.php
42 lines (36 loc) · 1 KB
/
PlayersPerGameRequest.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
<?php
namespace JasonRoman\NbaApi\Request\Data\Cms\Game;
use JasonRoman\NbaApi\Constraints as ApiAssert;
use JasonRoman\NbaApi\Params\GameIdParam;
use JasonRoman\NbaApi\Request\Data\Cms\AbstractDataCmsRequest;
use Symfony\Component\Validator\Constraints as Assert;
/**
* This seems to get current per-game averages of all players involved with the specified game.
* The averages appear to be player averages for the current season/type (ex: 2016 regular season).
*/
class PlayersPerGameRequest extends AbstractDataCmsRequest
{
const ENDPOINT = '/json/cms/{year}/game/{gameDate}/{gameId}/playersPerGame.json';
/**
* @Assert\NotBlank()
* @Assert\Type("int")
*
* @var int
*/
public $year;
/**
* @Assert\NotBlank()
* @Assert\Type("\DateTime")
*
* @var \DateTime
*/
public $gameDate;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiRegex(GameIdParam::FORMAT)
*
* @var string
*/
public $gameId;
}