event-reporter
exposes a simple API over D-BUS which it then stores
in a simple embedded database. It also has a GO library (eventclient) to help with this. Queued events are periodically sent to
the Cacophony Project API server.
Events are also made to work with the sidekick app so events can be collected from remote locations. The API for this is done through the management-interface
event-reporter
exposes an API at "org.cacophony.Events" on the D-BUS
system bus. It a exposes several methods for adding, getting, and deleting events.
Adding a new event
Add(details string, eventType, unixNsec int64) error
details
JSON encoded event details which are compatible with the Cacophony Project events POST API.eventType
Type of eventunixNsec
Unix timestamp in nanoseconds.
dbus-send --system --type=method_call --print-reply \
--dest=org.cacophony.Events /org/cacophony/Events \
org.cacophony.Events.Add \
string:'{"foo":"bar"}' \
string:test \
int64:1527629858095250710
Get list of all event keys
GetKeys() ([]uint64, error)
Get details of one event
Get(key uint64) error
key
Key of event that you want to get.
Delete an event from the event store.
Delete(key uint64) error
key
Key of event that you want to delete.
If using go use the eventclient for interfacing with the API instead of making dbus calls. This has AddEvent
, GetEventKeys
, GetEvent
, and DeleteEvent
Releases are built using TravisCI. To create a release visit the repository on Github and then follow our general instructions for creating a release.
This software is licensed under the GNU General Public License v3.0.