To process badges with backpack and control api request and this class using for Open Badge API v2.1 methods.  
 More...
|  | 
| endpoint endpoint | $apibase | 
|  | The apiBase endpoint. 
 | 
|  | 
| null | $backpackapiversion | 
|  | version api of the backpack. 
 | 
|  | 
| issuer issuer | $issuer | 
|  | The OAuth2 Issuer for this backpack. 
 | 
|  | 
To process badges with backpack and control api request 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::__construct | ( |  | $externalbackpack | ) |  | 
      
 
backpack_api2p1 constructor. 
- Parameters
- 
  
    | object | $externalbackpack | object |  
 
- Exceptions
- 
  
  
 
 
◆ curl_request()
      
        
          | core_badges\backpack_api2p1::curl_request | ( |  | $action, | 
        
          |  |  |  | $postdata = null ) | 
      
 
Make an api request. 
- Parameters
- 
  
    | string | $action | The api function. |  | string | $postdata | The body of the api request. |  
 
- Return values
- 
  
  
 
 
◆ disconnect_backpack()
      
        
          | core_badges\backpack_api2p1::disconnect_backpack | ( |  | $backpack | ) |  | 
      
 
Disconnect the backpack from this user. 
- Parameters
- 
  
    | object | $backpack | to disconnect. |  
 
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
◆ get_api_base_url()
  
  | 
        
          | core_badges\backpack_api2p1::get_api_base_url | ( |  | ) |  |  | protected | 
 
Gets the apiBase url associated to this backpack. 
- Return values
- 
  
  
 
 
◆ get_issuer()
  
  | 
        
          | core_badges\backpack_api2p1::get_issuer | ( |  | ) |  |  | protected | 
 
Initialises or returns the OAuth2 issuer associated to this backpack. 
- Return values
- 
  
  
 
 
◆ get_stored_token()
  
  | 
        
          | core_badges\backpack_api2p1::get_stored_token | ( |  | $externalbackpackid | ) |  |  | protected | 
 
Get token. 
- Parameters
- 
  
    | int | $externalbackpackid | ID of external backpack. |  
 
- Return values
- 
  
    | oauth2\badge_backpack_oauth2|false|stdClass|null |  |  
 
 
 
◆ put_assertions()
      
        
          | core_badges\backpack_api2p1::put_assertions | ( |  | $hash | ) |  | 
      
 
Export a badge to the backpack site. 
- Parameters
- 
  
    | string | $hash | of badge issued. |  
 
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
The documentation for this class was generated from the following file: