diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index b7d1624..cf2b5c4 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
@@ -321,6 +321,22 @@ namespace twitter { | |||
321 | return _current_user; | 321 | return _current_user; |
322 | } | 322 | } |
323 | 323 | ||
324 | configuration client::getConfiguration() | ||
325 | { | ||
326 | if (!_configuration || (difftime(time(NULL), _last_configuration_update) > 60*60*24)) | ||
327 | { | ||
328 | long response_code; | ||
329 | std::string response_data; | ||
330 | if (performGet("https://api.twitter.com/1.1/help/configuration.json", response_code, response_data)) | ||
331 | { | ||
332 | _configuration = configuration(response_data); | ||
333 | _last_configuration_update = time(NULL); | ||
334 | } | ||
335 | } | ||
336 | |||
337 | return _configuration; | ||
338 | } | ||
339 | |||
324 | response client::getFriends(std::set<user_id>& _ret) | 340 | response client::getFriends(std::set<user_id>& _ret) |
325 | { | 341 | { |
326 | if (!_current_user) | 342 | if (!_current_user) |