Farmbot Resource
Adapter gem for Farmbot Web App API. Currently used in Raspberry Pi controller to support scheduling operations.
Available Resources
Need more than what's available? Raise an issue and we can add your resource to the list (PRs are also welcome).
Usage
First, you will need an API token.
token = FbResource::Client.get_token(email: 't@g.com',
password: 'shhh...',
url: "http://localhost:3000")
Once you have an API token, you can create a 'client'.
client = FbResource::Client.new do |config|
config.token = token
end
Client objects can access API resources such as schedules and sequences.
schedules = client.schedules.all
sequences = client.sequences.fetch.all
Encryption
The Farmbot web app issues an RSA public key. If you need to sign stuff, the key is accessible via client.public_key
See example.rb for a runnable sample.