google/cloud-iot
Google Cloud IoT Core Client for PHP
Maintainers
Requires
- php: ^8.0
- google/gax: ^1.34.0
Requires (Dev)
- google/cloud-core: ^1.52.7
- phpunit/phpunit: ^9.0
Suggests
- ext-protobuf: Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.
Provides
None
Conflicts
None
Replaces
None
Apache-2.0 2a92bb7804967bc4af1bcde20c2d0adeafa13583
This package is auto-updated.
Last update: 2024-06-01 03:20:14 UTC
README
Idiomatic PHP client for Google Cloud IoT Core.
👁 Latest Stable Version
👁 Packagist
NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project.
A fully managed service for securely connecting and managing IoT devices, from a few to millions. Ingest data from connected devices and build rich applications that integrate with the other big data services of Google Cloud Platform.
Installation
To begin, install the preferred dependency manager for PHP, Composer.
Now install this component:
$ composer require google/cloud-iot
Authentication
Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.
Sample
require 'vendor/autoload.php'; use Google\Cloud\Iot\V1\DeviceManagerClient; $deviceManager = new DeviceManagerClient(); $projectId = '[MY_PROJECT_ID]'; $location = 'us-central1'; $registryId = '[MY_REGISTRY_ID]'; $registryName = $deviceManager->registryName($projectId, $location, $registryId); $devices = $deviceManager->listDevices($registryName); foreach ($devices->iterateAllElements() as $device) { printf('Device: %s : %s' . PHP_EOL, $device->getNumId(), $device->getId() ); }
Version
This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.
Next Steps
- Understand the official documentation.
- Take a look at in-depth usage samples.
