| @@ 95-108 (lines=14) @@ | ||
| 92 | /** |
|
| 93 | * @inheritdoc |
|
| 94 | */ |
|
| 95 | public function getRecentPrivateChatHistory($userId, array $parameters = array()) |
|
| 96 | { |
|
| 97 | $response = $this->client->get( |
|
| 98 | sprintf('/v2/user/%s/history/latest', $userId), |
|
| 99 | $parameters |
|
| 100 | ); |
|
| 101 | ||
| 102 | $messages = array(); |
|
| 103 | foreach ($response['items'] as $response) { |
|
| 104 | $messages[] = new Message($response); |
|
| 105 | } |
|
| 106 | ||
| 107 | return $messages; |
|
| 108 | } |
|
| 109 | ||
| 110 | /** |
|
| 111 | * @inheritdoc |
|
| @@ 113-123 (lines=11) @@ | ||
| 110 | /** |
|
| 111 | * @inheritdoc |
|
| 112 | */ |
|
| 113 | public function getPrivateChatMessage($user, $messageId, array $parameters = array()) |
|
| 114 | { |
|
| 115 | $response = $this->client->get( |
|
| 116 | sprintf('/v2/user/%s/history/%s', $user, $messageId), |
|
| 117 | $parameters |
|
| 118 | ); |
|
| 119 | ||
| 120 | $message = new Message($response['message']); |
|
| 121 | ||
| 122 | return $message; |
|
| 123 | } |
|
| 124 | ||
| 125 | /** |
|
| 126 | * @inheritdoc |
|