B4J Library jParse - changed to class

Edit: Ver 0.94 published as class, minor mod in push methods.

Edit: version 0.93
This library version includes a code module "Parse" and class "ParseObject"
The Parse module is used to initialize the general parameters (keys, DB name etc.) and to signup or login. The objects - to do the objects methods.
Parse should be initialized before any parseobject.
except for SignUp and Login events, all other event subs should include the object name, like if p is defined as parseobject, there should be "Public sub p_GetObjects_Done(....)"
I believe this gives more flexibility in management of the objects.
The methods are as before, see below.
The version also corrects a problem with access of "long" variables in Parse.

This library is different then the B4A library, it is using Parse REST API https://www.parse.com/docs/rest#summary, jHTTP, jHTTPUtils2, json, jstringUtils libraries, starting from b4j ver. 1.05 .
The library is published at ver 0.9 since I'm sure (and hope) there will be responses and comments and wishes for changes/additions.
The libray provides the following methods:
Initialize
SignUp
LogIn
GetObjects
GetObjects2
AddObject
Update
GetFile
GetImage
GetFileName
SetFile
DeleteObject
DeleteFile

Almost all the methods return their response to event subs:
SignUp_Done
Login_Done
GetObjects_Done
AddObject_Done
Update_Done
GetImage_Done
GetFile_Done
SetFile_Done
DeleteObject_Done
DeleteFile_Done


These are really the basic methods, the API provides more and probably can be added if are necessary. Let me know.
The example shows how the library can be used but it will not run since I didn't provide application keys, username and password.
Thanks to Erel and thedesolatesoul who helped alot in writing this. If the same level of support will be available I'll try to add Parse Notification.

Edit: version 0.91 corrects a bug in GetObjects2 and updates the example file.
Edit: version 0.92 includes two more methods and one event that implement Push Notification::
PushSimple
PushUntil
PushNotification_Done

Edit:
Note: ParseObject initialization method includes a datetime.format definition. If you use it and your application uses another format - it may suffer errors. The cure is to re-declare your required format after using the Parseobject.
 

Attachments

  • jParse_0.94_class_and_example.zip
    7.6 KB · Views: 479
Last edited:

derez

Expert
Licensed User
Longtime User
Version 0.92 enables Push Notification.
A question : is it possible to get notifications in the PC ?
 
Last edited:

derez

Expert
Licensed User
Longtime User
Note: ParseObject initialization method includes a datetime.format definition. If you use it and your application uses another format - it may suffer errors. The cure is to re-declare your required format after using the Parseobject.

Ver 0.94 has a minor mod in push methods and provides the library as a class.
 
Last edited:
Top