api

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Request

func Request(r Requester)

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface

type ListRequest

type ListRequest struct {
	ListID   string
	FolderID string
	SpaceID  string
	Archived bool
}

func (ListRequest) BuildPath

func (l ListRequest) BuildPath() string

BuildPath creates the API path for a task request

func (ListRequest) GetJSON

func (t ListRequest) GetJSON(apiPath string) []byte

GetJSON accepts an API path and returns byte payload of JSON data

type Requester

type Requester interface {
	BuildPath() string
	GetJSON(string) []byte
}

Requester interface needs an API path to request JSON data

type TaskRequest

type TaskRequest struct {
	TaskID     string
	CustomTask bool
	TeamID     string
	Subtasks   bool
}

func (TaskRequest) BuildPath

func (t TaskRequest) BuildPath() string

BuildPath creates the API path for a task request

func (TaskRequest) GetJSON

func (t TaskRequest) GetJSON(apiPath string) []byte

GetJSON accepts an API path and returns byte payload of JSON data

Jump to

Keyboard shortcuts

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