Skip to content

observ8/parse.com-php-library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Library to use parse.com rest API. 
More on the api here: https://www.parse.com/docs/rest

Some examples on how to use this library:


 //
 // CREATE OBJECT
 // 
 
  	$parse = new parseRestClient(array(
		'appid' => 'YOUR APPLICATION ID',
		'masterkey' => 'YOUR MASTER KEY ID'
	));
  

 //
 // CREATE EXAMPLE
 // 
	$params = array(
		'className' => 'gameScore',
		'object' => array(
			'score' => 500,
			'name' => 'Andrew Scofield'
		)
	);
	
	$request = $parse->create($params);

  
 // 
 // GET EXAMPLE
 //  
 
	$params = array(
		'className' => 'gameScore',
 		'objectId' => 'Ed1nuqPvcm'
	);
	
	$request = $parse->get($params);
  
  
 // 
 //QUERY EXAMPLE
 //
	
	$params = array(
		'className' => 'gameScore',
		'query' => array(
			'score'=> array(
				'$gt' => 500
			) 
		),
		'order' => '-score',
		'limit' => '2',
		'skip' => '2'
	);
	
	$request = $parse->query($params);
 
  
 // 
 // UPDATE EXAMPLE
 //  
 
	$params = array(
		'className' => 'gameScore',
 		'objectId' => 'Ed1nuqPvcm',
		'object' => array(
			'score' => 500,
			'name' => 'Andrew Scofield'
		)
	);
	
	$request = $parse->update($params);
  
  
 // 
 // DELETE EXAMPLE
 //  
 
	$params = array(
		'className' => 'gameScore',
 		'objectId' => 'Ed1nuqPvcm',
	);
	
	$request = $parse->delete($params);
 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published