diff options
Diffstat (limited to 'src/DuetNG/DuetEthernet/Ethernet3/Twitter.h')
-rw-r--r-- | src/DuetNG/DuetEthernet/Ethernet3/Twitter.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/DuetNG/DuetEthernet/Ethernet3/Twitter.h b/src/DuetNG/DuetEthernet/Ethernet3/Twitter.h new file mode 100644 index 00000000..80c5673b --- /dev/null +++ b/src/DuetNG/DuetEthernet/Ethernet3/Twitter.h @@ -0,0 +1,35 @@ +/* + Twitter.cpp - Arduino library to Post messages to Twitter using OAuth. + Copyright (c) NeoCat 2010-2011. All right reserved. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +// ver1.2 - Use <Udp.h> to support IDE 0019 or later +// ver1.3 - Support IDE 1.0 + +#ifndef TWITTER_H +#define TWITTER_H + +#include <inttypes.h> +#include <Ethernet3.h> + +class Twitter +{ +private: + uint8_t parseStatus; + int statusCode; + const char *token; + EthernetClient client; +public: + Twitter(const char *user_and_passwd); + + bool doPost(const char *msg); + bool checkStatus(Print *debug = NULL); + int wait(Print *debug = NULL); + int status(void) { return statusCode; } +}; + +#endif //TWITTER_H |