J.P.A.L.

 

request

Page history last edited by Anonymous 2 yrs ago

request

 

request makes an AJAX-style call directly to the PBwiki API and is thus the easiest way to make an asynchronous call to the API. It is used by JPAL's API interface functions, so you usually will NOT need to call it directly, but it may be useful when the PBwiki API has updated with new functions and JPAL hasn't updated to match yet. The function is called with:

 

jpal.request(call,handler,data)

 

call is a string containing the function and any parameters, such as SomeAPIFunction?parameter=1¶meter=2

handler is a function that will be called upon successful request. request will pass a JSON object to the handler, as specified in the API documentation

data is an option parameter. If null (not set), the request will be a GET; otherwise, it will be a POST, with data as the POST body.

Comments (0)

You don't have permission to comment on this page.