What is api(path, [options], [callback])?


Please explain why do you think this question should be reported?

Report Cancel

Create a RESTful request to the PhoneGap Build API. The api function is a wrapper to request's interface.

The path parameter is a relative path to a PhoneGap Build API response. For example, to the resource https://build.phonegap.com/api/v1/me is specified as the path /me.

The options parameter maps directly to request's options.

The default request method is GET. You can specify a specific but you can be changed in the options parameters (e.g. { method: 'POST' }).

To send form data, you can use the options.form parameter. The key data is assumed to be JSON and all other keys are assumed to be file paths.

Please follow and like us:

About the Author