about summary refs log tree commit diff stats
path: root/src/codes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codes.cpp')
-rw-r--r--src/codes.cpp24
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
3std::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}