2017 © Pedro Peláez
 

library sigfox_php

Sigfox API PHP 7 library

image

berkas1/sigfox_php

Sigfox API PHP 7 library

  • Monday, August 21, 2017
  • by berkas1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

sigfox_php library helps you to interact with Sigfox Backend API, (*1)

THe library requires only PHP7+ and cURL support. No other dependency is required., (*2)

Currenty supported APIs:

  • Device
  • Device Types
  • Groups

Installation

This library can be installed with composer., (*3)

To install composer and the library, run these commands:, (*4)

curl -sS https://getcomposer.org/installer | php
php composer.phar berkas1/sigfox_php

Usage

First, you need to initialize an instance of Sigfox class and enter user credentials. Then, you have to pick what you want to work with - Device, Device Type, Group, ..., (*5)

<?php

require 'vendor/autoload.php';
use Sigfox\Sigfox;

$sigfox = new Sigfox("userID", "password");
$device = $sigfox->device("deviceId");

And now you just use available methods, for example:, (*6)

print $device->consumptions(2017);
print $device->info();

Every method that communicates with API returns a string which contains JSON formatted message. To check HTTP response code (to see if action was completed successfully) use the getResponseCode() method:, (*7)

print $device->getResponseCode();

If a method accepts optional parameters, please provide them in form of array. To see which parameters are available for each method, please see official Sigfox API documentation (https://resources.sigfox.com/document/backend-api-documentation), (*8)

The Versions

21/08 2017

dev-master

9999999-dev

Sigfox API PHP 7 library

  Sources   Download

MIT

21/08 2017

1.0.0

1.0.0.0

Sigfox API PHP 7 library

  Sources   Download

MIT