thingspark example

Dependencies:   MbedJSONValue mbed-http HTS221

Files at this revision

API Documentation at this revision

Comitter:
master_k1
Date:
Sun Dec 29 03:14:52 2019 +0000
Parent:
38:7734b54de565
Commit message:
change api key

Changed in this revision

source/channel-entrys.cpp Show annotated file Show diff for this revision Revisions of this file
source/channel-field-entrys.cpp Show annotated file Show diff for this revision Revisions of this file
source/last-channel-entry.cpp Show annotated file Show diff for this revision Revisions of this file
source/main-http.cpp Show annotated file Show diff for this revision Revisions of this file
source/main-https.cpp Show annotated file Show diff for this revision Revisions of this file
source/select-demo.h Show annotated file Show diff for this revision Revisions of this file
diff -r 7734b54de565 -r 9856f09a1333 source/channel-entrys.cpp
--- a/source/channel-entrys.cpp	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/channel-entrys.cpp	Sun Dec 29 03:14:52 2019 +0000
@@ -8,7 +8,7 @@
 #include "mbed_mem_trace.h"
 
 char* thingspark_URL = "http://api.thingspark.kr";
-char* thingspark_APIkey = "1yUxh3Dh77DUQyOt";
+char* thingspark_APIkey = "CHANGE API KEY";
 char urlBuffer[256];
 
 /* List of trusted root CA certificates
diff -r 7734b54de565 -r 9856f09a1333 source/channel-field-entrys.cpp
--- a/source/channel-field-entrys.cpp	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/channel-field-entrys.cpp	Sun Dec 29 03:14:52 2019 +0000
@@ -12,7 +12,7 @@
 
 
 char* thingspark_URL = "http://api.thingspark.kr";
-char* thingspark_APIkey = "1yUxh3Dh77DUQyOt";
+char* thingspark_APIkey = "CHANGE API KEY";
 char urlBuffer[256];
 
 /* List of trusted root CA certificates
@@ -79,14 +79,15 @@
     const char * json = res->get_body_as_string().c_str();
     
     printf("\nBody (%lu bytes):\n\n%s\n", res->get_body_length(), json);
-    
-/*
+    /*
+
     MbedJSONValue mbedjson;
     
  
    //parse the previous string and fill the object demo
    parse(mbedjson, json);
-   
+*/
+    /*   
       std::string my_str;  
       my_str = mbedjson["channel"].get<std::string>();
       printf("channel: %s\r\n", my_str.c_str());
diff -r 7734b54de565 -r 9856f09a1333 source/last-channel-entry.cpp
--- a/source/last-channel-entry.cpp	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/last-channel-entry.cpp	Sun Dec 29 03:14:52 2019 +0000
@@ -8,7 +8,7 @@
 #include "mbed_mem_trace.h"
 
 char* thingspark_URL = "http://api.thingspark.kr";
-char* thingspark_APIkey = "1yUxh3Dh77DUQyOt";
+char* thingspark_APIkey = "CHANGE API KEY";
 char urlBuffer[256];
 
 /* List of trusted root CA certificates
diff -r 7734b54de565 -r 9856f09a1333 source/main-http.cpp
--- a/source/main-http.cpp	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/main-http.cpp	Sun Dec 29 03:14:52 2019 +0000
@@ -12,7 +12,7 @@
 static HTS221Sensor hum_temp(&devI2c);
 
 char* thingspark_URL = "http://api.thingspark.kr";
-char* thingspark_APIkey = "1yUxh3Dh77DUQyOt";
+char* thingspark_APIkey = "CHANGE API KEY";
 char urlBuffer[256];
 
 void dump_response(HttpResponse* res) {
diff -r 7734b54de565 -r 9856f09a1333 source/main-https.cpp
--- a/source/main-https.cpp	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/main-https.cpp	Sun Dec 29 03:14:52 2019 +0000
@@ -15,7 +15,7 @@
 static HTS221Sensor hum_temp(&devI2c);
 
 char* thingspark_URL = "https://api.thingspark.kr";
-char* thingspark_APIkey = "1yUxh3Dh77DUQyOt";
+char* thingspark_APIkey = "CHANGE API KEY";
 char urlBuffer[256];
 
 
diff -r 7734b54de565 -r 9856f09a1333 source/select-demo.h
--- a/source/select-demo.h	Sat Dec 28 07:53:23 2019 +0000
+++ b/source/select-demo.h	Sun Dec 29 03:14:52 2019 +0000
@@ -8,6 +8,6 @@
 #define         DEMO_CHANNEL_FIELD_ENTRYS         5
 
 
-#define         DEMO            DEMO_CHANNEL_FIELD_ENTRYS
+#define         DEMO            DEMO_HTTP
 
 #endif // _SELECT_METHOD_H_