-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPlayByPlayRequest.php
42 lines (36 loc) · 942 Bytes
/
PlayByPlayRequest.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\Prod\Game;
use JasonRoman\NbaApi\Constraints as ApiAssert;
use JasonRoman\NbaApi\Params\GameIdParam;
use JasonRoman\NbaApi\Request\Data\Prod\AbstractDataProdRequest;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Get the play-by-play for a specific period of a game. Valid from 2014-2015 season and later.
*/
class PlayByPlayRequest extends AbstractDataProdRequest
{
const ENDPOINT = '/prod/v1/{gameDate}/{gameId}_pbp_{period}.json';
/**
* @Assert\NotBlank()
* @Assert\Type("\DateTime")
*
* @var \DateTime
*/
public $gameDate;
/**
* @Assert\NotBlank()
* @Assert\Type("string")
* @ApiAssert\ApiRegex(GameIdParam::FORMAT)
*
* @var string
*/
public $gameId;
/**
* @Assert\NotBlank()
* @Assert\Type("int")
* @Assert\Range(min = 1)
*
* @var int
*/
public $period;
}