monday

package module
v0.0.0-...-cae05c1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

README

go-monday

Monday API Library

go-monday is a Rest API for Monday CRM. You can manage your application with this library. It contains almost every API request Monday provides with support of CRUD operations.

Quick Start / Installation

To get started with go-monday, you'll need to do the following:

  • Install the latest version of Go.
  • Install the go-monday package using go get.
  • Use the go-monday package in your Go code.
  • Here's an example of how to install the package:
go get github.com/whatcrm/go-monday

Models

go-monday includes a package for working with models, which allows you to use just the API and create your own models. This means you can create your own structs and use them with our go-monday package, even if you don't want to use every field from Monday's entities.

Here's the link to Models package and example of how to install the package.

go get github.com/whatcrm/go-monday/models

Features

Ecosystem / Documentations

Contributors

go-monday is maintained by WhatCRM Organization. If you'd like to contribute to the project, please reach out to us via Issues.

Documentation

Index

Constants

View Source
const (
	October2023 = "2024-01"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	ClientID     string
	ClientSecret string
	Domain       string
	Auth         string
	Version      string
	Debug        bool
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(clientID, clientSecret string) *API

func (*API) Get

func (api *API) Get() *Get

func (*API) Mutation

func (api *API) Mutation() *Mutate

func (*API) SetLogPath

func (api *API) SetLogPath(path string)

func (*API) SetOptions

func (api *API) SetOptions(domain, auth string, debug bool)

type BoardKind

type BoardKind string

BoardKind example: public/private/share

type BoardParams

type BoardParams struct {
	IDs          []int `json:"ids"`
	NewestFirst  bool  `json:"newest_first"`
	Limit        int   `json:"limit"`
	Page         int   `json:"page"`
	BoardKind    `json:"board_kind"`
	State        `json:"state"`
	OrderBy      BoardsOrderBy `json:"order_by"`
	WorkspaceIDs []int         `json:"workspace_ids"`
}

type BoardsOrderBy

type BoardsOrderBy string

BoardsOrderBy example: created_at / used_at

type ColumnType

type ColumnType string

type Get

type Get struct {
	// contains filtered or unexported fields
}

func (*Get) Account

func (c *Get) Account() (out models.Account, err error)

func (*Get) Assets

func (c *Get) Assets(id []ID) (out []models.Assets, err error)

func (*Get) Board

func (c *Get) Board(id ID) (out models.Board, err error)

func (*Get) Boards

func (c *Get) Boards(page, limit int) (out []models.Board, err error)

func (*Get) BoardsByWorkspace

func (c *Get) BoardsByWorkspace(page, limit int, workspaceID []ID) (out []models.Board, err error)

func (*Get) CustomQuery

func (c *Get) CustomQuery(query interface{}, vars map[string]interface{}) (out interface{}, err error)

CustomQuery query should be pointer &query

func (*Get) Groups

func (c *Get) Groups(id []ID) (out []models.NestedGroup, err error)

func (*Get) Items

func (c *Get) Items(ids []ID, newestFirst, excludeNonActive bool, limit, page int) (out []models.Item, err error)

func (*Get) ItemsPageByColumnValues

func (c *Get) ItemsPageByColumnValues(boardID ID, columns []ItemsPageByColumnValuesQuery) (out []models.Item, err error)

func (*Get) Me

func (c *Get) Me() (out models.User, err error)

func (*Get) Team

func (c *Get) Team(ids []ID) (out []models.Teams, err error)

func (*Get) Teams

func (c *Get) Teams() (out []models.Teams, err error)

func (*Get) Update

func (c *Get) Update(ids []string) (out []models.UpdateReplies, err error)

func (*Get) User

func (c *Get) User(ids []ID) (out []models.User, err error)

func (*Get) Users

func (c *Get) Users() (out []models.User, err error)

func (*Get) Webhooks

func (c *Get) Webhooks(boardID ID) (out []Webhooks, err error)

func (*Get) Workspaces

func (c *Get) Workspaces() (out []models.Workspace, err error)

type ID

type ID string

type ItemsPageByColumnValuesQuery

type ItemsPageByColumnValuesQuery struct {
	ColumnID     string   `json:"column_id"`
	ColumnValues []string `json:"column_values"`
}

type ItemsResponse

type ItemsResponse struct {
	Cursor string        `graphql:"cursor"`
	Items  []models.Item `graphql:"items"`
}

type JSON

type JSON string

JSON example: "{\"lead_phone\":\"+1111 RU\"}"

type Mutate

type Mutate struct {
	// contains filtered or unexported fields
}

func (*Mutate) ChangeColumnValue

func (c *Mutate) ChangeColumnValue(boardID, itemID, columnID string, columnValue JSON) (out models.Nested, err error)

func (*Mutate) ChangeMultipleColumnValue

func (c *Mutate) ChangeMultipleColumnValue(boardID, itemID, columnValues JSON) (out models.Nested, err error)

func (*Mutate) CreateBoard

func (c *Mutate) CreateBoard(name string, kind BoardKind, workspace ID) (out models.Board, err error)

func (*Mutate) CreateColumn

func (c *Mutate) CreateColumn(boardID ID, title string, columnType ColumnType) (out models.Column, err error)

func (*Mutate) CreateItem

func (c *Mutate) CreateItem(boardID ID, name, groupID string, clim bool) (out models.Item, err error)

func (*Mutate) CreateItemWithColumnValues

func (c *Mutate) CreateItemWithColumnValues(boardID ID, name, groupID string, columnValues JSON, clim bool) (out models.Item, err error)

func (*Mutate) CreateNotification

func (c *Mutate) CreateNotification(text string, userID, targetID ID, targetType models.NotificationTargetType) (out models.Notification, err error)

func (*Mutate) CreateOrGetTag

func (c *Mutate) CreateOrGetTag(boardID ID, tagName string) (out models.Tag, err error)

func (*Mutate) CreateUpdate

func (c *Mutate) CreateUpdate(itemID, parentID ID, body string) (out models.Update, err error)

func (*Mutate) CreateWebhook

func (c *Mutate) CreateWebhook(boardID ID, uri string, event WebhookEventType) (wh Webhooks, err error)

func (*Mutate) CustomMutation

func (c *Mutate) CustomMutation(mutation interface{}, vars map[string]interface{}) (out interface{}, err error)

func (*Mutate) DeleteUpdate

func (c *Mutate) DeleteUpdate(updateID ID) (err error)

func (*Mutate) DeleteWebhook

func (c *Mutate) DeleteWebhook(id ID) (err error)

func (*Mutate) LikeUpdate

func (c *Mutate) LikeUpdate(updateID ID) (out models.Update, err error)

type State

type State string

State example: all / active / archived / deleted the default is active.

type Tokens

type Tokens struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	Scope       string `json:"scope"`
}

type WebhookEventType

type WebhookEventType string

type Webhooks

type Webhooks struct {
	BoardID string `graphql:"board_id"`
	Config  string `graphql:"config"`
	Event   string `graphql:"event"`
	ID      string `graphql:"id"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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