SuperTweet interface driver classes.
Dependents: SuperTweet_TestProgram StarBoardOrangeExpansion1 GSL_04-Network_Twitter
SuperTweet.cpp@0:d48d92e6c145, 2010-10-12 (annotated)
- Committer:
- shintamainjp
- Date:
- Tue Oct 12 22:20:38 2010 +0000
- Revision:
- 0:d48d92e6c145
- Child:
- 1:2d211e591fc8
First version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shintamainjp | 0:d48d92e6c145 | 1 | /** |
shintamainjp | 0:d48d92e6c145 | 2 | * SuperTweet API interface driver. (Version 0.0.1) |
shintamainjp | 0:d48d92e6c145 | 3 | * |
shintamainjp | 0:d48d92e6c145 | 4 | * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems) |
shintamainjp | 0:d48d92e6c145 | 5 | * http://shinta.main.jp/ |
shintamainjp | 0:d48d92e6c145 | 6 | */ |
shintamainjp | 0:d48d92e6c145 | 7 | |
shintamainjp | 0:d48d92e6c145 | 8 | #include "SuperTweet.h" |
shintamainjp | 0:d48d92e6c145 | 9 | |
shintamainjp | 0:d48d92e6c145 | 10 | const std::string SuperTweet::URLBASE_V1 = "http://api.supertweet.net/1/"; |
shintamainjp | 0:d48d92e6c145 | 11 | |
shintamainjp | 0:d48d92e6c145 | 12 | SuperTweet::SuperTweet(const std::string account, const std::string password) |
shintamainjp | 0:d48d92e6c145 | 13 | : account(account), password(password), client() { |
shintamainjp | 0:d48d92e6c145 | 14 | client.basicAuth(account.c_str(), password.c_str()); |
shintamainjp | 0:d48d92e6c145 | 15 | client.setTimeout(10000); |
shintamainjp | 0:d48d92e6c145 | 16 | } |
shintamainjp | 0:d48d92e6c145 | 17 | |
shintamainjp | 0:d48d92e6c145 | 18 | SuperTweet::~SuperTweet() { |
shintamainjp | 0:d48d92e6c145 | 19 | } |
shintamainjp | 0:d48d92e6c145 | 20 | |
shintamainjp | 0:d48d92e6c145 | 21 | void SuperTweet::setTimeout(int ms) { |
shintamainjp | 0:d48d92e6c145 | 22 | client.setTimeout(ms); |
shintamainjp | 0:d48d92e6c145 | 23 | } |