artikcloud / artikcloud-php
2.2.3
2017-12-28 23:24 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-28 19:31:14 UTC
README
此SDK帮助您将PHP脚本连接到ARTIK Cloud。SDK公开了许多方法,以轻松执行对ARTIK Cloud的REST API调用。
- 包版本:2.2.3
要求
PHP 5.5.0及以后版本
安装和用法
Composer
要通过Composer安装绑定,请在composer.json
中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/artikcloud/artikcloud-php.git"
}
],
"require": {
"artikcloud/artikcloud-php": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/./autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: artikcloud_oauth ArtikCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $api_instance = new ArtikCloud\Api\DeviceTypesApi(); $device_type_id = "device_type_id_example"; // string | deviceTypeId try { $result = $api_instance->getAvailableManifestVersions($device_type_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling DeviceTypesApi->getAvailableManifestVersions: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI相对于https://api.artik.cloud/v1.1
模型文档
- AckEnvelope
- Acknowledgement
- Action
- ActionArray
- ActionDetails
- ActionDetailsArray
- ActionIn
- ActionOut
- Actions
- AggregateData
- AggregatesHistogramData
- AggregatesHistogramResponse
- AggregatesResponse
- AppProperties
- CertificateData
- CertificateEnvelope
- CertificateFields
- CertificateId
- CheckTokenMessage
- CheckTokenResponse
- ContactInfo
- Device
- DeviceArray
- DeviceEnvelope
- DevicePricingTier
- DevicePricingTierEnvelope
- DevicePricingTierRequest
- DevicePricingTiers
- DevicePricingTiersEnvelope
- DeviceRegCompleteRequest
- DeviceRegConfirmUserRequest
- DeviceRegConfirmUserResponse
- DeviceRegConfirmUserResponseEnvelope
- DeviceRegStatusResponse
- DeviceRegStatusResponseEnvelope
- DeviceShareInfo
- DeviceSharing
- DeviceSharingArray
- DeviceSharingEnvelope
- DeviceSharingId
- DeviceStatus
- DeviceStatusBatch
- DeviceStatusData
- DeviceStatusPut
- DeviceStatusPutData
- DeviceTask
- DeviceTaskUpdateRequest
- DeviceTaskUpdateResponse
- DeviceToken
- DeviceTokenEnvelope
- DeviceType
- DeviceTypeArray
- DeviceTypeEnvelope
- DeviceTypeInfo
- DeviceTypeInfoEnvelope
- DeviceTypePricingList
- DeviceTypePricingTier
- DeviceTypePricingTiersEnvelope
- DeviceTypeUpdateInput
- DeviceTypesEnvelope
- DeviceTypesInfo
- DeviceTypesInfoEnvelope
- DevicesEnvelope
- ErrorEnvelope
- EventFeedData
- ExportData
- ExportDataArray
- ExportHistoryResponse
- ExportNormalizedMessagesResponse
- ExportRequest
- ExportRequestData
- ExportRequestInfo
- ExportRequestResponse
- ExportResponse
- ExportStatusResponse
- FieldPath
- FieldPresence
- FieldPresenceEnvelope
- FieldsActions
- ManifestProperties
- ManifestPropertiesEnvelope
- ManifestVersions
- ManifestVersionsEnvelope
- Message
- MessageAction
- MessageID
- MessageIDEnvelope
- MessageIn
- MessageOut
- MetadataEnvelope
- MetadataPropertiesEnvelope
- MetadataQueryEnvelope
- NonEmptyString
- NormalizedAction
- NormalizedActionsEnvelope
- NormalizedMessage
- NormalizedMessagesEnvelope
- NotifMessage
- NotifMessageArray
- NotifMessagesResponse
- OutputRule
- PresenceEnvelope
- PresenceModel
- PropertiesEnvelope
- RefreshTokenResponse
- RegisterMessage
- RejectedCSVRow
- RejectedCSVRowsEnvelope
- RuleArray
- RuleCreationInfo
- RuleEnvelope
- RuleError
- RuleUpdateInfo
- RuleWarningOutput
- RulesEnvelope
- SnapshotResponse
- 快照响应
- 快照响应信封
- 订阅
- 订阅数组
- 订阅信封
- 订阅信息
- 订阅信封
- 标签
- 标签数组
- 标签信封
- 任务
- 按设备ID获取任务
- 按设备ID获取任务列表
- 按设备ID获取任务列表信封
- 任务信封
- 任务历史
- 任务历史列表
- 任务列表
- 任务列表信封
- 任务参数
- 任务请求
- 任务状态
- 任务状态计数
- 任务状态列表
- 任务状态列表信封
- 任务状态历史信封
- 任务更新请求
- 任务更新响应
- 任务状态计数
- 层级
- 令牌
- 令牌信息
- 令牌信息成功响应
- 令牌请求
- 令牌响应
- 注销设备响应
- 注销设备响应信封
- 更新参数
- 升级路径
- 升级路径信封
- 升级路径用户令牌
- 升级路径用户令牌信封
- 上传ID信封
- 上传状态信封
- 用户
- 用户信封
- 验证回调信息
- 有效期
- WebSocket错误
- 白名单
- 白名单信封
- 白名单结果信封
授权文档
artikcloud_oauth
- 类型: OAuth
- 流程: 隐式
- 授权URL: https://accounts.artik.cloud/authorize
- 作用域:
- read:artikcloud: 从ARTIK云读取
- write:artikcloud: 从ARTIK云写入
用法
查看测试以了解如何使用SDK的示例。
更多关于ARTIK云
如果您不熟悉ARTIK云,我们提供了丰富的文档在https://developer.artik.cloud/documentation
完整的ARTIK云API规范可以在https://developer.artik.cloud/documentation/api-reference/找到
查看高级示例应用https://developer.artik.cloud/documentation/samples/
要创建和管理ARTIK云上的服务和设备,请https://developer.artik.cloud创建账户
还可以查看ARTIK云博客,了解教程、更新等内容:http://artik.io/blog
许可和版权
根据Apache许可证许可。请参阅LICENSE。