infobird/openapi

v0.1.5.2 2020-11-24 03:58 UTC

README

infobird openapi SDK for PHP

https://packagist.org/packages/infobird/openapi

Run environment

  • PHP 5.3+.
  • cURL extension.

how to use

first install the libraay

composer require infobird/openapi
config.ini should in you rootpath and openapi.url config is need

index.php file you need to add

require './vendor/autoload.php';

then

use \Infobird\Openapi\Client;
 
$token = $this->_request->token;
$systemId = $this->_request->version_id;
$corpType =  $this->_request->isfz?:0;
if(empty($token)){
    echo 'token not found!';exit;
}
$c = new Client($token,$systemId,$corpType);
$res = $c->auth();
       
$res = json_decode($res,true); 
if($res['code']!=='0'){
	echo $res['msg'];exit;
}
        

enjoy it