Represent a single method for the remote api and this class using for Open Badge API v2.1 methods.
More...
|
| __construct ($action, $url, $postparams, $multiple, $method, $json, $authrequired, $isuserbackpack, $backpackapiversion) |
| Create a mapping.
|
|
| is_match ($action) |
| Does the action match this mapping?
|
|
| request ($apiurl, $tokenkey, $post=[]) |
| Make an api request and parse the response.
|
|
|
string | $action |
| The action of this method.
|
|
boolean | $authrequired |
| Authentication is required for this request.
|
|
boolean | $json |
| json decode the response.
|
|
string | $method |
| get or post methods.
|
|
boolean | $multiple |
| This method returns an array of responses.
|
|
array | $params |
| List of parameters for this method.
|
|
|
int | $backpackapiversion |
| OpenBadges version 1 or 2.
|
|
mixed | $postparams |
| List of parameters for this method.
|
|
Represent a single method for the remote api and this class using for Open Badge API v2.1 methods.
- Copyright
- 2020 Tung Thai
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_badges\backpack_api2p1_mapping::__construct |
( |
| $action, |
|
|
| $url, |
|
|
| $postparams, |
|
|
| $multiple, |
|
|
| $method, |
|
|
| $json, |
|
|
| $authrequired, |
|
|
| $isuserbackpack, |
|
|
| $backpackapiversion ) |
Create a mapping.
- Parameters
-
string | $action | The action of this method. |
string | $url | The base url of this backpack. |
mixed | $postparams | List of parameters for this method. |
boolean | $multiple | This method returns an array of responses. |
string | $method | get or post methods. |
boolean | $json | json decode the response. |
boolean | $authrequired | Authentication is required for this request. |
boolean | $isuserbackpack | user backpack or a site backpack. |
integer | $backpackapiversion | OpenBadges version 1 or 2. |
◆ is_match()
core_badges\backpack_api2p1_mapping::is_match |
( |
| $action | ) |
|
Does the action match this mapping?
- Parameters
-
- Return values
-
◆ request()
core_badges\backpack_api2p1_mapping::request |
( |
| $apiurl, |
|
|
| $tokenkey, |
|
|
| $post = [] ) |
Make an api request and parse the response.
- Parameters
-
string | $apiurl | Raw request url. |
string | $tokenkey | to verify authorization. |
array | $post | request method. |
- Return values
-
The documentation for this class was generated from the following file:
- badges/classes/backpack_api2p1_mapping.php