@@ 115-122 (lines=8) @@ | ||
112 | return $this->client->getFromContainer(CommandBusInterface::class); |
|
113 | } |
|
114 | ||
115 | public function profile(): PromiseInterface |
|
116 | { |
|
117 | return $this->client->handle(new RequestCommand( |
|
118 | new Request('GET', 'account/verify_credentials.json') |
|
119 | ))->then(function (ResponseInterface $response) { |
|
120 | return resolve($this->client->handle(new HydrateCommand('Profile', $response->getBody()->getJson()))); |
|
121 | }); |
|
122 | } |
|
123 | ||
124 | public function user(string $user): PromiseInterface |
|
125 | { |
|
@@ 124-131 (lines=8) @@ | ||
121 | }); |
|
122 | } |
|
123 | ||
124 | public function user(string $user): PromiseInterface |
|
125 | { |
|
126 | return $this->client->handle(new RequestCommand( |
|
127 | new Request('GET', 'users/show.json?screen_name=' . $user) |
|
128 | ))->then(function (ResponseInterface $response) { |
|
129 | return resolve($this->client->handle(new HydrateCommand('User', $response->getBody()->getJson()))); |
|
130 | }); |
|
131 | } |
|
132 | ||
133 | public function stream(): AsyncStreamingClient |
|
134 | { |