Documentation
¶
Index ¶
- Variables
- type Client
- type ContentsService
- type License
- type Licenses
- type LicensesService
- type ListLicensesQueryParams
- type ListMembershipsQueryParams
- type ListMessagesQueryParams
- type ListOrganizationsQueryParams
- type ListPeopleQueryParams
- type ListRoomsQueryParams
- type ListTeamMemberhipsQueryParams
- type ListTeamsQueryParams
- type ListWebhooksQueryParams
- type Membership
- type MembershipCreateRequest
- type MembershipUpdateRequest
- type Memberships
- type MembershipsService
- func (s *MembershipsService) CreateMembership(membershipCreateRequest *MembershipCreateRequest) (*Membership, *resty.Response, error)
- func (s *MembershipsService) DeleteMembership(membershipID string) (*resty.Response, error)
- func (s *MembershipsService) GetMembership(membershipID string) (*Membership, *resty.Response, error)
- func (s *MembershipsService) ListMemberships(queryParams *ListMembershipsQueryParams) (*Memberships, *resty.Response, error)
- func (s *MembershipsService) UpdateMembership(membershipID string, membershipUpdateRequest *MembershipUpdateRequest) (*Membership, *resty.Response, error)
- type Message
- type MessageCreateRequest
- type Messages
- type MessagesService
- func (s *MessagesService) CreateMessage(messageCreateRequest *MessageCreateRequest) (*Message, *resty.Response, error)
- func (s *MessagesService) DeleteMessage(messageID string) (*resty.Response, error)
- func (s *MessagesService) GetMessage(messageID string) (*Message, *resty.Response, error)
- func (s *MessagesService) ListMessages(queryParams *ListMessagesQueryParams) (*Messages, *resty.Response, error)
- type Organization
- type Organizations
- type OrganizationsService
- type People
- type PeopleService
- func (s *PeopleService) CreatePerson(personRequest *PersonRequest) (*Person, *resty.Response, error)
- func (s *PeopleService) DeletePerson(personID string) (*resty.Response, error)
- func (s *PeopleService) GetMe() (*Person, *resty.Response, error)
- func (s *PeopleService) GetPerson(personID string) (*Person, *resty.Response, error)
- func (s *PeopleService) ListPeople(queryParams *ListPeopleQueryParams) (*People, *resty.Response, error)
- func (s *PeopleService) Update(personID string, personRequest *PersonRequest) (*Person, *resty.Response, error)
- type Person
- type PersonRequest
- type Role
- type Roles
- type RolesListQueryParams
- type RolesService
- type Room
- type RoomCreateRequest
- type RoomUpdateRequest
- type Rooms
- type RoomsService
- func (s *RoomsService) CreateRoom(roomCreateRequest *RoomCreateRequest) (*Room, *resty.Response, error)
- func (s *RoomsService) DeleteRoom(roomID string) (*resty.Response, error)
- func (s *RoomsService) GetRoom(roomID string) (*Room, *resty.Response, error)
- func (s *RoomsService) ListRooms(queryParams *ListRoomsQueryParams) (*Rooms, *resty.Response, error)
- func (s *RoomsService) UpdateRoom(roomID string, roomUpdateRequest *RoomUpdateRequest) (*Room, *resty.Response, error)
- type Team
- type TeamCreateRequest
- type TeamMembership
- type TeamMembershipCreateRequest
- type TeamMembershipUpdateRequest
- type TeamMemberships
- type TeamMembershipsService
- func (s *TeamMembershipsService) CreateTeamMembership(teamMemberhipCreateRequest *TeamMembershipCreateRequest) (*TeamMembership, *resty.Response, error)
- func (s *TeamMembershipsService) DeleteTeamMembership(membershipID string) (*resty.Response, error)
- func (s *TeamMembershipsService) GetTeamMembership(membershipID string) (*TeamMembership, *resty.Response, error)
- func (s *TeamMembershipsService) ListTeamMemberhips(queryParams *ListTeamMemberhipsQueryParams) (*TeamMemberships, *resty.Response, error)
- func (s *TeamMembershipsService) UpdateTeamMembership(membershipID string, teamMembershipUpdateRequest *TeamMembershipUpdateRequest) (*TeamMembership, *resty.Response, error)
- type TeamUpdateRequest
- type Teams
- type TeamsService
- func (s *TeamsService) CreateTeam(teamCreateRequest *TeamCreateRequest) (*Team, *resty.Response, error)
- func (s *TeamsService) DeleteTeam(teamID string) (*resty.Response, error)
- func (s *TeamsService) GetTeam(teamID string) (*Team, *resty.Response, error)
- func (s *TeamsService) ListTeams(queryParams *ListTeamsQueryParams) (*Teams, *resty.Response, error)
- func (s *TeamsService) UpdateTeam(teamID string, teamUpdateRequest *TeamUpdateRequest) (*Team, *resty.Response, error)
- type Webhook
- type WebhookCreateRequest
- type WebhookUpdateRequest
- type Webhooks
- type WebhooksService
- func (s *WebhooksService) CreateWebhook(webhookCreateRequest *WebhookCreateRequest) (*Webhook, *resty.Response, error)
- func (s *WebhooksService) DeleteWebhook(webhookID string) (*resty.Response, error)
- func (s *WebhooksService) GetWebhook(webhookID string) (*Webhook, *resty.Response, error)
- func (s *WebhooksService) ListWebhooks(queryParams *ListWebhooksQueryParams) (*Webhooks, *resty.Response, error)
- func (s *WebhooksService) UpdateWebhook(webhookID string, webhookUpdateRequest *WebhookUpdateRequest) (*Webhook, *resty.Response, error)
Constants ¶
This section is empty.
Variables ¶
var RestyClient *resty.Client
RestyClient is the REST Client
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // API Services Contents *ContentsService Licenses *LicensesService Memberships *MembershipsService Messages *MessagesService Organizations *OrganizationsService People *PeopleService Roles *RolesService Rooms *RoomsService TeamMemberships *TeamMembershipsService Teams *TeamsService Webhooks *WebhooksService // contains filtered or unexported fields }
Client manages communication with the Webex Teams API API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewClient ¶
func NewClient() *Client
NewClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*Client) SetAuthToken ¶ added in v0.3.0
SetAuthToken defines the Authorization token sent in the request
type ContentsService ¶
type ContentsService service
ContentsService is the service to communicate with the Contents API endpoint
func (*ContentsService) GetContent ¶
func (s *ContentsService) GetContent(contentID string) (*resty.Response, error)
GetContent Get File contents.
Get File contents by ID. Returns binary of file.
@param contentID Content ID. @return
type License ¶
type License struct { ID string `json:"id,omitempty"` // License ID. Name string `json:"name,omitempty"` // License Display Name. TotalUnits int `json:"totalUnits,omitempty"` // License quantity total. ConsumedUnits int `json:"consumedUnits,omitempty"` // License quantity consumed. }
License is the License definition
type Licenses ¶
type Licenses struct {
Items []License `json:"items,omitempty"`
}
Licenses is the List of Licenses
func (*Licenses) AddLicense ¶
AddLicense is used to append a license to a slice of licenses
type LicensesService ¶
type LicensesService service
LicensesService is the service to communicate with the Licenses API endpoint
func (*LicensesService) GetLicense ¶
GetLicense Shows details for a license, by ID.
Shows details for a license, by ID.
Specify the license ID in the licenseID parameter in the URI.
@param licenseID License ID. @return License
func (*LicensesService) ListLicenses ¶
func (s *LicensesService) ListLicenses(queryParams *ListLicensesQueryParams) (*Licenses, *resty.Response, error)
ListLicenses List all licenses for a given organization.
List all licenses for a given organization.
If no orgID is specified, the default is the organization of the authenticated user.
@param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Licenses
type ListLicensesQueryParams ¶
type ListLicensesQueryParams struct { Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListLicensesQueryParams are the query params for the ListLicenses API Call
type ListMembershipsQueryParams ¶
type ListMembershipsQueryParams struct { RoomID string `url:"roomId,omitempty"` // Room ID. PersonID string `url:"personId,omitempty"` // Person ID. PersonEmail string `url:"personEmail,omitempty"` // Person email. Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListMembershipsQueryParams are the query params for the ListMemberships API Call
type ListMessagesQueryParams ¶
type ListMessagesQueryParams struct { RoomID string `url:"roomId,omitempty"` // List messages for a room, by ID. MentionedPeople string `url:"mentionedPeople,omitempty"` // List messages where the caller is mentioned by specifying *me* or the caller personId. Before time.Time `url:"before,omitempty"` // List messages sent before a date and time, in ISO8601 format. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ BeforeMessage string `url:"beforeMessage,omitempty"` // List messages sent before a message, by ID. Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListMessagesQueryParams are the query params for the ListMessages API Call
type ListOrganizationsQueryParams ¶
type ListOrganizationsQueryParams struct { Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListOrganizationsQueryParams are the query params for the ListOrganizations API Call
type ListPeopleQueryParams ¶
type ListPeopleQueryParams struct { ID string `url:"id,omitempty"` // List people by ID. Accepts up to 85 person IDs separated by commas. Email string `url:"email,omitempty"` // List people with this email address. For non-admin requests, either this or displayName are required. DisplayName string `url:"displayName,omitempty"` // List people whose name starts with this string. For non-admin requests, either this or email are required. Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. OrgID string `url:"orgId,omitempty"` // List people in this organization. Only admin users of another organization (such as partners) may use this parameter. Paginate bool // Indicates if pagination is needed }
ListPeopleQueryParams are the query params for the ListPeople API Call
type ListRoomsQueryParams ¶
type ListRoomsQueryParams struct { TeamID string `url:"teamId,omitempty"` // Limit the rooms to those associated with a team, by ID. RoomType string `url:"type,omitempty"` // direct returns all 1-to-1 rooms. group returns all group rooms. SortBy string `url:"sortBy,omitempty"` // Sort results by room ID (id), most recent activity (lastactivity), or most recently created (created). Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListRoomsQueryParams are the query params for the ListRooms API Call
type ListTeamMemberhipsQueryParams ¶
type ListTeamMemberhipsQueryParams struct { TeamID string `url:"teamId,omitempty"` // Team ID. Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListTeamMemberhipsQueryParams are the query params for the ListTeamMemberhips API Call
type ListTeamsQueryParams ¶
type ListTeamsQueryParams struct { Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListTeamsQueryParams are the query params for the ListTeams API Call
type ListWebhooksQueryParams ¶
type ListWebhooksQueryParams struct { Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
ListWebhooksQueryParams are the query params for the ListWebhooks API Call
type Membership ¶
type Membership struct { ID string `json:"id,omitempty"` // Membership ID. RoomID string `json:"roomId,omitempty"` // Room ID. PersonID string `json:"personId,omitempty"` // Person ID. PersonEmail string `json:"personEmail,omitempty"` // Person email. PersonDisplayName string `json:"personDisplayName,omitempty"` // Person display name. IsModerator bool `json:"isModerator,omitempty"` // Membership is moderator. IsMonitor bool `json:"isMonitor,omitempty"` // Membership is monitor. Created time.Time `json:"created,omitempty"` // Membership creation date/time. }
Membership is the Membership definition
type MembershipCreateRequest ¶
type MembershipCreateRequest struct { RoomID string `json:"roomId,omitempty"` // Room ID. PersonID string `json:"personId,omitempty"` // Person ID. PersonEmail string `json:"personEmail,omitempty"` // Person email. IsModerator bool `json:"isModerator,omitempty"` // Membership is a moderator. }
MembershipCreateRequest is the Create Membership Request Parameters
type MembershipUpdateRequest ¶
type MembershipUpdateRequest struct {
IsModerator bool `json:"isModerator,omitempty"` // Membership is a moderator.
}
MembershipUpdateRequest is the Update Membership Request object
type Memberships ¶
type Memberships struct {
Items []Membership `json:"items,omitempty"`
}
Memberships is the List of Memberships
func (*Memberships) AddMembership ¶
func (memberships *Memberships) AddMembership(item Membership) []Membership
AddMembership is used to append a membership to a slice of memberships
type MembershipsService ¶
type MembershipsService service
MembershipsService is the service to communicate with the Memberships API endpoint
func (*MembershipsService) CreateMembership ¶
func (s *MembershipsService) CreateMembership(membershipCreateRequest *MembershipCreateRequest) (*Membership, *resty.Response, error)
CreateMembership Add someone to a membership by Person ID or email address; optionally making them a moderator.
Add someone to a membership by Person ID or email address; optionally making them a moderator.
@param membershipCreateRequest @return Membership
func (*MembershipsService) DeleteMembership ¶
func (s *MembershipsService) DeleteMembership(membershipID string) (*resty.Response, error)
DeleteMembership Deletes a membership by ID.
Deletes a membership by ID.
Specify the membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @return
func (*MembershipsService) GetMembership ¶
func (s *MembershipsService) GetMembership(membershipID string) (*Membership, *resty.Response, error)
GetMembership Get details for a membership by ID.
Get details for a membership by ID.
Specify the membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @return Membership
func (*MembershipsService) ListMemberships ¶
func (s *MembershipsService) ListMemberships(queryParams *ListMembershipsQueryParams) (*Memberships, *resty.Response, error)
ListMemberships Lists all membership memberships. By default, lists memberships for Memberships to which the authenticated user belongs.
Lists all membership memberships. By default, lists memberships for Memberships to which the authenticated user belongs.
Use query parameters to filter the response. Use roomID to list memberships for a membership, by ID. Use either personID or personEmail to filter the results. Long result sets will be split into pages.
@param "roomId" (string) Room ID. @param "personId" (string) Person ID. @param "personEmail" (string) Person email. @param "max" (int) Limit the maximum number of items in the response. @param "paginate" (bool) Indicates if pagination is needed @return Memberships
func (*MembershipsService) UpdateMembership ¶
func (s *MembershipsService) UpdateMembership(membershipID string, membershipUpdateRequest *MembershipUpdateRequest) (*Membership, *resty.Response, error)
UpdateMembership Updates properties for a membership by ID.
Updates properties for a membership by ID.
Specify the membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @param membershipUpdateRequest @return Membership
type Message ¶
type Message struct { ID string `json:"id,omitempty"` // Message ID. RoomID string `json:"roomId,omitempty"` // Room ID. RoomType string `json:"roomType,omitempty"` // Room type (group or direct). ToPersonID string `json:"toPersonId,omitempty"` // Person ID (for type=direct). ToPersonEmail string `json:"toPersonEmail,omitempty"` // Person email (for type=direct). Text string `json:"text,omitempty"` // Message in plain text format. Markdown string `json:"markdown,omitempty"` // Message in markdown format. Files []string `json:"files,omitempty"` // File URL array. PersonID string `json:"personId,omitempty"` // Person ID. PersonEmail string `json:"personEmail,omitempty"` // Person Email. Created time.Time `json:"created,omitempty"` // Message creation date/time. MentionedPeople []string `json:"mentionedPeople,omitempty"` // Person ID array. MentionedGroups []string `json:"mentionedGroups,omitempty"` // Groups array. }
Message is the Message definition
type MessageCreateRequest ¶
type MessageCreateRequest struct { RoomID string `json:"roomId,omitempty"` // Room ID. ToPersonID string `json:"toPersonId,omitempty"` // Person ID (for type=direct). ToPersonEmail string `json:"toPersonEmail,omitempty"` // Person email (for type=direct). Text string `json:"text,omitempty"` // Message in plain text format. Markdown string `json:"markdown,omitempty"` // Message in markdown format. Files []string `json:"files,omitempty"` // File URL array. }
MessageCreateRequest is the Create Message Request Parameters
type Messages ¶
type Messages struct {
Items []Message `json:"items,omitempty"`
}
Messages is the List of Messages
func (*Messages) AddMessage ¶
AddMessage is used to append a message to a slice of messages
type MessagesService ¶
type MessagesService service
MessagesService is the service to communicate with the Messages API endpoint
func (*MessagesService) CreateMessage ¶
func (s *MessagesService) CreateMessage(messageCreateRequest *MessageCreateRequest) (*Message, *resty.Response, error)
CreateMessage Post a plain text or rich text message, and optionally, a media content attachment, to a room.
Post a plain text or rich text message, and optionally, a media content attachment, to a room.
The files parameter is an array, which accepts multiple values to allow for future expansion, but currently only one file may be included with the message.
@param messageCreateRequest @return Message
func (*MessagesService) DeleteMessage ¶
func (s *MessagesService) DeleteMessage(messageID string) (*resty.Response, error)
DeleteMessage Delete a Message.
Deletes a message by ID.
@param messageID Message ID. @return
func (*MessagesService) GetMessage ¶
GetMessage Shows details for a message, by message ID.
Shows details for a message, by message ID.
Specify the message ID in the messageID parameter in the URI.
@param messageID Message ID. @return Message
func (*MessagesService) ListMessages ¶
func (s *MessagesService) ListMessages(queryParams *ListMessagesQueryParams) (*Messages, *resty.Response, error)
ListMessages Lists all messages in a room. Each message will include content attachments if present.
Lists all messages in a room. Each message will include content attachments if present.
The list sorts the messages in descending order by creation date. Long result sets will be split into pages.
@param roomID List messages for a room, by ID. @param "mentionedPeople" (string) List messages where the caller is mentioned by specifying *me* or the caller personId. @param "before" (time.Time) List messages sent before a date and time, in ISO8601 format. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ @param "beforeMessage" (string) List messages sent before a message, by ID. @param "max" (int) Limit the maximum number of items in the response. @param "paginate" (bool) Indicates if pagination is needed @return Messages
type Organization ¶
type Organization struct { ID string `json:"id,omitempty"` // Organization ID. DisplayName string `json:"displayName,omitempty"` // Organization Display Name. Created time.Time `json:"created,omitempty"` // Organization creation date/time. }
Organization is the Organization definition
type Organizations ¶
type Organizations struct {
Items []Organization `json:"items,omitempty"`
}
Organizations is the List of Organizations
func (*Organizations) AddOrganization ¶
func (organizations *Organizations) AddOrganization(item Organization) []Organization
AddOrganization is used to append a organization to a slice of organizations
type OrganizationsService ¶
type OrganizationsService service
OrganizationsService is the service to communicate with the Organizations API endpoint
func (*OrganizationsService) GetOrganization ¶
func (s *OrganizationsService) GetOrganization(orgID string) (*Organization, *resty.Response, error)
GetOrganization Shows details for an organization, by ID.
Shows details for an organization, by ID.
Specify the org ID in the orgID parameter in the URI.
@param orgID Organization ID. @return Organization
func (*OrganizationsService) ListOrganizations ¶
func (s *OrganizationsService) ListOrganizations(queryParams *ListOrganizationsQueryParams) (*Organizations, *resty.Response, error)
ListOrganizations List all organizations visible by your account. The results will not be paginated.
List all organizations visible by your account. The results will not be paginated.
@param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Organizations
type People ¶
type People struct {
Items []Person `json:"items,omitempty"`
}
People is the List of Persons
type PeopleService ¶
type PeopleService service
PeopleService is the service to communicate with the People API endpoint
func (*PeopleService) CreatePerson ¶
func (s *PeopleService) CreatePerson(personRequest *PersonRequest) (*Person, *resty.Response, error)
CreatePerson Create a new user account for a given organization.
Create a new user account for a given organization. Only an admin can create a new user account.
Currently, users may have only one email address associated with their account. The emails parameter is an array, which accepts multiple values to allow for future expansion, but currently only one email address will be used for the new user.
@param personRequest @return Person
func (*PeopleService) DeletePerson ¶
func (s *PeopleService) DeletePerson(personID string) (*resty.Response, error)
DeletePerson Remove a person from the system. Only an admin can remove a person.
Remove a person from the system. Only an admin can remove a person.
Specify the person ID in the personID parameter in the URI.
@param personID Person ID. @return
func (*PeopleService) GetMe ¶
func (s *PeopleService) GetMe() (*Person, *resty.Response, error)
GetMe Show the profile for the authenticated user.
Show the profile for the authenticated user. This is the same as GET /people/:id using the Person ID associated with your Auth token.
@return Person
func (*PeopleService) GetPerson ¶
GetPerson Shows details for a person, by ID.
Shows details for a person, by ID. Certain fields, such as status or lastActivity, will only be displayed for people within your organization or an organzation you manage.
Specify the person ID in the personID parameter in the URI.
@param personID Person ID. @return Person
func (*PeopleService) ListPeople ¶
func (s *PeopleService) ListPeople(queryParams *ListPeopleQueryParams) (*People, *resty.Response, error)
ListPeople List people in your organization.
List people in your organization. For most users, either the email or displayName parameter is required.
Admin users can omit these fields and list all users in their organization.
@param "id" (string) List people by ID. Accepts up to 85 person IDs separated by commas. @param "email" (string) List people with this email address. For non-admin requests, either this or displayName are required. @param "displayName" (string) List people whose name starts with this string. For non-admin requests, either this or email are required. @param "max" (int) Limit the maximum number of items in the response. @param "orgId" (string) List people in this organization. Only admin users of another organization (such as partners) may use this parameter. @param paginate (bool) indicates if pagination is needed @return People
func (*PeopleService) Update ¶
func (s *PeopleService) Update(personID string, personRequest *PersonRequest) (*Person, *resty.Response, error)
Update Update details for a person, by ID.
Update details for a person, by ID.
Specify the person ID in the personID parameter in the URI. Only an admin can update a person details. Email addresses for a person cannot be changed via the Cisco Webex Teams API. Include all details for the person. This action expects all user details to be present in the request. A common approach is to first GET the person's details, make changes, then PUT both the changed and unchanged values.
@param personID Person ID. @param personRequest @return Person
type Person ¶
type Person struct { ID string `json:"id,omitempty"` // Person ID. Emails []string `json:"emails,omitempty"` // Person email array. DisplayName string `json:"displayName,omitempty"` // Person display name. NickName string `json:"nickName,omitempty"` // Person nickname. FirstName string `json:"firstName,omitempty"` // Person first name. LastName string `json:"lastName,omitempty"` // Person last name. Avatar string `json:"avatar,omitempty"` // Person avatar URL. OrgID string `json:"orgId,omitempty"` // Person organization ID. Roles []string `json:"roles,omitempty"` // Person roles. Licenses []string `json:"licenses,omitempty"` // Person licenses. Created time.Time `json:"created,omitempty"` // Person creation date/time. TimeZone string `json:"timeZone,omitempty"` // Person time zone. LastActivity time.Time `json:"lastActivity,omitempty"` // Person last active date/time. Status string `json:"status,omitempty"` // Person presence status (active or inactive). PersonType string `json:"type,omitempty"` // Person type (person or bot). }
Person is the Person definition
type PersonRequest ¶
type PersonRequest struct { Emails []string `json:"emails,omitempty"` // Email addresses of the person DisplayName string `json:"displayName,omitempty"` // Full name of the person FirstName string `json:"firstName,omitempty"` // First name of the person LastName string `json:"lastName,omitempty"` // Last name of the person Avatar string `json:"avatar,omitempty"` // URL to the person's avatar in PNG format OrgID string `json:"orgId,omitempty"` // ID of the organization to which this person belongs Roles []string `json:"roles,omitempty"` // Roles of the person Licenses []string `json:"licenses,omitempty"` // Licenses allocated to the person }
PersonRequest is the Create Person Request Parameters
type Role ¶
type Role struct { ID string `json:"id,omitempty"` // Role ID. Name string `json:"name,omitempty"` // Role Display Name. }
Role is the Role definition
type RolesListQueryParams ¶
type RolesListQueryParams struct { Max int `url:"max,omitempty"` // Limit the maximum number of items in the response. Paginate bool // Indicates if pagination is needed }
RolesListQueryParams are the query params for the GetRoles API Call
type RolesService ¶
type RolesService service
RolesService is the service to communicate with the Roles API endpoint
func (*RolesService) GetRole ¶
GetRole Shows details for a role, by ID.
Shows details for a role, by ID.
Specify the role ID in the roleID parameter in the URI.
@param roleID Role ID. @return Role
func (*RolesService) ListRoles ¶
func (s *RolesService) ListRoles(queryParams *RolesListQueryParams) (*Roles, *resty.Response, error)
ListRoles List all roles.
List all roles.
@param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Roles
type Room ¶
type Room struct { ID string `json:"id,omitempty"` // Room ID. Title string `json:"title,omitempty"` // Room title. RoomType string `json:"type,omitempty"` // Room type (group or direct). IsLocked bool `json:"isLocked,omitempty"` // Room is moderated. TeamID string `json:"teamId,omitempty"` // Room Team ID. CreatorID string `json:"creatorId,omitempty"` // Room creator Person ID. LastActivity time.Time `json:"lastActivity,omitempty"` // Room last activity date/time. Created time.Time `json:"created,omitempty"` // Room creation date/time. }
Room is the Room definition
type RoomCreateRequest ¶
type RoomCreateRequest struct { Title string `json:"title,omitempty"` // A user-friendly name for the room. TeamID string `json:"teamId,omitempty"` // The ID for the team with which this room is associated. }
RoomCreateRequest is the Room Create Request Parameters
type RoomUpdateRequest ¶
type RoomUpdateRequest struct {
Title string `json:"title,omitempty"` // Room title.
}
RoomUpdateRequest is the Room Update Request Parameters
type RoomsService ¶
type RoomsService service
RoomsService is the service to communicate with the Rooms API endpoint
func (*RoomsService) CreateRoom ¶
func (s *RoomsService) CreateRoom(roomCreateRequest *RoomCreateRequest) (*Room, *resty.Response, error)
CreateRoom Creates a room. The authenticated user is automatically added as a member of the room.
Creates a room. The authenticated user is automatically added as a member of the room. See the Memberships API to learn how to add more people to the room.
To create a 1-to-1 room, use the Create Messages endpoint to send a message directly to another person by using the toPersonID or toPersonEmail parameters.
@param roomCreateRequest @return Room
func (*RoomsService) DeleteRoom ¶
func (s *RoomsService) DeleteRoom(roomID string) (*resty.Response, error)
DeleteRoom Deletes a room, by ID. Deleted rooms cannot be recovered.
Deletes a room, by ID. Deleted rooms cannot be recovered.
Deleting a room that is part of a team will archive the room instead. Specify the room ID in the roomID parameter in the URI
@param roomID Room ID. @return
func (*RoomsService) GetRoom ¶
GetRoom Shows details for a room, by ID.
Shows details for a room, by ID.
The title of the room for 1-to-1 rooms will be the display name of the other person. Specify the room ID in the roomID parameter in the URI.
@param roomID Room ID. @return Room
func (*RoomsService) ListRooms ¶
func (s *RoomsService) ListRooms(queryParams *ListRoomsQueryParams) (*Rooms, *resty.Response, error)
ListRooms List rooms.
List rooms.
The title of the room for 1-to-1 rooms will be the display name of the other person. By default, lists rooms to which the authenticated user belongs. Long result sets will be split into pages.
@param "teamId" (string) Limit the rooms to those associated with a team, by ID. @param "type_" (string) direct returns all 1-to-1 rooms. group returns all group rooms. @param "sortBy" (string) Sort results by room ID (id), most recent activity (lastactivity), or most recently created (created). @param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Rooms
func (*RoomsService) UpdateRoom ¶
func (s *RoomsService) UpdateRoom(roomID string, roomUpdateRequest *RoomUpdateRequest) (*Room, *resty.Response, error)
UpdateRoom Updates details for a room, by ID.
Updates details for a room, by ID.
Specify the room ID in the roomID parameter in the URI.
@param roomID Room ID. @param roomUpdateRequest @return Room
type Team ¶
type Team struct { ID string `json:"id,omitempty"` // Team ID. Name string `json:"name,omitempty"` // Team Name. CreatorID string `json:"creatorId,omitempty"` // Team creator ID. Created time.Time `json:"created,omitempty"` // Team creation date/time. }
Team is the Team definition
type TeamCreateRequest ¶
type TeamCreateRequest struct {
Name string `json:"name,omitempty"` // Team name.
}
TeamCreateRequest is the Team Create Request Parameters
type TeamMembership ¶
type TeamMembership struct { ID string `json:"id,omitempty"` // Team Membership ID. TeamID string `json:"teamId,omitempty"` // Team ID. PersonID string `json:"personId,omitempty"` // Person ID. PersonEmail string `json:"personEmail,omitempty"` // Person email. PersonDisplayName string `json:"personDisplayName,omitempty"` // Person display name. IsModerator bool `json:"isModerator,omitempty"` // Team Membership is moderator. Created time.Time `json:"created,omitempty"` // Team Membership creation date/time. }
TeamMembership is the Team Membership definition
type TeamMembershipCreateRequest ¶
type TeamMembershipCreateRequest struct { TeamID string `json:"teamId,omitempty"` // Team ID. PersonID string `json:"personId,omitempty"` // Person ID. PersonEmail string `json:"personEmail,omitempty"` // Person Email. IsModerator bool `json:"isModerator,omitempty"` // Team Membership is a moderator. }
TeamMembershipCreateRequest is the Team Membership Create Request Parameters
type TeamMembershipUpdateRequest ¶
type TeamMembershipUpdateRequest struct {
IsModerator bool `json:"isModerator,omitempty"` // Team Membership is a moderator.
}
TeamMembershipUpdateRequest is the Team Membership Update Request object
type TeamMemberships ¶
type TeamMemberships struct {
Items []TeamMembership `json:"items,omitempty"`
}
TeamMemberships is the List of Team Memberships
func (*TeamMemberships) AddTeamMembership ¶
func (teamMembership *TeamMemberships) AddTeamMembership(item TeamMembership) []TeamMembership
AddTeamMembership is used to append a teamMembership to a slice of teamMemberships
type TeamMembershipsService ¶
type TeamMembershipsService service
TeamMembershipsService is the service to communicate with the TeamMemberships API endpoint
func (*TeamMembershipsService) CreateTeamMembership ¶
func (s *TeamMembershipsService) CreateTeamMembership(teamMemberhipCreateRequest *TeamMembershipCreateRequest) (*TeamMembership, *resty.Response, error)
CreateTeamMembership Add someone to a team by Person ID or email address; optionally making them a moderator.
Add someone to a team by Person ID or email address; optionally making them a moderator.
@param teamMemberhipCreateRequest @return TeamMembership
func (*TeamMembershipsService) DeleteTeamMembership ¶
func (s *TeamMembershipsService) DeleteTeamMembership(membershipID string) (*resty.Response, error)
DeleteTeamMembership Deletes a team membership, by ID.
Deletes a team membership, by ID.
Specify the team membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @return
func (*TeamMembershipsService) GetTeamMembership ¶
func (s *TeamMembershipsService) GetTeamMembership(membershipID string) (*TeamMembership, *resty.Response, error)
GetTeamMembership Shows details for a team membership, by ID.
Shows details for a team membership, by ID.
Specify the team membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @return TeamMembership
func (*TeamMembershipsService) ListTeamMemberhips ¶
func (s *TeamMembershipsService) ListTeamMemberhips(queryParams *ListTeamMemberhipsQueryParams) (*TeamMemberships, *resty.Response, error)
ListTeamMemberhips Lists all team memberships for a given team, specified by the teamID query parameter.
Lists all team memberships for a given team, specified by the teamID query parameter.
Use query parameters to filter the response.
@param teamID Team ID. @param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return TeamMemberships
func (*TeamMembershipsService) UpdateTeamMembership ¶
func (s *TeamMembershipsService) UpdateTeamMembership(membershipID string, teamMembershipUpdateRequest *TeamMembershipUpdateRequest) (*TeamMembership, *resty.Response, error)
UpdateTeamMembership Updates a team membership, by ID.
Updates a team membership, by ID.
Specify the team membership ID in the membershipID URI parameter.
@param membershipID Membership ID. @param teamMembershipUpdateRequest @return TeamMembership
type TeamUpdateRequest ¶
type TeamUpdateRequest struct {
Name string `json:"name,omitempty"` // Team name.
}
TeamUpdateRequest is the Team Update Request Object
type TeamsService ¶
type TeamsService service
TeamsService is the service to communicate with the Teams API endpoint
func (*TeamsService) CreateTeam ¶
func (s *TeamsService) CreateTeam(teamCreateRequest *TeamCreateRequest) (*Team, *resty.Response, error)
CreateTeam Creates a team.
Creates a team. The authenticated user is automatically added as a member of the team.
See the Team Memberships API to learn how to add more people to the team.
@param teamCreateRequest @return Team
func (*TeamsService) DeleteTeam ¶
func (s *TeamsService) DeleteTeam(teamID string) (*resty.Response, error)
DeleteTeam Deletes a team, by ID.
Deletes a team, by ID.
Specify the team ID in the teamID parameter in the URI.
@param teamID Team ID. @return
func (*TeamsService) GetTeam ¶
GetTeam Shows details for a team, by ID.
Shows details for a team, by ID.
Specify the team ID in the teamID parameter in the URI.
@param teamID Team ID. @return Team
func (*TeamsService) ListTeams ¶
func (s *TeamsService) ListTeams(queryParams *ListTeamsQueryParams) (*Teams, *resty.Response, error)
ListTeams Lists teams to which the authenticated user belongs.
Lists teams to which the authenticated user belongs.
@param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Teams
func (*TeamsService) UpdateTeam ¶
func (s *TeamsService) UpdateTeam(teamID string, teamUpdateRequest *TeamUpdateRequest) (*Team, *resty.Response, error)
UpdateTeam Updates details for a team, by ID.
Updates details for a team, by ID.
Specify the team ID in the teamID parameter in the URI.
@param teamID Team ID. @param teamUpdateRequest @return Team
type Webhook ¶
type Webhook struct { ID string `json:"id,omitempty"` // Webhook ID. Name string `json:"name,omitempty"` // Webhook name. TargetURL string `json:"targetUrl,omitempty"` // Webhook target URL. Resource string `json:"resource,omitempty"` // Webhook resource. Event string `json:"event,omitempty"` // Webhook event. OrgID string `json:"orgId,omitempty"` // Webhook organization ID. CreatedBy string `json:"createdBy,omitempty"` // Webhook created by Person ID. AppID string `json:"appId,omitempty"` // Webhook application ID. OwnedBy string `json:"ownedBy,omitempty"` // Webhook owner Person ID. Filter string `json:"filter,omitempty"` // Webhook filter. Status string `json:"status,omitempty"` // Webhook status. Secret string `json:"secret,omitempty"` // Webhook secret. Created time.Time `json:"created,omitempty"` // Webhook creation date/time. }
Webhook is the Webhook definition
type WebhookCreateRequest ¶
type WebhookCreateRequest struct { Name string `json:"name,omitempty"` // Webhook name. TargetURL string `json:"targetUrl,omitempty"` // Webhook target URL. Resource string `json:"resource,omitempty"` // Webhook resource. Event string `json:"event,omitempty"` // Webhook event. Filter string `json:"filter,omitempty"` // Webhook filter. Secret string `json:"secret,omitempty"` // Webhook secret. }
WebhookCreateRequest is the Webhook Create Request Parameters
type WebhookUpdateRequest ¶
type WebhookUpdateRequest struct { Name string `json:"name,omitempty"` // Webhook name. TargetURL string `json:"targetUrl,omitempty"` // Webhook target URL. Secret string `json:"secret,omitempty"` // Webhook secret. Status string `json:"status,omitempty"` // Webhook status. }
WebhookUpdateRequest is the Update Webhook Request Parameters
type Webhooks ¶
type Webhooks struct {
Items []Webhook `json:"items,omitempty"`
}
Webhooks is the List of Webhooks
func (*Webhooks) AddWebhook ¶
AddWebhook is used to append a webhook to a slice of webhooks
type WebhooksService ¶
type WebhooksService service
WebhooksService is the service to communicate with the Webhooks API endpoint
func (*WebhooksService) CreateWebhook ¶
func (s *WebhooksService) CreateWebhook(webhookCreateRequest *WebhookCreateRequest) (*Webhook, *resty.Response, error)
CreateWebhook Creates a webhook.
Creates a webhook.
@param webhookCreateRequest @return Webhook
func (*WebhooksService) DeleteWebhook ¶
func (s *WebhooksService) DeleteWebhook(webhookID string) (*resty.Response, error)
DeleteWebhook Deletes a webhook, by ID.
Deletes a webhook, by ID.
Specify the webhook ID in the webhookID parameter in the URI.
@param webhookID Webhook ID. @return
func (*WebhooksService) GetWebhook ¶
GetWebhook Shows details for a webhook, by ID.
Shows details for a webhook, by ID.
Specify the webhook ID in the webhookID parameter in the URI.
@param webhookID Webhook ID. @return Webhook
func (*WebhooksService) ListWebhooks ¶
func (s *WebhooksService) ListWebhooks(queryParams *ListWebhooksQueryParams) (*Webhooks, *resty.Response, error)
ListWebhooks Lists all of your webhooks.
Lists all of your webhooks.
@param "max" (int) Limit the maximum number of items in the response. @param paginate (bool) indicates if pagination is needed @return Webhooks
func (*WebhooksService) UpdateWebhook ¶
func (s *WebhooksService) UpdateWebhook(webhookID string, webhookUpdateRequest *WebhookUpdateRequest) (*Webhook, *resty.Response, error)
UpdateWebhook Updates a webhook, by ID.
Updates a webhook, by ID.
Specify the webhook ID in the webhookID parameter in the URI.
@param webhookID Webhook ID. @param webhookUpdateRequest @return Webhook