Documentation ¶
Overview ¶
Package dynalist implements dynalist.io API for Go
Set an env before using: export DYNALIST_TOKEN=your_secret_token
Index ¶
- type API
- func (api *API) DocEdit(fileID string, changes []*Change) (*Response, error)
- func (api *API) DocRead(fileID string) (*Response, error)
- func (api *API) FileEdit(changes []*Change) (*Response, error)
- func (api *API) FileList() (*Response, error)
- func (api *API) InboxAdd(change *Change) (*Response, error)
- func (api *API) LimitChange() *Limit
- func (api *API) LimitDocEdit() *Limit
- func (api *API) LimitDocRead() *Limit
- func (api *API) LimitFileEdit() *Limit
- func (api *API) LimitFileList() *Limit
- func (api *API) LimitInboxAdd() *Limit
- type Action
- type Change
- type Code
- type File
- type Limit
- type Node
- type Permission
- type Response
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Token string `json:"token"` RateLimit time.Time `json:"-"` BurstLimit int `json:"-"` // contains filtered or unexported fields }
func (*API) LimitChange ¶
func (*API) LimitDocEdit ¶
func (*API) LimitDocRead ¶
func (*API) LimitFileEdit ¶
func (*API) LimitFileList ¶
func (*API) LimitInboxAdd ¶
type Change ¶
type Change struct { Action Action `json:"action"` Index int `json:"index,omitempty"` NodeID string `json:"node_id,omitempty"` ParentID string `json:"parent_id,omitempty"` Content string `json:"content,omitempty"` Type Type `json:"type,omitempty"` FileID string `json:"file_id,omitempty"` Title string `json:"title,omitempty"` Note string `json:"note,omitempty"` Checked bool `json:"checked,omitempty"` }
type Code ¶
type Code string
const ( CodeOK Code = "Ok" //Your request is not valid JSON. CodeInvalid Code = "Invalid" //You've hit the limit on how many requests you can send. CodeTooManyRequests Code = "TooManyRequests" //Your secret token is invalid. CodeInvalidToken Code = "InvalidToken" //Server unable to handle the request. CodeLockFail Code = "LockFail" CodeUnauthorized Code = "Unauthorized" //The document you're requesting is not found. CodeNotFound Code = "NotFound" //The node (item) you're requesting is not found. CodeNodeNotFound Code = "NodeNotFound" //Inbox location is not configured, or invalid. CodeNoInbox Code = "NoInbox" )
type Permission ¶
type Permission int
const ( PermissionNoAccess Permission = iota PermissionReadOnly PermissionEditRights PermissionManage PermissionOwner )
Click to show internal directories.
Click to hide internal directories.