Documentation
¶
Index ¶
- type Map
- type MapsResult
- type Params
- type Response
- type Robot
- func (r *Robot) DisableSchedule(a *Params) (*Response, error)
- func (r *Robot) EnableSchedule(a *Params) (*Response, error)
- func (r *Robot) FindMe(a *Params) (*Response, error)
- func (r *Robot) GetGeneralInfo(a *Params) (*Response, error)
- func (r *Robot) GetLocalStats(a *Params) (*Response, error)
- func (r *Robot) GetMapBoundaries(a *Params) (*Response, error)
- func (r *Robot) GetPreferences(a *Params) (*Response, error)
- func (r *Robot) GetRobotInfo(a *Params) (*Response, error)
- func (r *Robot) GetRobotManualCleaningInfo(a *Params) (*Response, error)
- func (r *Robot) GetSchedule(a *Params) (*Response, error)
- func (r *Robot) PauseCleaning(a *Params) (*Response, error)
- func (r *Robot) ResumeCleaning(a *Params) (*Response, error)
- func (r *Robot) SendToBase(a *Params) (*Response, error)
- func (r *Robot) SetMapBoundaries(a *Params) (*Response, error)
- func (r *Robot) SetPreferences(a *Params) (*Response, error)
- func (r *Robot) SetSchedule(a *Params) (*Response, error)
- func (r *Robot) StartCleaning(a *Params) (*Response, error)
- func (r *Robot) StartPersistentMapExploration(a *Params) (*Response, error)
- func (r *Robot) StopCleaning(a *Params) (*Response, error)
- type Session
- func (s *Session) GetRobotMap(robot, id string) (*Map, error)
- func (s *Session) GetUser() (*User, error)
- func (s *Session) ListRobotMaps(robot string) (*MapsResult, error)
- func (s *Session) ListRobotPersistentMaps(robot string) ([]Map, error)
- func (s *Session) ListRobots() ([]Robot, error)
- func (s *Session) Refresh() error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map struct { Version int `json:"version"` ID string `json:"id"` URL string `json:"url"` URLValidForSeconds int `json:"url_valid_for_seconds"` RunID string `json:"run_id"` Status string `json:"status"` LaunchedFrom string `json:"launched_from"` Error string `json:"error"` Category int `json:"category"` Mode int `json:"mode"` Modifier int `json:"modifier"` StartAt time.Time `json:"start_at"` EndAt time.Time `json:"end_at"` EndOrientationRelativeDegrees int `json:"end_orientation_relative_degrees"` RunChargeAtStart int `json:"run_charge_at_start"` RunChargeAtEnd int `json:"run_charge_at_end"` SuspendedCleaningChargingCount int `json:"suspended_cleaning_charging_count"` TimeInSuspendedCleaning int `json:"time_in_suspended_cleaning"` TimeInError int `json:"time_in_error"` TimeInPause int `json:"time_in_pause"` CleanedArea float64 `json:"cleaned_area"` BaseCount int `json:"base_count"` IsDocked bool `json:"is_docked"` Delocalized bool `json:"delocalized"` }
Map is a single map, as stored on a Robot
type MapsResult ¶
type MapsResult struct { Stats struct{} `json:"stats"` Maps []Map `json:"maps"` }
MapsResult contains details about the maps available on a Robot
type Params ¶
type Params struct { Category int `json:"category"` Mode int `json:"mode"` Modifier int `json:"modifier"` RobotSounds bool `json:"robotSounds"` DirtbinAlert bool `json:"dirtbinAlert"` AllAlerts bool `json:"allAlerts"` Leds bool `json:"leds"` ButtonClicks bool `json:"buttonClicks"` DirtbinAlertReminderInterval int `json:"dirtbinAlertReminderInterval"` FilterChangeReminderInterval int `json:"filterChangeReminderInterval"` BrushChangeReminderInterval int `json:"brushChangeReminderInterval"` Clock24H bool `json:"clock24h"` Locale string `json:"locale"` AvailableLocales []string `json:"availableLocales"` BoundaryID string `json:"boundaryId"` SpotWidth int `json:"spotWidth"` SpotHeight int `json:"spotHeight"` Events []event `json:"events"` }
Params are values supplied to modify Nucleo requests. In some cases there are particular mandatory values. This varies between robots and software versions.
type Response ¶
type Response struct { Version int `json:"version"` ReqID reqID `json:"reqId"` Result string `json:"result"` Data data `json:"data"` State int `json:"state,omitempty"` Action int `json:"action,omitempty"` Error interface{} `json:"error,omitempty"` Alert string `json:"alert,omitempty"` Cleaning cleaning `json:"cleaning,omitempty"` Details details `json:"details,omitempty"` AvailableCommands availableCommands `json:"availableCommands,omitempty"` AvailableServices availableServices `json:"availableServices,omitempty"` Meta meta `json:"meta,omitempty"` }
Response combines the Standard Response and the State Response values
type Robot ¶
type Robot struct { Serial string `json:"serial"` Prefix string `json:"prefix"` Name string `json:"name"` Model string `json:"model"` SecretKey string `json:"secret_key"` PurchasedAt time.Time `json:"purchased_at"` LinkedAt time.Time `json:"linked_at"` Traits []string `json:"traits"` }
A Robot corresponds to the data and controls for a physical robot
func (*Robot) DisableSchedule ¶
DisableSchedule disables the schedule on the Robot in question
func (*Robot) EnableSchedule ¶
EnableSchedule enables the schedule on the Robot in question
func (*Robot) GetGeneralInfo ¶
GetGeneralInfo returns a variety of information about the Robot
func (*Robot) GetLocalStats ¶
GetLocalStats returns local statistics about the Robot in question
func (*Robot) GetMapBoundaries ¶
GetMapBoundaries returns the boundary parameters for the given Robot and Map
func (*Robot) GetPreferences ¶
GetPreferences retrieves preferences for a Robot
func (*Robot) GetRobotInfo ¶
GetRobotInfo returns information about that Robot
func (*Robot) GetRobotManualCleaningInfo ¶
GetRobotManualCleaningInfo returns manual cleaning info for the given robot
func (*Robot) GetSchedule ¶
GetSchedule returns details of the schedule for the Robot
func (*Robot) PauseCleaning ¶
PauseCleaning causes the Robot to stop cleaning
func (*Robot) ResumeCleaning ¶
ResumeCleaning causes the Robot to resume a cleaning run
func (*Robot) SendToBase ¶
SendToBase sends the Robot back to the charging base
func (*Robot) SetMapBoundaries ¶
SetMapBoundaries sets boundary parameters for the given robot and Map
func (*Robot) SetPreferences ¶
SetPreferences sets preferences for a Robot
func (*Robot) SetSchedule ¶
SetSchedule sets the schedule on the Robot in question
func (*Robot) StartCleaning ¶
StartCleaning makes the Robot begin a cleaning run with the supplied parameters
func (*Robot) StartPersistentMapExploration ¶
StartPersistentMapExploration sends the Robot on a new map exploration
type Session ¶
type Session struct { AccessToken string `json:"access_token"` CurrentTime time.Time `json:"current_time"` // contains filtered or unexported fields }
Session contains HTTP session data for use with the Neato Beehive API
func NewSession ¶
NewSession generates a new Session for use with the Neato Beehive API
func (*Session) GetRobotMap ¶
GetRobotMap retrieves a particular Map from a specific Robot
func (*Session) ListRobotMaps ¶
func (s *Session) ListRobotMaps(robot string) (*MapsResult, error)
ListRobotMaps returns the maps for the specified robot
func (*Session) ListRobotPersistentMaps ¶
ListRobotPersistentMaps returns the persistent maps for the specified Robot
func (*Session) ListRobots ¶
ListRobots returns the Robots for the account
type User ¶
type User struct { ID string `json:"id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Company string `json:"company"` Locale string `json:"locale"` PhoneNumber string `json:"phone_number"` Street1 string `json:"street_1"` Street2 string `json:"street_2"` City string `json:"city"` PostCode string `json:"post_code"` Province string `json:"province"` StateRegion string `json:"state_region"` CountryCode string `json:"country_code"` Developer bool `json:"developer"` Email string `json:"email"` Newsletter bool `json:"newsletter"` CreatedAt time.Time `json:"created_at"` VerifiedAt time.Time `json:"verified_at"` }
User is a user on the Neato systems with access to zero or more resources