solisgocloud

package module
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 11 Imported by: 0

README

solisgocloud

Golang package for SolisCloud API

Install

go get github.com/riamatmar/solisgocloud

SolisCloud configuration:

This struct is needed for initialisation of the solisgocloud service.

type SolisCloud struct {
	KeyID      string `json:"keyid"`
	KeySercret string `json:"keysercret"`
	URL        string `json:"url"`
}

Initialisation of the solisgocloud service:

solisCloudService := solisgocloud.CreateSolisCloudService(solisCloud)
if solisCloudService == nil {
  log.Fatal().Msg("unabbel to create solis cloud service")
}

Read power station list (/v1/api/userStationList)

solisUserStationList, err := solisCloudService.ReadUserStationListSolisCloud(1, 10)
if err != nil {
  log.Err(err).Msg("unabbel to read solisUserStationList")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SolisCloudService

type SolisCloudService interface {
	ReadUserStationListSolisCloud(pageNo int, pageSize int) (model.SolisUserStationList, error)
}

func CreateSolisCloudService

func CreateSolisCloudService(solisCloud model.SolisCloud) SolisCloudService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL