Extends
Constructor
new mw.ForeignRest(url, foreignActionApi, [options])
#
Create an instance of mw.ForeignRest
.
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | URL pointing to another wiki's |
|||||||||||
foreignActionApi |
mw.ForeignApi | ||||||||||||
options |
Object |
optional |
See Properties:
|
- Since:
- 1.36
- Source:
Methods
abort()
#
Abort all unfinished requests issued by this Api object.
- Inherited from:
- Source:
ajax(path, [ajaxOptions]) → {jQuery.Promise}
#
Perform the API call.
Parameters:
- Inherited from:
- Source:
Returns:
Done: API response data and the jqXHR object. Fail: Error code
- Type
- jQuery.Promise
delete(path, body, [headers]) → {jQuery.Promise}
#
Perform REST API DELETE request.
Note: only sending application/json
is currently supported.
Parameters:
- Inherited from:
- Source:
Returns:
- Type
- jQuery.Promise
get(path, query, [headers]) → {jQuery.Promise}
#
post(path, [body], [headers]) → {jQuery.Promise}
#
Perform REST API post request.
Note: only sending application/json is currently supported.
Parameters:
- Inherited from:
- Source:
Returns:
- Type
- jQuery.Promise
put(path, body, [headers]) → {jQuery.Promise}
#
Perform REST API PUT request.
Note: only sending application/json
is currently supported.
Parameters:
- Inherited from:
- Source:
Returns:
- Type
- jQuery.Promise