Skip to content

Instantly share code, notes, and snippets.

@Anenth
Created August 1, 2013 06:03
Show Gist options
  • Save Anenth/6128752 to your computer and use it in GitHub Desktop.
Save Anenth/6128752 to your computer and use it in GitHub Desktop.
Parse js
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.parsecdn.com/js/parse-1.2.8.min.js"></script>
Parse.initialize("CqvQbKeavBips6SMg1w2HVl1dPFwdq3KOTYOhpwg", "Xu3fHRW5GWhVPgFFvlMiK0ACFSkaSmmzn8I87XqM"); //application key
var TestObject = Parse.Object.extend("TestObject");
//adding new element to the db
var testObject = new TestObject();
testObject.save(
{
foo: "bar"
},{
success: function(object) { },
error: function(model, error) {}
});
//fetching data
var query = new Parse.Query(TestObject);
query.get("xWMyZ4YEGZ", { //object id
success: function(gameScore) {},
error: function(object, error) {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment