@@ 128-135 (lines=8) @@ | ||
125 | return $this->client->getFromContainer(CommandBusInterface::class); |
|
126 | } |
|
127 | ||
128 | public function profile(): PromiseInterface |
|
129 | { |
|
130 | return $this->client->handle(new RequestCommand( |
|
131 | new Request('GET', 'account/verify_credentials.json') |
|
132 | ))->then(function (ResponseInterface $response) { |
|
133 | return resolve($this->client->handle(new HydrateCommand('Profile', $response->getBody()->getJson()))); |
|
134 | }); |
|
135 | } |
|
136 | ||
137 | public function user(string $user): PromiseInterface |
|
138 | { |
|
@@ 137-144 (lines=8) @@ | ||
134 | }); |
|
135 | } |
|
136 | ||
137 | public function user(string $user): PromiseInterface |
|
138 | { |
|
139 | return $this->client->handle(new RequestCommand( |
|
140 | new Request('GET', 'users/show.json?screen_name=' . $user) |
|
141 | ))->then(function (ResponseInterface $response) { |
|
142 | return resolve($this->client->handle(new HydrateCommand('User', $response->getBody()->getJson()))); |
|
143 | }); |
|
144 | } |
|
145 | ||
146 | public function stream(): AsyncStreamingClient |
|
147 | { |