0.0
The project is in a healthy, maintained state
flespi.io
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1
 Project Readme

Flespi

Gem Version

Official documentation Flespi

Installation

Add this line to your application's Gemfile:

gem "flespi-ruby"

And then execute:

bundle install

Usage

require "flespi"

# Initialize flespi instance
flespi_client = Flespi.new("FlespiToken", debug: true)

# Get collection of all devices
flespi_client.get("/gw/devices/all")

# Get device by device id
flespi_client.get("/gw/devices/123456")

# Create new device
flespi_client.create("/gw/devices", ["configuration": { "ident": "123456" }, 
                                     "device_type_id": 10, 
                                     "name": "Device name"])

# Delete device by device id
flespi_client.delete("/gw/devices/123456")