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