eichi kowata / Mbed 2 deprecated geiger

Dependencies:   EthernetNetIf NTPClient_NetServices mbed ConfigFile

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PachubeV2CSV.h Source File

PachubeV2CSV.h

00001 /*******************************************************************************
00002 modify 
00003 2011/08
00004         - Use commonClient.
00005 
00006 *******************************************************************************/
00007 
00008 /**
00009  * Pachube API interface driver. (Version 0.0.1)
00010  *
00011  * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
00012  * http://shinta.main.jp/
00013  */
00014 
00015 #ifndef _PACHUBE_V2_CSV_H_
00016 #define _PACHUBE_V2_CSV_H_
00017 
00018 #include "Pachube.h"
00019 #include "HTTPClient.h"
00020 
00021 class PachubeV2CSV : public Pachube {
00022 public:
00023 
00024     explicit PachubeV2CSV(std::string APIKEY);
00025 
00026     virtual ~PachubeV2CSV();
00027 
00028     /*
00029      * =================================================================
00030      *  Environments (feeds)
00031      * =================================================================
00032      */
00033 
00034     /**
00035      * List all available feeds: GET /v2/feeds
00036      *
00037      * @param page Integer indicating which page of results you are requesting.
00038      * @param per_page Integer defining how many results to return per page (1 to 1000).
00039      * @param content String parameter ('full' or 'summary') describing whether we want full or summary results. Full results means all datastream values are returned, summary just returns the environment meta data for each feed.
00040      * @param q Full text search parameter. Should return any feeds matching this string.
00041      * @param tag Returns feeds containing datastreams tagged with the search query.
00042      * @param user Returns feeds created by the user specified.
00043      * @param units Returns feeds containing datastreams with units specified by the search query.
00044      * @param status Possible values ('live', 'frozen', or 'all'). Whether to search for only live feeds, only frozen feeds, or all feeds. Defaults to all.
00045      * @param order Order of returned feeds. Possible values ('created_at', 'retrieved_at', or 'relevance').
00046      */
00047     virtual int listAllAvailableFeeds(
00048         int page,
00049         int per_page,
00050         std::string content,
00051         std::string q,
00052         std::string tag,
00053         std::string user,
00054         std::string units,
00055         std::string status,
00056         std::string order,
00057         std::string &datatext);
00058 
00059     /**
00060      * Create new feed: POST /v2/feeds
00061      */
00062     virtual int createNewFeed(void);
00063 
00064     /**
00065      * Read feed: GET /v2/feeds/<feed_id>
00066      */
00067     virtual int readFeed(int feed_id, std::string &datatext);
00068 
00069     /**
00070      * Update feed: PUT /v2/feeds/<feed_id>
00071      */
00072     virtual int updateFeed(int feed_id);
00073 
00074     /**
00075      * Delete feed: DELETE /v2/feeds/<feed_id>
00076      */
00077     virtual int deleteFeed(int feed_id);
00078 
00079     /*
00080      * =================================================================
00081      *  Datastreams
00082      * =================================================================
00083      */
00084 
00085     /**
00086      * Create new datastream: POST /v2/feeds/<feed_id>/datastreams
00087      *
00088      * @param feed_id Feed ID.
00089      * @param stream_id Stream ID text.
00090      * @param value value.
00091      *
00092      * @return Return code from a web server.
00093      */
00094     virtual int createNewDataStream(int feed_id, std::string stream_id, std::string value);
00095 
00096     /**
00097      * Read datastream - GET /v2/feeds/<feed_id>/datastreams/<datastream_id>
00098      *
00099      * @param feed_id Feed ID.
00100      * @param stream_id Stream ID text.
00101      *
00102      * @return Return code from a web server.
00103      */
00104     virtual int readDataStream(int feed_id, std::string stream_id, std::string &datatext);
00105 
00106     /**
00107      * Update datastream: PUT /v2/feeds/<feed_id>/datastreams/<datastream_id>
00108      *
00109      * @param feed_id Feed ID.
00110      * @param stream_id Stream ID text.
00111      * @param value value.
00112      *
00113      * @return Return code from a web server.
00114      */
00115 //    virtual int updateDataStream(int feed_id, std::string stream_id, std::string value);
00116     virtual int updateDataStream(int feed_id, std::string stream_id, std::string value, HTTPClient *pClient);   //  2011/08
00117 
00118     /**
00119      * Delete datastream: DELETE /v2/feeds/<feed_id>/datastreams/<datastream_id>
00120      *
00121      * @param feed_id Feed ID.
00122      * @param stream_id Stream ID text.
00123      *
00124      * @return Return code from a web server.
00125      */
00126     virtual int deleteDataStream(int feed_id, std::string stream_id);
00127 
00128 };
00129 
00130 #endif