kanbanize

package module
v0.0.0-...-1189b23 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2019 License: MIT Imports: 2 Imported by: 0

README

Kanbanize

A Kanbanize API Client

Documentation

Index

Constants

View Source
const (
	CardWorkflow        = 0
	InitiativesWorkflow = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type BoardStructure

type BoardStructure struct {
	Columns []struct {
		Position    string `json:"position"`
		Lcname      string `json:"lcname"`
		Section     string `json:"section"`
		Path        string `json:"path"`
		Description string `json:"description"`
		Lcid        string `json:"lcid"`
		Flowtype    string `json:"flowtype"`
		Tasksperrow int    `json:"tasksperrow,omitempty"`
		Children    []struct {
			Position    string `json:"position"`
			Lcname      string `json:"lcname"`
			Section     string `json:"section"`
			Path        string `json:"path"`
			Description string `json:"description"`
			Lcid        string `json:"lcid"`
			Flowtype    string `json:"flowtype"`
			Tasksperrow int    `json:"tasksperrow"`
		} `json:"children,omitempty"`
	} `json:"columns"`
	Lanes []struct {
		Position    string `json:"position"`
		Lcname      string `json:"lcname"`
		Path        string `json:"path"`
		Description string `json:"description"`
		Lcid        string `json:"lcid"`
		Flowtype    string `json:"flowtype"`
		Color       string `json:"color"`
	} `json:"lanes"`
}

BoardStructure represents the structure of all boards

func (*BoardStructure) GetColumnNameByColumnId

func (bs *BoardStructure) GetColumnNameByColumnId(id int) string

type CellLimit

type CellLimit struct {
	LaneID   int `json:"lane_id"`
	ColumnID int `json:"column_id"`
	Limit    int `json:"limit"`
}

type CellLimits

type CellLimits []CellLimit

type Children

type Children struct {
	CardID   int `json:"card_id"`
	Position int `json:"position"`
}

type Childrens

type Childrens []Children

type Client

type Client struct {
	APIURL   string
	APIV2URL string
	APIKey   string
	// contains filtered or unexported fields
}

Client is the Kanbanize Client

func NewClient

func NewClient(APIRUL, APIKey string) *Client

NewClient returns an new Client for the Kanbanize API

func (*Client) CreateTask

func (c *Client) CreateTask(t *Task) (*Task, error)

CreateTask creates a Task in Kanbanize

func (*Client) DeleteTask

func (c *Client) DeleteTask(boardid, taskid string) error

DeleteTask deletes the Task with taskid on the board boardid

func (*Client) EditTask

func (c *Client) EditTask(BoardID, TaskID string) *editTask

func (*Client) GetAllTasks

func (c *Client) GetAllTasks(boardid string) *getAllTasks

func (*Client) GetBoardStructure

func (c *Client) GetBoardStructure(boardid string) (*BoardStructure, error)

GetBoardStructure returns the structure of all boards

func (*Client) GetBoards

func (c *Client) GetBoards() (*ProjectsAndBoards, error)

GetBoards returns a struct containing all Projects and Boards

func (*Client) GetCellLimits

func (c *Client) GetCellLimits(boardid string) (*CellLimits, error)

GetCellLimits returns the cell limits data of the board

func (*Client) GetChildren

func (c *Client) GetChildren(cardid string) (*Childrens, error)

GetCellLimits returns the cell limits data of the board

func (*Client) GetColumns

func (c *Client) GetColumns(boardid string) (*Columns, error)

GetColumns returns the columns data of the board

func (*Client) GetCurrentStructure

func (c *Client) GetCurrentStructure(boardid string) (*CurrentStructure, error)

GetCurrentStructure returns the cell limits data of the board

func (c *Client) GetLinks(taskid string) (*Links, error)

GetLinks gets all the links of the Task with taskid

func (*Client) GetTask

func (c *Client) GetTask(boardid, taskid string) (*Task, error)

GetTask returns the task with taskid from the board boardid

func (*Client) MoveTask

func (c *Client) MoveTask(TaskID string) *moveTask

type Column

type Column struct {
	ColumnID       int         `json:"column_id"`
	Workflow       int         `json:"workflow"`
	Section        int         `json:"section"`
	ParentColumnID interface{} `json:"parent_column_id"`
	Position       int         `json:"position"`
	Name           string      `json:"name"`
	Description    string      `json:"description"`
	Color          string      `json:"color"`
	Limit          int         `json:"limit"`
	CardsPerRow    int         `json:"cards_per_row"`
	FlowType       int         `json:"flow_type"`
}

type Columns

type Columns []Column

type CurrentStructure

type CurrentStructure struct {
	Version       string `json:"version"`
	ProjectID     int    `json:"project_id"`
	BoardID       int    `json:"board_id"`
	Name          string `json:"name"`
	IsArchived    int    `json:"is_archived"`
	CardsWorkflow struct {
		Exists        int    `json:"exists"`
		IsEnabled     int    `json:"is_enabled"`
		Name          string `json:"name"`
		TopLanes      []int  `json:"top_lanes"`
		BottomLanes   []int  `json:"bottom_lanes"`
		TopColumns    []int  `json:"top_columns"`
		BottomColumns []int  `json:"bottom_columns"`
	} `json:"cards_workflow"`
	InitiativesWorkflow struct {
		Exists        int    `json:"exists"`
		IsEnabled     int    `json:"is_enabled"`
		IsCollapsible int    `json:"is_collapsible"`
		Name          string `json:"name"`
		TopLanes      []int  `json:"top_lanes"`
		BottomLanes   []int  `json:"bottom_lanes"`
		TopColumns    []int  `json:"top_columns"`
		BottomColumns []int  `json:"bottom_columns"`
	} `json:"initiatives_workflow"`
	Lanes map[string]struct {
		Workflow     int    `json:"workflow"`
		ParentLaneID int    `json:"parent_lane_id"`
		Name         string `json:"name"`
		Description  string `json:"description"`
		Color        string `json:"color"`
	}

	Columns map[string]struct {
		Workflow       int    `json:"workflow"`
		Section        int    `json:"section"`
		ParentColumnID int    `json:"parent_column_id"`
		Name           string `json:"name"`
		Description    string `json:"description"`
		Color          string `json:"color"`
		Limit          int    `json:"limit"`
		CardsPerRow    int    `json:"cards_per_row"`
		FlowType       int    `json:"flow_type"`
	} `json:"columns"`
	CellLimits            map[string]map[string]int `json:"cell_limits"`
	SizeType              int                       `json:"size_type"`
	AllowExceeding        int                       `json:"allow_exceeding"`
	AutoarchiveCardsAfter int                       `json:"autoarchive_cards_after"`

	Revision int `json:"revision"`
}
type Link struct {
	Taskid       string      `json:"taskid"`
	Parent       interface{} `json:"parent"`
	Children     []string    `json:"children"`
	Mirrors      []string    `json:"mirrors"`
	Relatives    []string    `json:"relatives"`
	Successors   []string    `json:"successors"`
	Predecessors []string    `json:"predecessors"`
}

Link represents all the relations of a single task

type Links map[string]Link

Links represents all relations of a task

type ProjectsAndBoards

type ProjectsAndBoards struct {
	Projects []struct {
		Name   string  `json:"name"`
		ID     string  `json:"id"`
		Boards []Board `json:"boards"`
	} `json:"projects"`
}

ProjectsAndBoards represents all boards and projects

type Task

type Task struct {
	Taskid                 string        `json:"taskid,omitempty"`
	Boardid                string        `json:"boardid,omitempty"`
	Title                  string        `json:"title,omitempty"`
	Description            string        `json:"description,omitempty"`
	Type                   string        `json:"type,omitempty"`
	Assignee               string        `json:"assignee,omitempty"`
	Subtasks               string        `json:"subtasks,omitempty"`
	Subtaskscomplete       string        `json:"subtaskscomplete,omitempty"`
	Color                  string        `json:"color,omitempty"`
	Priority               string        `json:"priority,omitempty"`
	Size                   string        `json:"size,omitempty"`
	Deadline               string        `json:"deadline,omitempty"`
	Deadlineoriginalformat string        `json:"deadlineoriginalformat,omitempty"`
	Extlink                string        `json:"extlink,omitempty"`
	Tags                   string        `json:"tags,omitempty"`
	Leadtime               int           `json:"leadtime,omitempty"`
	Blocked                string        `json:"blocked,omitempty"`
	Blockedreason          string        `json:"blockedreason,omitempty"`
	Columnname             string        `json:"columnname,omitempty"`
	Column                 string        `json:"column,omitempty"`
	Lanename               string        `json:"lanename,omitempty"`
	Subtaskdetails         []interface{} `json:"subtaskdetails,omitempty"`
	Columnid               string        `json:"columnid,omitempty"`
	Laneid                 string        `json:"laneid,omitempty"`
	Position               string        `json:"position,omitempty"`
	Workflow               int           `json:"workflow,omitempty"`
	Createdat              string        `json:"createdat,omitempty"`
	Attachments            struct {
	} `json:"attachments,omitempty"`
	Columnpath   string        `json:"columnpath,omitempty"`
	Loggedtime   int           `json:"loggedtime,omitempty"`
	Customfields []interface{} `json:"customfields,omitempty"`
	Updatedat    string        `json:"updatedat,omitempty"`
}

Task represents the Kanbanize Task

type Tasks

type Tasks []Task

func (*Tasks) GetColumnNameByColumnId

func (t *Tasks) GetColumnNameByColumnId(id int) string

Jump to

Keyboard shortcuts

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