diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-13 11:24:24 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-13 11:24:24 -0400 |
commit | 7e85b35d7d1714e3f85434b891a1050ad584e337 (patch) | |
tree | 1ca626fe9551734d6d98e50b841b7365d49ba088 /src/codes.cpp | |
parent | 891d57d200f55b91f80b6d3b4dd0c30479be6109 (diff) | |
download | libtwittercpp-7e85b35d7d1714e3f85434b891a1050ad584e337.tar.gz libtwittercpp-7e85b35d7d1714e3f85434b891a1050ad584e337.tar.bz2 libtwittercpp-7e85b35d7d1714e3f85434b891a1050ad584e337.zip |
Added ability to upload media and tweet it
Images (static and animated) and videos have been tested. Currently all media uploads occur in one large chunk; support to break down chunks will be added later.
Diffstat (limited to 'src/codes.cpp')
-rw-r--r-- | src/codes.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/codes.cpp b/src/codes.cpp new file mode 100644 index 0000000..9639d5d --- /dev/null +++ b/src/codes.cpp | |||
@@ -0,0 +1,24 @@ | |||
1 | #include "codes.h" | ||
2 | |||
3 | std::ostream& operator<<(std::ostream& os, twitter::response r) | ||
4 | { | ||
5 | switch (r) | ||
6 | { | ||
7 | case twitter::response::ok: return os << "OK"; | ||
8 | case twitter::response::curl_error: return os << "Curl Error"; | ||
9 | case twitter::response::bad_auth: return os << "Bad Auth"; | ||
10 | case twitter::response::limited: return os << "Rate Limit Exceeded"; | ||
11 | case twitter::response::server_error: return os << "Twitter Server Error"; | ||
12 | case twitter::response::server_unavailable: return os << "Twitter Is Down"; | ||
13 | case twitter::response::server_overloaded: return os << "Twitter Is Over Capacity"; | ||
14 | case twitter::response::server_timeout: return os << "Twitter Connection Timed Out"; | ||
15 | case twitter::response::suspended: return os << "Authenticated User Is Suspended"; | ||
16 | case twitter::response::bad_token: return os << "Invalid Or Expired Access Token"; | ||
17 | case twitter::response::duplicate_status: return os << "Duplicate Status"; | ||
18 | case twitter::response::suspected_spam: return os << "Request Looks Automated"; | ||
19 | case twitter::response::write_restricted: return os << "Cannot Perform Write"; | ||
20 | case twitter::response::bad_length: return os << "Message Body Too Long"; | ||
21 | case twitter::response::unknown_error: return os << "Unknown Error"; | ||
22 | case twitter::response::invalid_media: return os << "Invalid Media"; | ||
23 | } | ||
24 | } | ||