Skip to content
No description or website provided.
PHP
Find file
Latest commit b7c458f Jun 20, 2013 @apotropaic Merge pull request #99 from warnew/master
Added whereAll to parseQuery
Failed to load latest commit information.
tests regex query test no test against string instead of an integer. fixes #61 Dec 27, 2012
.gitignore added .gitignore file and updated README to include instructions on c… Jul 31, 2012
EnhanceTestFramework.php start of v2 May 13, 2012
README.md Update README.md May 14, 2013
parse.php thanks to @elistone added socialLogin function to parseUser class. Jun 12, 2013
parseACL.php Made an parceACL class to handle ACL Sep 11, 2012
parseCloud.php Cloud code functionality Mar 29, 2013
parseFile.php finished tests Jul 23, 2012
parseGeoPoint.php Update parseGeoPoint.php Sep 20, 2012
parseObject.php fixed typo in getting child objects Aug 29, 2012
parsePush.php Added Advanced Push Targeting May 20, 2013
parseQuery.php added whereAll Jun 17, 2013
parseUser.php thanks to @elistone added socialLogin function to parseUser class. Jun 12, 2013
test.php

README.md

PHP parse.com API library

More on the parse.com api here: https://www.parse.com/docs/rest

V1 is still available

Availalbe here: https://github.com/apotropaic/parse.com-php-library/blob/parse.com-php-library_v1/README.md

I wrote tests not for testing sake, but really just to see how I liked how the library worked!

Feedback Wanted

This is a work in progress and is a drasticly different then v1 of this library.

Let me know what you think and suggestions and ideas

SETUP

Instructions after cloning this repository you have to create a file in the root of it called parseConfig.php

sample of parseConfig.php

Below is what you want parseConfig.php to look like, just fill in your IDs and KEYs to get started.

<?php

class parseConfig{

    const APPID = '';
    const MASTERKEY = '';
    const RESTKEY = '';
    const PARSEURL = 'https://api.parse.com/1/';
}

?>

EXAMPLE

sample of upload.php

<?php 
    //This example is a sample video upload stored in parse

    $parse = new parseObject('Videos');
    $parse->title = $data['upload_data']['title'];
    $parse->description = $data['upload_data']['description'];
    $parse->tags = $data['upload_data']['tags'];

    //create new geo
    $geo = new parseGeoPoint($data['upload_data']['lat'],$data['upload_data']['lng']);
    $parse->location = $geo->location;

    //use pointer to other class
    $parse->userid = array("__type" => "Pointer", "className" => "_User", "objectId" => $data['upload_data']['userid']);

    //create acl
    $parse->ACL = array("*" => array("write" => true, "read" => true));
    $r = $parse->save();
    ?>
Something went wrong with that request. Please try again.