Skip to content

Commit 9487a85

Browse files
committed
replace ParseClient instance client with global instance Parse
1 parent d7ce864 commit 9487a85

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

examples/blink/Blink.ino

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* back an ack to Parse
1010
*/
1111

12-
ParseClient parse;
1312
String ledState;
1413
const int BUFSIZE = 200;
1514

@@ -21,7 +20,7 @@ void setLedState(char state[]) {
2120
// send current led state to parse
2221
ParseObjectCreate create;
2322
create.setClassName("Event");
24-
create.add("installationId", parse.getInstallationId());
23+
create.add("installationId", Parse.getInstallationId());
2524
create.add("alarm", true);
2625
String value = "{\"state\":\"";
2726
value += state;
@@ -55,7 +54,7 @@ void setup() {
5554
while (!Serial); // wait for a console connection
5655

5756
// appId and clientKey will be provided in provisioning
58-
parse.begin(NULL, NULL);
57+
Parse.begin(NULL, NULL);
5958

6059
// do provisioning now
6160
Serial.println("Please go to arduino.local/parse_config.html to complete device provisioning. Press y when you are done.");
@@ -69,14 +68,14 @@ void setup() {
6968
}
7069

7170
Serial.println("Parse blinky example started");
72-
Serial.println(parse.getInstallationId());
73-
Serial.println(parse.getSessionToken());
71+
Serial.println(Parse.getInstallationId());
72+
Serial.println(Parse.getSessionToken());
7473

7574
// Turn off LED
7675
setLedState("off");
7776

7877
/* start push service */
79-
if(parse.startPushService()) {
78+
if(Parse.startPushService()) {
8079
Serial.println("\nParse push started\n");
8180
}
8281
}
@@ -95,8 +94,8 @@ void loop() {
9594
}
9695

9796
// check if any new push message
98-
if (parse.pushAvailable()) {
99-
ParsePush push = parse.nextPush();
97+
if (Parse.pushAvailable()) {
98+
ParsePush push = Parse.nextPush();
10099

101100
// print whole JSON body
102101
Serial.print("New push message content: ");

examples/quickstart/QuickStart.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/***** Quickstart of Parse Arduino Yún SDK *****/
55
// https://www.parse.com/apps/quickstart#embedded/arduinoyun
66

7-
ParseClient client;
7+
/***** NOTE: ParseClient Parse is defined in SDK *****/
88

99
void setup() {
1010

examples/test/Test.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
/***** Integration Tests of Parse Arduino Yún SDK *****/
66
// NOTE: import Tempereture.json into yoru Parse app before running the test
77

8-
ParseClient client;
98
int i = 0; // testId for a specific test
109

1110
void basicObjectTest() {
@@ -102,7 +101,7 @@ void setup() {
102101
while (!Serial); // wait for a serial connection
103102

104103
// Initialize Parse
105-
client.begin("", "");
104+
Parse.begin("", "");
106105
}
107106

108107
void loop() {

0 commit comments

Comments
 (0)