Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vladkostikov/flespi-ruby
Gem for Flespi — Universal Telematics Gateway, Parser & API
https://github.com/vladkostikov/flespi-ruby
flespi iot ruby ruby-on-rails
Last synced: 28 days ago
JSON representation
Gem for Flespi — Universal Telematics Gateway, Parser & API
- Host: GitHub
- URL: https://github.com/vladkostikov/flespi-ruby
- Owner: vladkostikov
- License: mit
- Created: 2023-11-15T12:19:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-15T12:25:46.000Z (12 months ago)
- Last Synced: 2024-09-28T12:04:23.775Z (about 1 month ago)
- Topics: flespi, iot, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://flespi.com
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Flespi
[![Gem Version](https://badge.fury.io/rb/flespi-ruby.svg)](https://badge.fury.io/rb/flespi-ruby)[Official documentation Flespi](https://flespi.io/docs/)
## Installation
Add this line to your application's Gemfile:
`gem "flespi-ruby"`
And then execute:
`bundle install`
## Usage
```ruby
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")
```