lodgea / lodgea-php
LODGEA的PHP SDK
1.2.0
2023-02-07 12:22 UTC
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
LODGEA SDK for php。更多信息请访问 https://docs.lodgea.io。
安装与使用
要求
PHP 7.3及更高版本。虽然可能与PHP 8.0兼容,但尚未进行测试。
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json中:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/lodgea-php/vendor/autoload.php');
入门指南
请按照安装过程进行,然后运行以下命令:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: ApiKeyAuth $config = com.lodgea\Configuration::getDefaultConfiguration()->setApiKey('apiKey', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = com.lodgea\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apiKey', 'Bearer'); $apiInstance = new com.lodgea\Api\DefaultApi( // 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 ); $inline_object1 = new \com.lodgea\com.lodgea.model\InlineObject1(); // \com.lodgea\com.lodgea.model\InlineObject1 try { $result = $apiInstance->availabilitySearchPost($inline_object1); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->availabilitySearchPost: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI均相对于 https://api.eu.lodgea.io/v1
模型
- InlineObject
- InlineObject1
- InlineResponse200
- InlineResponse2001
- InlineResponse2001AttractionList
- InlineResponse2001Distance
- InlineResponse2001Geo
- InlineResponse2001GeoLocation
- InlineResponse2001List
- InlineResponse2001LowestPrice
- InlineResponse2001MediaList
- InlineResponse2002
- InlineResponse2002List
- InlineResponse2003
- InlineResponse2003PolicyInfo
- InlineResponse2003PolicyInfoFeePolicyList
- InlineResponse2003PolicyInfoTaxPolicyList
- InlineResponse2003PricingList
- InlineResponse2003ProductList
- InlineResponse2003Property
- InlineResponse2003PropertyAddressList
- InlineResponse2003PropertyAwardList
- InlineResponse2003PropertyCancellationGracePeriod
- InlineResponse2003PropertyCancellationPolicyList
- InlineResponse2003PropertyContactList
- InlineResponse2003PropertyFacilityInfo
- InlineResponse2003PropertyFacilityInfoAmenityList
- InlineResponse2003PropertyFacilityInfoGuestRoomList
- InlineResponse2003PropertyFacilityInfoMediaList
- InlineResponse2003PropertyFacilityInfoMessageList
- InlineResponse2003PropertyFeePolicyList
- InlineResponse2003PropertyGuaranteePolicy
- InlineResponse2003PropertyGuestInfo
- InlineResponse2003PropertyMediaList
- InlineResponse2003PropertyOperationTimeList
- InlineResponse2003PropertyPetsPolicy
- InlineResponse2003PropertyPolicyList
- InlineResponse2003PropertyPropertyInfo
- InlineResponse2003PropertyPropertyInfoAcceptedPaymentList
- InlineResponse2003PropertyPropertyInfoMessageList
- InlineResponse2003PropertyRecordCreated
- InlineResponse2003PropertyRecordModified
- InlineResponse2003PropertyServiceList
- InlineResponse2003PropertyTaxPolicyList
- InlineResponse2003RatePlanList
- InlineResponse2004
- InlineResponse2004AvailabilityList
- InlineResponse2004PricingList
- InlineResponse2004RatePlanList
- InlineResponse200List
- InlineResponse400
- InlineResponse4001
- InlineResponse4001ValidationErrors
- InlineResponse400ValidationErrors
授权
ApiKeyAuth
- 类型: API密钥
- API密钥参数名: apiKey
- 位置: HTTP头
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包由OpenAPI Generator项目自动生成
- API版本:
1.2.0- 包版本:
1.2.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen