From 7e85b35d7d1714e3f85434b891a1050ad584e337 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 13 Apr 2016 11:24:24 -0400 Subject: 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. --- src/codes.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/codes.cpp (limited to 'src/codes.cpp') 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 @@ +#include "codes.h" + +std::ostream& operator<<(std::ostream& os, twitter::response r) +{ + switch (r) + { + case twitter::response::ok: return os << "OK"; + case twitter::response::curl_error: return os << "Curl Error"; + case twitter::response::bad_auth: return os << "Bad Auth"; + case twitter::response::limited: return os << "Rate Limit Exceeded"; + case twitter::response::server_error: return os << "Twitter Server Error"; + case twitter::response::server_unavailable: return os << "Twitter Is Down"; + case twitter::response::server_overloaded: return os << "Twitter Is Over Capacity"; + case twitter::response::server_timeout: return os << "Twitter Connection Timed Out"; + case twitter::response::suspended: return os << "Authenticated User Is Suspended"; + case twitter::response::bad_token: return os << "Invalid Or Expired Access Token"; + case twitter::response::duplicate_status: return os << "Duplicate Status"; + case twitter::response::suspected_spam: return os << "Request Looks Automated"; + case twitter::response::write_restricted: return os << "Cannot Perform Write"; + case twitter::response::bad_length: return os << "Message Body Too Long"; + case twitter::response::unknown_error: return os << "Unknown Error"; + case twitter::response::invalid_media: return os << "Invalid Media"; + } +} -- cgit 1.4.1