-
-
Save gaodeng/48ae53c07f5a1ee8bede1883cc3d6ebe to your computer and use it in GitHub Desktop.
Example of exporting data with cloud functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST \ | |
| -H "X-Parse-Application-Id: YKjNQyNBBsaJpRlcSRxBfR3yKCGdU395XzZfqjdB" \ | |
| -H "X-Parse-REST-API-Key: JBDMxg9uyvbq7FQdd44EtSKDLdDlIrRrP6EIvFZJ" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"exportClass": "MyClass"}' \ | |
| https://parseapi.back4app.com/functions/export > out.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Parse.Cloud.define("export", function(request, response) { | |
| var ExportObject = Parse.Object.extend(request.params.exportClass); | |
| var query = new Parse.Query(ExportObject); | |
| query.find({ success: response.success, error: response.error }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment