Name: open-sdk-php
Owner: ??
Description: ?????? PHP?SDK
Created: 2017-10-30 07:37:39.0
Updated: 2018-05-01 11:11:20.0
Pushed: 2017-10-30 08:38:18.0
Homepage: https://www.youzanyun.com/apilist
Size: 7
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Youzan Open SDK
Via Composer
mposer require youzan/open-sdk
ire_once './vendor/autoload.php';
entId = "fill your client_id";
entSecret = "fill your client_secret";
irectUrl = "fill your redirect_url";
e = 'oauth'; //????access_token?type??refresh_token
s['code'] = $_GET['code']; //????access_token????$keys['refresh_token']
s['redirect_uri'] = $redirect_url;
essToken = (new \Youzan\Open\Token($clientId, $clientSecret))->getToken($type, $keys);
dump($accessToken);
ire_once './vendor/autoload.php';
entId = "fill your client_id";
entSecret = "fill your client_secret";
e = 'self';
s['kdt_id'] = '160';
essToken = (new \Youzan\Open\Token($clientId, $clientSecret))->getToken($type, $keys);
dump($accessToken);
ire_once './vendor/autoload.php';
entId = "fill your client_id";
entSecret = "fill your client_secret";
e = 'platform_init';
essToken = (new \Youzan\Open\Token($clientId, $clientSecret))->getToken($type);
dump($accessToken);
ire_once './vendor/autoload.php';
entId = "fill your client_id";
entSecret = "fill your client_secret";
e = 'platform';
s['kdt_id'] = '160';
essToken = (new \Youzan\Open\Token($clientId, $clientSecret))->getToken($type, $keys);
dump($accessToken);
ire_once './vendor/autoload.php';
essToken = 'fill your token';
ent = new \Youzan\Open\Client($accessToken);
hod = 'youzan.item.get';
Version = '3.0.0';
ams = [
'alias' => 'fa8989ad342k',
ponse = $client->get($method, $apiVersion, $params);
dump($response);
ire_once './vendor/autoload.php';
essToken = 'fill your token';
ent = new \Youzan\Open\Client($accessToken);
hod = 'youzan.materials.storage.platform.img.upload';
Version = '3.0.0';
ams = [
'alias' => 'fa8989ad342k',
es = [
[
'url' => __DIR__ . '/test1.png',
'field' => 'image[]',
],
ponse = $client->post($method, $apiVersion, array(), $files);
dump($response);
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please using the issue tracker.
The MIT License. Please see License File for more information.