If This Then That interface library. Designed to hook up to various services provided by IFTTT.

Dependents:   IFTTT_Ethernet_Example IFTTT_WIZwiki-W7500 IFTTT_WizFi250 StopThief ... more

For more information please see the IFTTT Component page : https:developer.mbed.org/components/If-This-Then-That-IFTTT/

Revision:
3:c916e13a269a
Parent:
0:4f7b5d6048b3
Child:
7:416f902512f4
--- a/ifttt.h	Fri Jul 10 22:12:41 2015 +0000
+++ b/ifttt.h	Mon Jul 13 17:46:37 2015 +0000
@@ -30,6 +30,8 @@
 #define IFTTT_IP "107.22.235.178"
 #define IFTTT_PORT 80
 
+#define IFTTT_GET 0
+#define IFTTT_POST 1
 
 
 /**
@@ -49,7 +51,7 @@
     IFTTT(const char * event, const char * key, TCPSocketConnection * s = NULL);
 
     /**
-    * Send data to maker.ifttt.com
+    * Add ingredients (values) to be sent to maker.ifttt.com
     *
     * @param v1 value 1 to send
     * @param v2 value 2 to send
@@ -57,10 +59,10 @@
     *
     * @return true if successful, false if failed
     */
-    bool sendMaker(char * v1 = NULL, char * v2 = NULL, char * v3 = NULL);
+    bool addIngredients(char * v1 = NULL, char * v2 = NULL, char * v3 = NULL);
 
     /**
-    * Send data to maker.ifttt.com
+    * Add ingredients (values) to be sent to maker.ifttt.com
     *
     * @param v1 value 1 to send
     * @param v2 value 2 to send
@@ -68,7 +70,16 @@
     *
     * @return true if successful, false if failed
     */
-    bool sendMaker(int v1 = NULL, int v2 = NULL, int v3 = NULL);
+    bool addIngredients(int v1 = NULL, int v2 = NULL, int v3 = NULL);
+
+    /**
+    * Send data via POST or GET to maker.ifttt.com
+    *
+    * @param iftttType specifies how to send the data. POST by default, GET optional.
+    *
+    * @return true if successful, false if failed
+    */
+    bool trigger(int triggerType = IFTTT_POST);
 
 private:
 
@@ -98,6 +109,7 @@
     const char * v3;
     const char * host;
     int port;
+
 };
 
 #endif // IFTTT_H