@@ 14-43 (lines=30) @@ | ||
11 | use Rx\ObservableInterface; |
|
12 | use function ApiClients\Tools\Rx\unwrapObservableFromPromise; |
|
13 | ||
14 | class Organization extends BaseOrganization |
|
15 | { |
|
16 | public function refresh(): PromiseInterface |
|
17 | { |
|
18 | return $this->handleCommand( |
|
19 | new RefreshCommand($this) |
|
20 | ); |
|
21 | } |
|
22 | ||
23 | public function repository(string $repository): PromiseInterface |
|
24 | { |
|
25 | return $this->handleCommand( |
|
26 | new RepositoryCommand($this->login(), $repository) |
|
27 | ); |
|
28 | } |
|
29 | ||
30 | public function repositories(): ObservableInterface |
|
31 | { |
|
32 | return unwrapObservableFromPromise($this->handleCommand( |
|
33 | new RepositoriesCommand($this->login()) |
|
34 | )); |
|
35 | } |
|
36 | ||
37 | public function organizations(): ObservableInterface |
|
38 | { |
|
39 | return unwrapObservableFromPromise($this->handleCommand( |
|
40 | new OrganizationsCommand($this->login()) |
|
41 | )); |
|
42 | } |
|
43 | } |
|
44 |
@@ 14-43 (lines=30) @@ | ||
11 | use Rx\ObservableInterface; |
|
12 | use function ApiClients\Tools\Rx\unwrapObservableFromPromise; |
|
13 | ||
14 | class User extends BaseUser |
|
15 | { |
|
16 | public function refresh(): PromiseInterface |
|
17 | { |
|
18 | return $this->handleCommand( |
|
19 | new RefreshCommand($this) |
|
20 | ); |
|
21 | } |
|
22 | ||
23 | public function repository(string $repository): PromiseInterface |
|
24 | { |
|
25 | return $this->handleCommand( |
|
26 | new RepositoryCommand($this->login(), $repository) |
|
27 | ); |
|
28 | } |
|
29 | ||
30 | public function repositories(): ObservableInterface |
|
31 | { |
|
32 | return unwrapObservableFromPromise($this->handleCommand( |
|
33 | new RepositoriesCommand($this->login()) |
|
34 | )); |
|
35 | } |
|
36 | ||
37 | public function organizations(): ObservableInterface |
|
38 | { |
|
39 | return unwrapObservableFromPromise($this->handleCommand( |
|
40 | new OrganizationsCommand($this->login()) |
|
41 | )); |
|
42 | } |
|
43 | } |
|
44 |