SuperTweet interface driver classes.

Dependents:   SuperTweet_TestProgram StarBoardOrangeExpansion1 GSL_04-Network_Twitter

Committer:
shintamainjp
Date:
Fri Oct 29 23:04:12 2010 +0000
Revision:
2:d463d3fc4f81
Parent:
1:2d211e591fc8
Modified default value of a callback function to NULL.

Who changed what in which revision?

UserRevisionLine numberNew 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 1:2d211e591fc8 12 /**
shintamainjp 1:2d211e591fc8 13 * Create.
shintamainjp 1:2d211e591fc8 14 *
shintamainjp 1:2d211e591fc8 15 * @param account Account name.
shintamainjp 1:2d211e591fc8 16 * @param password Password.
shintamainjp 1:2d211e591fc8 17 */
shintamainjp 0:d48d92e6c145 18 SuperTweet::SuperTweet(const std::string account, const std::string password)
shintamainjp 0:d48d92e6c145 19 : account(account), password(password), client() {
shintamainjp 0:d48d92e6c145 20 client.basicAuth(account.c_str(), password.c_str());
shintamainjp 0:d48d92e6c145 21 client.setTimeout(10000);
shintamainjp 0:d48d92e6c145 22 }
shintamainjp 0:d48d92e6c145 23
shintamainjp 1:2d211e591fc8 24 /**
shintamainjp 1:2d211e591fc8 25 * Dispose.
shintamainjp 1:2d211e591fc8 26 */
shintamainjp 0:d48d92e6c145 27 SuperTweet::~SuperTweet() {
shintamainjp 0:d48d92e6c145 28 }
shintamainjp 0:d48d92e6c145 29
shintamainjp 1:2d211e591fc8 30 /**
shintamainjp 1:2d211e591fc8 31 * Set timeout.
shintamainjp 1:2d211e591fc8 32 *
shintamainjp 1:2d211e591fc8 33 * @param ms Timeout. [ms]
shintamainjp 1:2d211e591fc8 34 */
shintamainjp 0:d48d92e6c145 35 void SuperTweet::setTimeout(int ms) {
shintamainjp 0:d48d92e6c145 36 client.setTimeout(ms);
shintamainjp 0:d48d92e6c145 37 }