Documentation ¶
Index ¶
- Constants
- func EncodeQueryParams(queryParams []Parameter) string
- type Access
- type AccessToken
- type AccessTokenService
- type BasicEntityInfo
- type Board
- type BoardInvitationResponse
- type BoardLinks
- type BoardMember
- type BoardMemberSearchParams
- type BoardMembersService
- func (b *BoardMembersService) Delete(boardID, boardMemberID string) error
- func (b *BoardMembersService) Get(boardID, boardMemberID string) (*BoardMember, error)
- func (b *BoardMembersService) GetAll(boardID string, queryParams ...BoardMemberSearchParams) (*ListBoardMembersResponse, error)
- func (b *BoardMembersService) ShareBoard(payload ShareBoardInvitation, boardID string) (*BoardInvitationResponse, error)
- func (b *BoardMembersService) Update(boardID, boardMemberID string, role Role) (*BoardMember, error)
- type BoardSearchParams
- type BoardsService
- func (b *BoardsService) Copy(body CreateBoard, copyFrom string) (*Board, error)
- func (b *BoardsService) Create(body CreateBoard) (*Board, error)
- func (b *BoardsService) Delete(id string) error
- func (b *BoardsService) Get(id string) (*Board, error)
- func (b *BoardsService) GetAll(queryParams ...BoardSearchParams) (*ListBoards, error)
- func (b *BoardsService) Update(body CreateBoard, id string) (*Board, error)
- type Client
- func (c *Client) Delete(url string) error
- func (c *Client) Get(url string, response interface{}, queryParams ...Parameter) error
- func (c *Client) Patch(url string, body, response interface{}) error
- func (c *Client) Post(url string, body, response interface{}) error
- func (c *Client) PostNoContent(url string, queryParams ...Parameter) error
- func (c *Client) Put(url string, body, response interface{}, queryParams ...Parameter) error
- type CollabAccess
- type CopyAccess
- type CreateBoard
- type CurrentUserMembership
- type InviteAccess
- type ListBoardMembersResponse
- type ListBoards
- type PaginationLinks
- type Parameter
- type PermissionsPolicy
- type Picture
- type Policy
- type Project
- type ResponseError
- type Role
- type RoleUpdate
- type ShareBoardInvitation
- type SharingAccess
- type SharingPolicy
- type Sort
- type Team
- type User
Constants ¶
const ( // EndpointOAUTHToken /oauth-token endpoint EndpointOAUTHToken = "oauth-token" // EndpointOAUTH /oauth endpoint EndpointOAUTH = "oauth" )
const ( // EndpointBoards /boards endpoint EndpointBoards = "boards" // QueryParamCopyFrom Unique identifier (ID) of the board that you want to copy (required). QueryParamCopyFrom = "copy_from" )
const ( AccessPrivate Access = "private" AccessView Access = "view" AccessEdit Access = "edit" AccessComment Access = "comment" InviteAccessNoAccess InviteAccess = "no_access" InviteAccessViewer InviteAccess = "viewer" InviteAccessCommenter InviteAccess = "commenter" InviteAccessEditor InviteAccess = "editor" )
const ( CollabAccessAllEditors CollabAccess = "all_editors" CollabAccessBoardOwnersAndCoOwners CollabAccess = "board_owners_and_coowners" CopyAccessAnyone CopyAccess = "anyone" CopyAccessTeamMembers CopyAccess = "team_members" CopyAccessTeamEditors CopyAccess = "team_editors" CopyAccessBoardOwner CopyAccess = "board_owner" SharingAccessTeamMemberWithEditingRights SharingAccess = "team_members_with_editing_rights" SharingAccessOwnersAndCoOwners SharingAccess = "owner_and_coowners" )
Variables ¶
This section is empty.
Functions ¶
func EncodeQueryParams ¶
Types ¶
type AccessToken ¶ added in v1.0.4
type AccessToken struct { Type string `json:"type"` Team BasicEntityInfo `json:"team"` CreatedBy BasicEntityInfo `json:"createdBy"` Scopes []string `json:"scopes"` Organization BasicEntityInfo `json:"organization"` User BasicEntityInfo `json:"user"` }
type AccessTokenService ¶ added in v1.0.4
type AccessTokenService struct { BaseVersion string // contains filtered or unexported fields }
func (*AccessTokenService) Get ¶ added in v1.0.4
func (a *AccessTokenService) Get() (*AccessToken, error)
Get information about an access token, such as the token type, scopes, team, user, token creation date and time, and the user who created the token.
func (*AccessTokenService) Revoke ¶ added in v1.0.4
func (a *AccessTokenService) Revoke(accessToken string) error
Revoke Revoking an access token means that the access token will no longer work. When an access token is revoked, the refresh token is also revoked and no longer valid. This does not uninstall the application for the user.
type BasicEntityInfo ¶ added in v1.0.4
type BasicEntityInfo struct { ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` }
BasicEntityInfo info type for different entities (i.e. users, teams & organizations)
type Board ¶
type Board struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Team BasicEntityInfo `json:"team"` Picture Picture `json:"picture,omitempty"` Policy Policy `json:"policy"` ViewLink string `json:"viewLink"` Owner BasicEntityInfo `json:"owner"` CurrentUserMembership CurrentUserMembership `json:"currentUserMembership"` CreatedAt time.Time `json:"createdAt"` CreatedBy BasicEntityInfo `json:"createdBy"` ModifiedAt time.Time `json:"modifiedAt"` ModifiedBy BasicEntityInfo `json:"modifiedBy"` Links BoardLinks `json:"links"` Type string `json:"type"` Project Project `json:"project,omitempty"` }
type BoardInvitationResponse ¶ added in v1.0.4
type BoardLinks ¶
type BoardMember ¶ added in v1.0.4
type BoardMember struct { BasicEntityInfo Role Role `json:"role"` Links PaginationLinks `json:"links,omitempty"` }
type BoardMemberSearchParams ¶ added in v1.0.4
type BoardMemberSearchParams struct {
// contains filtered or unexported fields
}
type BoardMembersService ¶
type BoardMembersService struct { BaseVersion string // contains filtered or unexported fields }
func (*BoardMembersService) Delete ¶ added in v1.0.4
func (b *BoardMembersService) Delete(boardID, boardMemberID string) error
Delete Removes a board member from a board. Required scope: boards:write | Rate limiting: Level 2
func (*BoardMembersService) Get ¶ added in v1.0.4
func (b *BoardMembersService) Get(boardID, boardMemberID string) (*BoardMember, error)
Get Retrieves information for a board member. Required scope: boards:read | Rate limiting: Level 1
func (*BoardMembersService) GetAll ¶ added in v1.0.4
func (b *BoardMembersService) GetAll(boardID string, queryParams ...BoardMemberSearchParams) (*ListBoardMembersResponse, error)
GetAll Retrieves a pageable list of members for a board. Required scope: boards:read | Rate limiting: Level 1 Search query params: BoardMemberSearchParams{}
func (*BoardMembersService) ShareBoard ¶ added in v1.0.4
func (b *BoardMembersService) ShareBoard(payload ShareBoardInvitation, boardID string) (*BoardInvitationResponse, error)
ShareBoard Shares the board and Invites new members to collaborate on a board by sending an invitation email. Depending on the board's Sharing policy, there might be various scenarios where membership in the team is required in order to share the board with a user. Required scope: boards:write | Rate limiting: Level 3
func (*BoardMembersService) Update ¶ added in v1.0.4
func (b *BoardMembersService) Update(boardID, boardMemberID string, role Role) (*BoardMember, error)
Update Updates the role of a board member. Required scope: boards:write | Rate limiting: Level 2
type BoardSearchParams ¶ added in v1.0.2
type BoardSearchParams struct { // TeamID The team_id for which you want to retrieve the list of boards. If this parameter is sent in the request, // the query and owner parameters are ignored. TeamID string `query:"team_id,omitempty"` // Query Retrieves a list of boards that contain the query string provided in the board content or board name. // For example, if you want to retrieve a list of boards that contain the word beta within the board itself (board content), // add beta as the query parameter value. You can use the query parameter with the owner parameter to narrow down the board search results. Query string `query:"query,omitempty"` // Owner Retrieves a list of boards that belong to a specific owner ID. You must pass the owner ID (for example, //3074457353169356300), not the owner name. You can use the 'owner' parameter with the query parameter to narrow //down the board search results. Note that if you pass the team_id in the same request, the owner parameter is ignored. Owner string `query:"owner,omitempty"` // Limit The maximum number of boards to retrieve. // Default: 20 Limit string `query:"limit,omitempty"` // The (zero-based) offset of the first item in the collection to return. // Default: 0. Offset string `query:"offset,omitempty"` // Sort The order in which you want to view the result set. // Options last_created and alphabetically are applicable only when you search for boards by team. Sort Sort `query:"sort,omitempty"` }
type BoardsService ¶
type BoardsService struct { BaseVersion string // contains filtered or unexported fields }
func (*BoardsService) Copy ¶
func (b *BoardsService) Copy(body CreateBoard, copyFrom string) (*Board, error)
Copy Creates a copy of an existing board. You can also update the name, description, sharing policy, and permissions policy for the new board in the request body. Required scope: boards:write | Rate limiting: Level 4
func (*BoardsService) Create ¶
func (b *BoardsService) Create(body CreateBoard) (*Board, error)
Create a board with the specified name and sharing policies. Required scope: boards:write | Rate limiting: Level 3
func (*BoardsService) Delete ¶ added in v1.0.3
func (b *BoardsService) Delete(id string) error
Delete Deletes a board. Required scope: boards:write | Rate limiting: Level 3
func (*BoardsService) Get ¶
func (b *BoardsService) Get(id string) (*Board, error)
Get Retrieves information about a board. Required scope: boards:read | Rate limiting: Level 1
func (*BoardsService) GetAll ¶
func (b *BoardsService) GetAll(queryParams ...BoardSearchParams) (*ListBoards, error)
GetAll Retrieves a list of boards that match the search criteria provided in the request. Required scope: boards:read | Rate limiting: Level 1 Search query params: BoardSearchParams{}
func (*BoardsService) Update ¶ added in v1.0.2
func (b *BoardsService) Update(body CreateBoard, id string) (*Board, error)
Update Updates a specific board. Required scope: boards:write | Rate limiting: Level 2
type Client ¶
type Client struct { BaseURL string AccessToken *AccessTokenService Boards *BoardsService BoardMembers *BoardMembersService // contains filtered or unexported fields }
func (*Client) PostNoContent ¶ added in v1.0.4
PostNoContent Native POST function (pretending to be a DELETE method... but with query params?!)
type CollabAccess ¶ added in v1.0.4
type CollabAccess string
type CopyAccess ¶ added in v1.0.4
type CopyAccess string
type CreateBoard ¶
type CreateBoard struct { // Description of the board. Description string `json:"description"` // Name for the board. Name string `json:"name"` // Policy Defines the permissions policies and sharing policies for the board. Policy Policy `json:"policy"` // TeamID Unique identifier (ID) of the team where the board must be placed. TeamID string `json:"teamId"` }
type CurrentUserMembership ¶
type CurrentUserMembership struct { BasicEntityInfo Role string `json:"role"` }
type InviteAccess ¶ added in v1.0.4
type InviteAccess string
type ListBoardMembersResponse ¶ added in v1.0.4
type ListBoardMembersResponse struct { Data []*BoardMember `json:"data"` Total int `json:"total"` Size int `json:"size"` Offset int `json:"offset"` Limit int `json:"limit"` Links *PaginationLinks `json:"links"` Type string `json:"type"` }
type ListBoards ¶
type PaginationLinks ¶ added in v1.0.4
type Parameter ¶
func ParseQueryTags ¶
func ParseQueryTags(v interface{}) []Parameter
type PermissionsPolicy ¶
type PermissionsPolicy struct { // CollaborationToolsStartAccess Defines who can start or stop timer, voting, video chat, screen sharing, attention management. // Others will only be able to join. To change the value for the collaborationToolsStartAccess parameter, contact Miro Customer Support. // Valid options: all_editors | board_owners_and_coowners CollaborationToolsStartAccess CollabAccess `json:"collaborationToolsStartAccess,omitempty"` // CopyAccess Defines who can copy the board, copy objects, download images, and save the board as a template or PDF. // Valid options: anyone | team_members | team_editors | board_owner CopyAccess CopyAccess `json:"copyAccess,omitempty"` // CopyAccessLevel ... CopyAccessLevel string `json:"copyAccessLevel,omitempty"` // SharingAccess Defines who can change access and invite users to this board. To change the value for the sharingAccess // parameter, contact Miro Customer Support. // Valid options: team_members_with_editing_rights | board_owners_and_coowners SharingAccess SharingAccess `json:"sharingAccess,omitempty"` }
PermissionsPolicy Defines the permissions policies for the board.
type Policy ¶
type Policy struct { // PermissionsPolicy Defines the permissions policies for the board. PermissionsPolicy `json:"permissionsPolicy,omitempty"` // SharingPolicy Defines the public-level, organization-level, and team-level access for the board. The access level // that a user gets depends on the highest level of access that results from considering the public-level, team-level, // organization-level, and direct sharing access. SharingPolicy `json:"sharingPolicy,omitempty"` }
type ResponseError ¶
type RoleUpdate ¶ added in v1.0.4
type RoleUpdate struct {
Role Role `json:"role"`
}
type ShareBoardInvitation ¶ added in v1.0.4
type SharingAccess ¶ added in v1.0.4
type SharingAccess string
type SharingPolicy ¶
type SharingPolicy struct { // Access Defines the public-level access to the board. // Valid options: private | view | edit | comment Access Access `json:"access,omitempty"` // InviteToAccountAndBoardLinkAccess Defines the user role when inviting a user via the invite to team and board link. // For Enterprise users, this parameter is always set to no_access regardless of the value that you assign for this parameter. // Valid options: viewer | commenter | editor | no_access InviteToAccountAndBoardLinkAccess InviteAccess `json:"inviteToAccountAndBoardLinkAccess,omitempty"` // OrganizationAccess Defines the organization-level access to the board. If the board is created for a team that does // not belong to an organization, the organizationAccess parameter is always set to the default value. // Warning: may result in a "One of the requested features is not supported. (4.0408)" error message if you don't have the necessary access level. // Valid options: private | view | edit | comment OrganizationAccess Access `json:"organizationAccess,omitempty"` // TeamAccess Defines the team-level access to the board. // Valid options: private | view | edit | comment TeamAccess Access `json:"teamAccess,omitempty"` }
type Sort ¶ added in v1.0.4
type Sort string
const ( // SortDefault If team_id is present, last_created. Otherwise, last_opened SortDefault Sort = "default" // SortLastModified sort by the date and time when the board was last modified SortLastModified Sort = "last_modified" // SortLastOpened sort by the date and time when the board was last opened SortLastOpened Sort = "last_opened" // SortLastCreated sort by the date and time when the board was created SortLastCreated Sort = "last_created" // SortAlphabetically sort by the board name (alphabetically) SortAlphabetically Sort = "alphabetically" )
type Team ¶
type Team struct { BasicEntityInfo CreatedAt time.Time `json:"createdAt"` ModifiedAt time.Time `json:"modifiedAt"` CreatedBy *BasicEntityInfo `json:"createdBy"` ModifiedBy *BasicEntityInfo `json:"modifiedBy"` Picture *Picture `json:"picture"` }