emnify / emnify-sdk
通过emnify为您的物联网设备群提供云端连接。使用此PHP SDK自动化您的日常流程。
0.0.2
2024-07-09 19:11 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.7
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-02 06:00:33 UTC
README
emnify系统REST API资源。
需求
PHP 5.5及以上版本
安装与使用
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{
"require": {
"emnify/emnify-sdk": "*@dev"
}
}
然后运行composer install
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请按照安装程序进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Swagger\Client\Api\ApplicationTokensApi( // 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\ApplicationToken(); // \Swagger\Client\Model\ApplicationToken | $app_token_id = 1.2; // float | application token ID try { $apiInstance->applicationTokenByIdPatch($body, $app_token_id); } catch (Exception $e) { echo 'Exception when calling ApplicationTokensApi->applicationTokenByIdPatch: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\ApplicationTokensApi( // 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 ); try { $result = $apiInstance->applicationTokenGet(); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicationTokensApi->applicationTokenGet: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\ApplicationTokensApi( // 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\CreateApplicationTokenrequest(); // \Swagger\Client\Model\CreateApplicationTokenrequest | try { $result = $apiInstance->applicationTokenPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicationTokensApi->applicationTokenPost: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于https://cdn.emnify.net
模型文档
- AccountActivationrequest
- ActionOnExhaustion
- ActivateBatch
- ActivateMFAKeyRequest
- Apiv1cncbreakoutStatus
- Apiv1eventEventSeverity
- Apiv1eventEventSource
- Apiv1eventEventType
- Apiv1eventOrganisation
- Apiv1eventUser
- Apiv1organisationorgIdOrMyinclusiveVolumeactiveCurrency
- Apiv1organisationorgIdOrMyinclusiveVolumeactiveTariff
- Apiv1organisationorgIdOrMyinclusiveVolumeactiveTariffRatezone
- Apiv1organisationorgIdtariffPlanServiceLevel
- Apiv1organisationorgIdtariffPlanTariffPlan
- Apiv1organisationorgIdtariffPlanTariffPlanCurrency
- Apiv1organisationorgIdtariffPlanTariffPlanPrice
- Apiv1organisationorgIdtariffPlanTariffPlanServiceLevel
- Apiv1organisationorgIdtariffPlanTariffPlanStatus
- Apiv1organisationorgIdtariffPlanTariffPlanVisibility
- Apiv1serviceserviceIdtrafficLimitPeriod
- Apiv1simCustomerOrg
- Apiv1simsimIdstatsLastMonth
- Apiv1simsimIdstatsLastMonthData
- Apiv1tariffProfileTariff
- Apiv1tariffProfileTariffCurrency
- Apiv1userStatus
- Apiv1usermfakeyIdStatus
- Apiv2dataStreamDestination
- Apiv2dataStreamFilters
- Apiv2dataStreamdataStreamIdStatus
- ApplicationToken
- 身份验证
- AuthenticationResponse
- ChangePassword422Error
- ChangePasswordrequest
- ChangeQuota422Error
- CloudConnectBreakoutType
- 国家
- CreateApplicationTokenrequest
- CreateApplicationTokenresponse
- CreateCloudConnectTGWRequest
- CreateCloudConnectVPNRequest
- CreateCloudConnectVPNRequest1
- CreateMFAKeyResponse
- CreateTariffProfilerequest
- CreateUserrequest
- CreateaDNSentryrequest
- CreateaServiceProfilerequest
- Currency
- DataStreamDataStreamIdBody
- ESIMInstallationCodeInJSONFormat
- 端点
- 端点1
- 端点2
- 端点配额
- 端点配额1
- 端点运行时数据
- 事件
- 形式因子
- GetHourlyOrganisationStatsResponse
- GetHourlyOrganisationStatsResponseData
- GetHourlyOrganisationStatsResponseSms
- GetMonthlyOrganisationStatsResponse
- GetMonthlyOrganisationStatsResponseInclusiveVolume
- GetMonthlyOrganisationStatsResponsePrepaidBalance
- GetMonthlyOrganisationStatsResponseSim
- GetOrganisationActiveTariffPlanResponse
- GetOrganisationActiveTariffPlanResponseAppliedPrice
- GetOrganisationActiveTariffPlanResponseAppliedPriceSimActivatedRate
- GetOrganisationActiveTariffPlanResponseTariffPlan
- GetOrganisationActiveTariffPlanResponseTariffPlanPrice
- GetOrganisationActiveTariffPlanResponseTariffPlanPriceSimActivatedRate
- GetOrganisationActiveTariffPlanResponseTariffPlanRuntime
- GetdetailsofSMSresponse
- HasId
- InclusiveVolumeInclusiveVolumeIdBody
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse201
- InlineResponse404
- InlineResponse422
- ListofAllAvailableSIMStatusesresponse
- ListofApplicationTokensresponse
- ListofSMSresponse
- Listoftrusteddevicesresponse
- MFAKeyStatusLookupresponse
- MFAKeyTypeLookupresponse
- 模型40x响应
- OneOfapiv1组织orgId计费计划计费计划价格Sim激活率项目
- OneOfapiv2数据流目的地凭据
- 组织每日流量对象
- 组织每日流量对象流量类型
- 组织流量统计月对象
- 组织流量统计对象
- 修补计费配置文件请求
- 配额状态
- RAT类型
- 重新发送激活邮件请求
- 可激活SIM批次的响应
- SIM统计响应模式
- 检索可用地址空间响应
- 检索可用分出区域响应
- 检索可用国家响应
- 检索可用货币响应
- 检索可用数据块大小响应
- 检索可用数据节流响应
- 检索可用ESME接口类型响应
- 检索可用服务响应
- 检索可用用户状态响应
- 检索连接信息响应
- 检索覆盖范围响应
- 检索端点连接状态响应
- 检索端点统计响应
- 检索事件类型响应
- 检索事件响应
- 检索事件响应4
- 检索运营商黑名单响应
- 检索组织状态响应
- 检索预付费平衡响应
- 检索服务配置文件列表响应
- 检索单个服务配置文件响应
- 检索可用流量限制响应
- 检索自己的IP地址空间响应
- 检索用户响应
- SMS配额
- 服务配置文件
- Sim
- Sim条目
- Sim条目1
- Sim制造商
- Sim型号
- 开始USSD对话框请求
- 开始USSD对话框响应
- 状态
- 提交MT SMS请求
- 成功批量激活
- 计费配置文件
- 计费配置文件1
- 计费配置文件2
- 计费配置文件包含容量
- 计费配置文件包含容量货币
- 计费配置文件包含容量费率区
- 更新端点
- 按ID更新端点连接性请求
- 更新预付费平衡响应
- 更新SIM
- 更新服务配置文件
- 更新计费请求
- 更新用户请求
- 用户
- 按ID V2创建支持令牌请求
- 按ID V2创建支持令牌请求1
- 用户MFA体
- V1ApiSecret体
- V2DataStream体
授权文档
bearerAuth
- 类型:HTTP载体身份验证