1 | <?php |
||
14 | final class SetlistSearchBuilder |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $query; |
||
20 | |||
21 | private function __construct() |
||
27 | |||
28 | /** |
||
29 | * @return SetlistSearchBuilder |
||
30 | */ |
||
31 | public static function create(): self |
||
32 | { |
||
33 | return new static(); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return SetlistSearchBuilder |
||
38 | */ |
||
39 | public function page(int $page): self |
||
40 | { |
||
41 | $this->query['p'] = $page; |
||
42 | |||
43 | return $this; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return SetlistSearchBuilder |
||
48 | */ |
||
49 | public function withArtistName(string $name): self |
||
50 | { |
||
51 | $this->query['artistName'] = $name; |
||
52 | |||
53 | return $this; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return SetlistSearchBuilder |
||
58 | */ |
||
59 | public function withArtistMbid(string $mbid): self |
||
60 | { |
||
61 | $this->query['artistMbid'] = $mbid; |
||
62 | |||
63 | return $this; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @return SetlistSearchBuilder |
||
68 | */ |
||
69 | public function withArtistTmbid(int $tmid): self |
||
75 | |||
76 | /** |
||
77 | * @return SetlistSearchBuilder |
||
78 | */ |
||
79 | public function withCity(string $name): self |
||
85 | |||
86 | /** |
||
87 | * @return SetlistSearchBuilder |
||
88 | */ |
||
89 | public function withCityId(int $id): self |
||
95 | |||
96 | /** |
||
97 | * @return SetlistSearchBuilder |
||
98 | */ |
||
99 | public function withCountryCode(string $code): self |
||
105 | |||
106 | /** |
||
107 | * @return SetlistSearchBuilder |
||
108 | */ |
||
109 | public function withDate(DateTime $date): self |
||
115 | |||
116 | /** |
||
117 | * @return SetlistSearchBuilder |
||
118 | */ |
||
119 | public function withYear(int $year): self |
||
125 | |||
126 | /** |
||
127 | * @return SetlistSearchBuilder |
||
128 | * |
||
129 | * @deprecated since setlist.fm API 1.0 |
||
130 | */ |
||
131 | public function withLastFm(string $eventId): self |
||
137 | |||
138 | /** |
||
139 | * @return SetlistSearchBuilder |
||
140 | */ |
||
141 | public function withLastUpdated(DateTime $date): self |
||
147 | |||
148 | /** |
||
149 | * @return SetlistSearchBuilder |
||
150 | */ |
||
151 | public function withState(string $name): self |
||
157 | |||
158 | /** |
||
159 | * @return SetlistSearchBuilder |
||
160 | */ |
||
161 | public function withStateCode(string $code): self |
||
167 | |||
168 | /** |
||
169 | * @return SetlistSearchBuilder |
||
170 | */ |
||
171 | public function withTourName(string $name): self |
||
177 | |||
178 | /** |
||
179 | * @return SetlistSearchBuilder |
||
180 | */ |
||
181 | public function withVenueName(string $name): self |
||
187 | |||
188 | /** |
||
189 | * @return SetlistSearchBuilder |
||
190 | */ |
||
191 | public function withVenueId(string $venueId): self |
||
197 | |||
198 | public function getQuery(): array |
||
202 | } |
||
203 |