invirtus/chirpstack3-api

Chirpstack 3 PHP API

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 3

Language:Makefile

pkg:composer/invirtus/chirpstack3-api

dev-master 2024-11-19 14:54 UTC

This package is not auto-updated.

Last update: 2025-10-08 17:29:17 UTC


README

ChirpStack gRPC API message and service wrappers for PHP.

Install

With composer:

composer require chirpstack/chirpstack-api

Usage

All messages, services, constants, etc. are auto-generated from the ChirpStack protobuf definitions. The result is that this package structure matches that of the protobuf definitions.

The protobuf definitions can be found here: https://github.com/chirpstack/chirpstack/tree/master/api/proto

Example

<?php

namespace Test;

use Chirpstack\API\ApplicationServiceClient;
use Chirpstack\API\ListApplicationsRequest;
use Grpc\Channel;
use Grpc\ChannelCredentials;

require dirname(__FILE__) . '/vendor/autoload.php';

function main() {
    $channel = new Channel('url',  ['credentials' => ChannelCredentials::createInsecure()]);
    $client = new ApplicationServiceClient('url', [], $channel);
    $request = new ListApplicationsRequest();
    $response = $client->List($request);
    $data = $response->wait();
    print_r($data);
}

main();