diff options
Diffstat (limited to 'src/client.cpp')
| -rw-r--r-- | src/client.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
| diff --git a/src/client.cpp b/src/client.cpp index 3a01c90..07f7580 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <algorithm> | 4 | #include <algorithm> |
| 5 | #include <json.hpp> | 5 | #include <json.hpp> |
| 6 | #include <thread> | 6 | #include <thread> |
| 7 | #include <hkutil/string.h> | ||
| 7 | #include "request.h" | 8 | #include "request.h" |
| 8 | 9 | ||
| 9 | namespace twitter { | 10 | namespace twitter { |
| @@ -26,7 +27,7 @@ namespace twitter { | |||
| 26 | if (!media_ids.empty()) | 27 | if (!media_ids.empty()) |
| 27 | { | 28 | { |
| 28 | datastrstream << "&media_ids="; | 29 | datastrstream << "&media_ids="; |
| 29 | datastrstream << twitter::implode(std::begin(media_ids), std::end(media_ids), ","); | 30 | datastrstream << hatkirby::implode(std::begin(media_ids), std::end(media_ids), ","); |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | return tweet( | 33 | return tweet( |
| @@ -46,7 +47,7 @@ namespace twitter { | |||
| 46 | if (!media_ids.empty()) | 47 | if (!media_ids.empty()) |
| 47 | { | 48 | { |
| 48 | datastrstream << "&media_ids="; | 49 | datastrstream << "&media_ids="; |
| 49 | datastrstream << twitter::implode(std::begin(media_ids), std::end(media_ids), ","); | 50 | datastrstream << hatkirby::implode(std::begin(media_ids), std::end(media_ids), ","); |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 52 | return tweet( | 53 | return tweet( |
| @@ -366,7 +367,8 @@ namespace twitter { | |||
| 366 | } | 367 | } |
| 367 | 368 | ||
| 368 | std::string datastr = "id=" + | 369 | std::string datastr = "id=" + |
| 369 | OAuth::PercentEncode(implode(std::begin(cur), std::end(cur), ",")); | 370 | OAuth::PercentEncode( |
| 371 | hatkirby::implode(std::begin(cur), std::end(cur), ",")); | ||
| 370 | 372 | ||
| 371 | std::string response = | 373 | std::string response = |
| 372 | post(auth_, | 374 | post(auth_, |
| @@ -399,7 +401,8 @@ namespace twitter { | |||
| 399 | } | 401 | } |
| 400 | 402 | ||
| 401 | std::string datastr = "user_id=" + | 403 | std::string datastr = "user_id=" + |
| 402 | OAuth::PercentEncode(implode(std::begin(cur), std::end(cur), ",")); | 404 | OAuth::PercentEncode( |
| 405 | hatkirby::implode(std::begin(cur), std::end(cur), ",")); | ||
| 403 | 406 | ||
| 404 | std::string response = | 407 | std::string response = |
| 405 | post(auth_, | 408 | post(auth_, |
