lib

package
v0.0.0-...-8f98708 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Title string `json:"title"`
	Color string `json:"color"`
	ID    int    `json:"id"`
}

Board struct representing the Board item

func (*Board) Delete

func (b *Board) Delete(c Client, title string) error

Delete Board

func (*Board) Fetch

func (b *Board) Fetch(c Client) []Board

Fetch board

func (*Board) GetID

func (b *Board) GetID(c Client, title string) int

GetID from Board

func (*Board) New

func (b *Board) New(c Client, title, color string) error

New Board

type Card

type Card struct {
	Title           string        `json:"title"`
	Description     string        `json:"description"`
	StackID         int           `json:"stackId"`
	Type            string        `json:"type"`
	LastModified    int           `json:"lastModified"`
	LastEditor      interface{}   `json:"lastEditor"`
	CreatedAt       int           `json:"createdAt"`
	Labels          interface{}   `json:"labels"`
	AssignedUsers   []interface{} `json:"assignedUsers"`
	Attachments     interface{}   `json:"attachments"`
	AttachmentCount int           `json:"attachmentCount"`
	Owner           interface{}   `json:"owner"`
	Order           int           `json:"order"`
	Archived        bool          `json:"archived"`
	Duedate         interface{}   `json:"duedate"`
	DeletedAt       int           `json:"deletedAt"`
	CommentsUnread  int           `json:"commentsUnread"`
	ID              int           `json:"id"`
	Overdue         int           `json:"overdue"`
}

Card struct representing the Stack item

func (*Card) Delete

func (cd *Card) Delete(c Client, board, stack, title string) error

Delete Card

func (*Card) Fetch

func (cd *Card) Fetch(c Client, boardtitle, stacktitle string) []gjson.Result

Fetch list of cards

func (*Card) GetID

func (cd *Card) GetID(c Client, boardtitle, stacktitle, title string) int64

GetID from card

func (*Card) New

func (cd *Card) New(c Client, board, stack, title string, order int) error

New Card

type Client

type Client struct {
	Endpoint string
	Username string
	Password string
}

Client struct for http client

func (*Client) DeleteRequest

func (c *Client) DeleteRequest(url string) (*http.Response, error)

DeleteRequest method to make DELETE request to the NextCloud Deck API

func (*Client) GetRequest

func (c *Client) GetRequest(url string) (*http.Response, error)

GetRequest method to make GET request to the NextCloud Deck API

func (*Client) PostRequest

func (c *Client) PostRequest(url string, i []byte) (*http.Response, error)

PostRequest method to make POST request to the NextCloud Deck API

func (*Client) Request

func (c *Client) Request(verb, url string, code int, payload []byte) (*http.Response, error)

Request function to handle all API request

type Stack

type Stack struct {
	Title        string `json:"title"`
	BoardID      int    `json:"boardId"`
	DeletedAt    int    `json:"deletedAt"`
	LastModified int    `json:"lastModified"`
	Order        int    `json:"order"`
	ID           int    `json:"id"`
}

Stack struct representing the Stack item

func (*Stack) Delete

func (s *Stack) Delete(c Client, board, title string) error

Delete Stack

func (*Stack) Fetch

func (s *Stack) Fetch(c Client, boardtitle string) []Stack

Fetch stack

func (*Stack) GetID

func (s *Stack) GetID(c Client, boardtitle string, title string) int

GetID from stack

func (*Stack) New

func (s *Stack) New(c Client, board, title string, order int) error

New Stack

Jump to

Keyboard shortcuts

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