Lab3 - Pressure, temperature, and humidity sensors displayed on a webpage.
Dependencies: EthernetNetIf NTPClient_NetServices GPS mbed HTTPServer SDFileSystem
Diff: PachubeClient.h
- Revision:
- 0:dfd0841721d5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PachubeClient.h Tue Oct 05 19:34:40 2010 +0000 @@ -0,0 +1,35 @@ +#ifndef PACHUBECLIENT_H_ +#define PACHUBECLIENT_H_ + +#include <mbed.h> +#include <HTTPClient.h> + +class PachubeClient { + +public: + // constructor and destructor + PachubeClient(const string& apiKey); + virtual ~PachubeClient(); + + // put csv method to feed + void PutCsv(const string& environmentID, const string& data); + + // put csv method to datastream + void PutCsv(const string& environmentID, const string& datastreamID, const string& data); + + // http result and response + HTTPResult Result(); + int Response(); + +private: + // http client and data + HTTPClient _client; + HTTPText _csvContent; + + // http result and response + HTTPResult _result; + int _response; + +}; + +#endif // PACHUBECLIENT_H_