nomadez/sdk-php

用PHP编写的Nomadez SDK

dev-master / 0.1.x-dev 2017-12-01 09:40 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:58:48 UTC


README

用PHP编写的Nomadez SDK

安装

composer require nomadez/sdk-php dev-master

##使用

use Nomadez\SDK\Client;
use Nomadez\SDK\Resource as Resource;

$client = new Client();

// authenticate credentials and receive api key

$userPubResource = new Resource\Pub\User($client);

$response = $userPubResource->auth(
    'user@example.com',
    'superSecurePassword1'
);

$payload = $response->getBodyDecoded();

$client->setApiKey($payload['api_key']);