abbadon1334 / scloby-client-api
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-15 19:08:00 UTC
README
https://developer.scloby.com/apidoc/assets/documentation.json 简介 认证令牌通过 Oauth2 标准发放 ( https://oauth.ac.cn) 您可以在我们的开发者门户申请 Scloby 测试账户 https://developer.scloby.com 这里是您的测试用的 ClientId 和 ClientSecret:client_id: SclobyApiDocs client_secret: DdyPNPvfPOGa0Izjct0C 所有数据都是 JSON 格式,POST/PUT 请求的 Content-Type 标头必须设置为 application/json。 搜索参数 您可以使用某些参数组合集合中的所有第一级属性进行搜索,或者指定一个值:property = VALUE 如果您正在搜索具有特定属性值的所有项目 property_since = MIN_VALUE 如果您正在搜索属性值大于(或等于)MIN_VALUE 的所有项目 property_max = MAX_VALUE 如果您正在搜索属性值小于(或等于)MAX_VALUE 的所有项目 property_like = LIKE_VALUE 如果您正在搜索包含子串内容。您可以使用 property_since 和 property_max 来模拟 between 操作符 如果您使用 equal 操作符,则忽略该参数的其他操作符 如果您在字符串中使用 _max 或 _since 操作符,则使用字母顺序
此 PHP 包是由 Swagger Codegen 项目自动生成的
- API 版本:2.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen 更多信息请访问 https://developer.scloby.com
要求
PHP 5.5 及以上版本
安装与使用
Composer
要使用 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照 安装流程 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: oAuth2AuthCode $config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $pagination = true; // bool | Pagination parameter $per_page = 56; // int | Results_per_page $page = 56; // int | PAGE_NUMBER(starting from 0 to TOTAL_PAGE-1) try { $result = $apiInstance->departmentsGet($pagination, $per_page, $page); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingDepartmentsApi->departmentsGet: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: oAuth2AuthCode $config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | id of the Department that need to be deleted try { $apiInstance->departmentsIdDelete($id); } catch (Exception $e) { echo 'Exception when calling AccountingDepartmentsApi->departmentsIdDelete: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: oAuth2AuthCode $config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = "id_example"; // string | id of the department try { $result = $apiInstance->departmentsIdGet($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingDepartmentsApi->departmentsIdGet: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: oAuth2AuthCode $config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\StockMovements(); // \Swagger\Client\Model\StockMovements | Object data that need to be updated $id = "id_example"; // string | id of the department that need to be updated try { $result = $apiInstance->departmentsIdPut($body, $id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingDepartmentsApi->departmentsIdPut: ', $e->getMessage(), PHP_EOL; } // Configure OAuth2 access token for authorization: oAuth2AuthCode $config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Swagger\Client\Api\AccountingDepartmentsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $body = new \Swagger\Client\Model\Departments(); // \Swagger\Client\Model\Departments | Department object that needs to be added. try { $result = $apiInstance->departmentsPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountingDepartmentsApi->departmentsPost: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.scloby.com/v2
模型文档
- AllergenSchema
- Allergens
- BookingShifts
- Bookings
- BookingtableSchema
- BookingtagSchema
- CampaignitemSchema
- CashMovements
- Categories
- CategorySchema
- ChainPrepaidMovements
- ChainsCampaigns
- ChainsFidelitiesMovements
- ChainsPrizes
- ChainsRules
- Channels
- CombinationbarcodeSchema
- ComponentSchema
- Components
- CustomerSchema
- CustomerSchema1
- Customers
- DepartmentSchema
- Departments
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2003Shop
- InlineResponse2004
- InlineResponse2005
- InlineResponse201
- InlineResponse2011
- InlineResponse2012
- InlineResponse400
- InlineResponse400Error
- ItemSchema
- ItembarcodeSchema
- ItembomcomponentSchema
- ItemchannelSchema
- 项目组合模式
- 项目图片模式
- 项目
- 订单客户模式
- 订单项模式
- 订单项成分模式
- 订单项变体模式
- 订单
- 支付方式
- 价格变更模式
- 打印机模式
- 打印机
- 原材料
- 房间
- 规则模式
- 销售客户模式
- 销售单据模式
- 销售发票模式
- 销售项目模式
- 销售支付模式
- 销售
- 会话
- 会话商店
- 库存
- 库存变动
- 供应商
- 表格模式
- 变体模式
- 变体值模式
- 增值税
- 增值税模式
授权文档
oAuth2AuthCode
- 类型: OAuth
- 流程: accessCode
- 授权URL: https://login.scloby.com/signin.php
- 作用域:
- ****: