# Spark API helper

**URL:** https://community.particle.io/t/spark-api-helper/640
**Category:** Cloud
**Created:** [December 11, 2013, 5:05am UTC](https://community.particle.io/t/spark-api-helper/640 "2013-12-11T05:05:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zach](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zach/32/20714_2.png) [@zach](https://community.particle.io/u/zach)
#### Post date: [December 11, 2013, 5:05am UTC](https://community.particle.io/t/spark-api-helper/640/1 "2013-12-11T05:05:44Z")

</div>

A handy-dandy API helper for playing with the Spark API. Thanks jflasher (on Github)!

[http://jflasher.github.io/spark-helper/](http://jflasher.github.io/spark-helper/)

---

<div class="post-metadata">

### Author: ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)
#### Post date: [December 27, 2013, 8:00am UTC](https://community.particle.io/t/spark-api-helper/640/2 "2013-12-27T08:00:59Z")

</div>

Based on jflasher’s awexome helper, I hacked it up and trimmed it down to be just a function controller with 1 to 4 buttons in my initial example. It would be very easy to add more buttons though. It’s also just the right size for an iPhone web app. Up on github now: [https://github.com/technobly/Simple-Spark-Core-Controller](https://github.com/technobly/Simple-Spark-Core-Controller)  
 ![](https://sea2.discourse-cdn.com/flex026/uploads/particle/123/245c779e8b6cc96d.png)

---

<div class="post-metadata">

### Author: ![mattande](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mattande/32/2087_2.png) [@mattande](https://community.particle.io/u/mattande)
#### Post date: [December 27, 2013, 3:08pm UTC](https://community.particle.io/t/spark-api-helper/640/3 "2013-12-27T15:08:04Z")

</div>

Very cool. For me function calls work but reading variables seems to do nothing?

---

<div class="post-metadata">

### Author: ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)
#### Post date: [December 28, 2013, 1:42am UTC](https://community.particle.io/t/spark-api-helper/640/4 "2013-12-28T01:42:38Z")

</div>

Right now variables in the helper app are broken because the Cloud API is being updated. If you want to make the variables work again, you need to change code in 4 places in `/js/main.js` from:

`res.result`

to:

`res.TEMPORARY_allTypes.number`

It will change again in the future so just be on the lookout for when that happens 😉

---

<div class="post-metadata">

### Author: ![developer\_bt](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/developer_bt/32/1311_2.png) [@developer\_bt](https://community.particle.io/u/developer_bt)
#### Post date: [January 29, 2014, 8:39am UTC](https://community.particle.io/t/spark-api-helper/640/5 "2014-01-29T08:39:01Z")

</div>

Excellent program!  
But there is a small error in Java script program.  
And in case you do not be connected SparkCore when you send a command after some time a message appears Success!  
Maybe you should make timeout feature in order to avoid this.  
Because in this way is not known whether SpaprkCore really accept command.  
This can also be done with variable feedback from Spark.
