2017 © Pedro Peláez
 

library console

A Laravel Package for particle.io

image

particleio/console

A Laravel Package for particle.io

  • Thursday, October 6, 2016
  • by subhankartier5
  • Repository
  • 2 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

NOTE :- THIS IS THE DEVELOPMENT VERSION 1.0
, (*1)

Installation

{
    "require": {
        "particleio/console": "dev-master"
    }
}

Then Run :- bash composer update , (*2)

Configuration

Particle\Console\ParticlesServiceProvider::class,


, (*3)

write use, (*4)

  Particle\Console\Http\Controllers\ParticleController as Particle;

at the top of your controller.
, (*5)

Usage

initiate object like, (*6)

  $obj = new Particle();

for login use, (*7)

 $obj->Auth($user_id, $password);

List All Devices in a account

this method accepts only one parameter thats access token
, (*8)

Method Signature :-
$obj->ListDevices($token)

Transfer ownership

this method transfer ownership of a particle through third party website of a particlebr/ this method accespts two param 1. access token and 2. device id br/, (*9)

Method Signature : -
$obj->RequestDeviceTransfer($token, $device_id)

Claim a Device Through usb

this method claim a brand new device in your particle console through usb (No need of particle app) . Accepts two parameters 1. access token 2. device id
, (*10)

Method Signature : -
$obj->claimDeviceOverUsb($token, $device_id)

Delete an access token

this method will delete an access token access three params 1. user id 2. password 3. access token you want to deletebr/, (*11)

Method Signature :-
$obj->delAccessToken($user_id, $password, $token_to_del) 

Get a device Information:-

this method accept two params 1. device id, 2.access token.br/, (*12)

Method Signature:-
$obj->getDeviceInfo($device_ID, $access_token)

Unclaim a device:-

this method accept two params 1. device id (which you want to remove) 2. access token br/, (*13)

Method Signature:-
$obj->unClaimDevice($device_ID, $access_token)

Rename a device :-

this method accept three params 1. device_ID, 2. access_token, 3. desired_name br/, (*14)

Method Signature :-
$obj->renameDevice($device_ID, $access_token, $desired_name);

Burn Particle with your code snippet :-

this method accept 4 params :-, (*15)

  • 1. directory= nullable (pass the param like '' -> blank if you dont wana put a directory it will create its own) or put your own directory.
  • 2.device_ID
  • 3.access_token
  • 4. code_snippet -> create a variable with your code snippet like ```php $code = "int led=D7;void setup(){pinMode(led,OUTPUT); digitalWrite(led, HIGH);}"; ``` and pass it.
Method Signature :-
$obj->postCodeSnippet($directory, $device_ID, $access_token, $code_snippet);

or, (*16)

$obj->postCodeSnippet('', $device_ID, $access_token, $code_snippet);

The Versions

06/10 2016

dev-master

9999999-dev https://github.com/subhankartier5

A Laravel Package for particle.io

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel package for particle particle.io laravel package particle.io php sdk particle php sdk particle package particleio package for laravel particle laravel particle php