Is Corona SDK going to support the PARSE API?

Hi there

I've been looking at the stuff provided at www.parse.com

It looks pretty useful - would there be any chance of implementing access to it through the Corona SDK?

Best regards

JB

You should be able to use parse.com right now using their REST API and the network.request() api call.

The biggest pain I see is that you have to store the objectID somewhere.

Example create object code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local json = require("json")
local mime = require("mime")
 
local MasterKey = "yourmasterkeyfromparse.com"
local ApplicationID = "yourappIDfromparse.com"
 
local function networkListener( event )
        if ( event.isError ) then
                print( "Network error!")
        else
                print ( "RESPONSE: " .. event.response )
                local responseData = json.decode(event.response)
                local objectId = responseData["objectId"]
        end
end
 
headers = {}
 
headers["Content-Type"] = "application/json"
headers["Accept-Language"] = "en-US"
headers["Authorization"] = "Basic " .. mime.b64(ApplicationID .. ":" .. 
MasterKey)
 
postData = json.encode(myDataTable)
 
local params = {}
params.body = postData
params.header = headers
 
network.request( "https://api.parse.com/1/classes/GameData", "POST", networkListener, params)

As corona's network.request does not officially support PUT and DELETE requests on device builds, the official answer is no. You could always write your own php webservice and issue parse.com requests over your own service (like a gateway), but this also limits one of parse's important features: scalability.

parse and stackmob are freaking good services.. i beg ansca to support PUT and DELETE :)

views:1650 update:2012/1/9 8:53:30
corona forums © 2003-2011