-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAsyncClientInterface.php
More file actions
45 lines (32 loc) · 1.25 KB
/
AsyncClientInterface.php
File metadata and controls
45 lines (32 loc) · 1.25 KB
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
<?php declare(strict_types=1);
namespace ApiClients\Client\Github;
use ApiClients\Foundation\Resource\ResourceInterface;
use React\Promise\CancellablePromiseInterface;
use React\Promise\PromiseInterface;
use Rx\Observable;
interface AsyncClientInterface
{
/**
* Take a string create by the extract method and hydrate it back to a resource.
*
* @param string $resource
* @return CancellablePromiseInterface
*/
public function hydrate(string $resource): CancellablePromiseInterface;
/**
* Extract a resource into a string for storage.
*
* @param ResourceInterface $resource
* @return CancellablePromiseInterface
*/
public function extract(ResourceInterface $resource): CancellablePromiseInterface;
public function meta(): PromiseInterface;
public function user(string $user): PromiseInterface;
public function organization(string $organization): PromiseInterface;
public function whoami(): PromiseInterface;
public function emojis(): Observable;
public function myOrganizations(): Observable;
public function licenses(): Observable;
public function getRateLimitState(): RateLimitState;
public function rateLimit(): PromiseInterface;
}