Categorygithub.com/tlkamp/litter-api

# README

Litter API Go Report Badge GoDocBadge

Litter API is an interface to the Litter Robot API.

This is an experimental API. The upstream Litter Robot API is not publicly documented and may cause breaking changes with no notice. Breaking changes will be handled as soon as possible.

Examples

package main

import (
	"fmt"
	lr "github.com/tlkamp/litter-api/v2/pkg/client"
)

func main() {
	api := lr.New("your-email", "your-password")

	ctx := context.Background()

	err := api.Login(ctx)
	if err != nil {
		fmt.Println("Error logging in - ", err)
	}

	if err := api.FetchRobots(ctx); err != nil {
		fmt.Println("Error fetching robots - ", err)
	}

	for _, robot := range api.Robots() {
		fmt.Println(robot.LitterRobotID, "-", robot.Name)
		api.Cycle(ctx, robot.LitterRobotID)
	}
}

Unit Status

The unit status is represented by a non-negative integer.

StringIntDescription
RDY0Ready
CCP1Clean Cycle in Progress
CCC2Clean Cycle Complete
CSF3Cat Sensor Fault
DF14Drawer full - will still cycle
DF25Drawer full - will still cycle
CST6Cat Sensor Timing
CSI7Cat Sensor Interrupt
BR8Bonnet Removed
P9Paused
OFF10Off
SDF11Drawer full - will not cycle
DFS12Drawer full - will not cycle

# Packages

No description provided by the author