@@ 236-244 (lines=9) @@ | ||
233 | * @since 1.0 |
|
234 | * @throws \DomainException |
|
235 | */ |
|
236 | public function getListByUser($user, $page = 0, $limit = 0, \DateTime $since = null) |
|
237 | { |
|
238 | // Build the request path. |
|
239 | $path = '/users/' . $user . '/gists'; |
|
240 | $path .= ($since) ? '?since=' . $since->format(\DateTime::RFC3339) : ''; |
|
241 | ||
242 | // Send the request. |
|
243 | return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); |
|
244 | } |
|
245 | ||
246 | /** |
|
247 | * List all public gists. |
|
@@ 258-266 (lines=9) @@ | ||
255 | * @since 1.0 |
|
256 | * @throws \DomainException |
|
257 | */ |
|
258 | public function getListPublic($page = 0, $limit = 0, \DateTime $since = null) |
|
259 | { |
|
260 | // Build the request path. |
|
261 | $path = '/gists/public'; |
|
262 | $path .= ($since) ? '?since=' . $since->format(\DateTime::RFC3339) : ''; |
|
263 | ||
264 | // Send the request. |
|
265 | return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); |
|
266 | } |
|
267 | ||
268 | /** |
|
269 | * List starred gists. |
|
@@ 280-288 (lines=9) @@ | ||
277 | * @since 1.0 |
|
278 | * @throws \DomainException |
|
279 | */ |
|
280 | public function getListStarred($page = 0, $limit = 0, \DateTime $since = null) |
|
281 | { |
|
282 | // Build the request path. |
|
283 | $path = '/gists/starred'; |
|
284 | $path .= ($since) ? '?since=' . $since->format(\DateTime::RFC3339) : ''; |
|
285 | ||
286 | // Send the request. |
|
287 | return $this->processResponse($this->client->get($this->fetchUrl($path, $page, $limit))); |
|
288 | } |
|
289 | ||
290 | /** |
|
291 | * Get a specific revision of a gist. |