Documentation ¶
Index ¶
- Constants
- Variables
- func ApiResponseErrorBody(err error) []byte
- func AtMention(personId string) string
- func BuildFaxApiUrl(serverUrl string) string
- func FaxCoverPageNameToIndex(s string) (int, error)
- func GetFileBytesForEventType(eventType string) ([]byte, error)
- func GetFileNameForEventType(eventType string) string
- func GetFilePathForEventType(eventType string) string
- func GlipCreatePostIsEmpty(post rc.GlipCreatePost) bool
- func IsAtMentioned(userId string, mentions []rc.GlipMentionsInfo) bool
- func IsAtMentionedFuzzy(personName, textRaw string) bool
- func IsAtMentionedGlipdown(personId, textRaw string) bool
- func LoadEnv() error
- func NewApiClientCredentials(creds credentials.Credentials) (*rc.APIClient, error)
- func NewApiClientHttpClientBaseURL(httpClient *http.Client, serverUrl string) (*rc.APIClient, error)
- func NewApiClientPassword(oc credentials.OAuth2Credentials) (*rc.APIClient, error)
- func NewApiClientPasswordEnv(envPrefix string) (*rc.APIClient, error)
- func NewApiClientPasswordSimple(oc credentials.OAuth2Credentials) (*rc.APIClient, error)
- func NewScimApiClient(oc credentials.OAuth2Credentials) (*rs.APIClient, error)
- func PrefixAtMentionUnlessMentioned(personId, text string) string
- func StripAtMention(id, text string) string
- func StripAtMentionAll(id, personName, text string) string
- func StripAtMentionFuzzy(personName, text string) string
- func UploadUserProfileImage(httpClient *http.Client, serverUrl, accountId, extensionId, imgFilepath string) (*http.Response, error)
- type DeliveryMode
- type Event
- type EventBody
- type EventBodyWrapper
- type EventSimple
- type EventType
- type FaxCoverPage
- type FaxRequest
- type GlipApiUtil
- func (apiUtil *GlipApiUtil) AtMentionedOrGroupOfTwo(userId, groupId string, mentions []rc.GlipMentionsInfo) (bool, error)
- func (apiUtil *GlipApiUtil) AtMentionedOrGroupOfTwoFuzzy(info GlipInfoAtMentionOrGroupOfTwoInfo) (bool, error)
- func (apiUtil *GlipApiUtil) GlipGroupMemberCount(groupId string) (int64, error)
- type GlipInfoAtMentionOrGroupOfTwoInfo
- type RingOutRequest
- type SubscriptionInfo
- type SubscriptionManager
Constants ¶
View Source
const ( InstantMessageSMSExample = "/restapi/v1.0/account/~/extension/12345678/message-store/instant?type=SMS" InstantMessageSMSPattern = `message-store/instant.+type=SMS` InstantMessageSMSPatternX = `message-store/instant` GlipPostEventFilterPattern = `/restapi/v1.0/glip/posts` SubscriptionRenewalFilter = `/restapi/v1.0/subscription/.+\?threshold=` )
View Source
const (
FaxUrl = "/restapi/v1.0/account/~/extension/~/fax"
)
View Source
const (
ThisDir = "src/github.com/grokify/go-ringcentral-client/office/v1/client"
)
Variables ¶
View Source
var Events = []string{
"AccountPresenceEvent",
"ContactDirectoryEvent",
"DetailedExtensionPresenceEvent",
"DetailedExtensionPresenceWithSIPEvent",
"ExtensionFavoritesEvent",
"ExtensionFavoritesPresenceEvent",
"ExtensionGrantListEvent",
"ExtensionListEvent",
"ExtensionInfoEvent",
"ExtensionPresenceEvent",
"ExtensionPresenceLineEvent",
"GlipGroupsEvent",
"GlipPostEvent",
"GlipUnreadMessageCountEvent",
"InboundMessageEvent",
"IncomingCallEvent",
"InstantMessageEvent",
"MessageEvent",
"MissedCallEvent",
"RCVideoNotificationsEvent",
"SubscriptionRenewalEvent",
}
Events is an array of event structs for reference.
Functions ¶
func ApiResponseErrorBody ¶
func BuildFaxApiUrl ¶
func FaxCoverPageNameToIndex ¶
func GetFileNameForEventType ¶
func GetFilePathForEventType ¶
func GlipCreatePostIsEmpty ¶
func GlipCreatePostIsEmpty(post rc.GlipCreatePost) bool
func IsAtMentioned ¶
func IsAtMentioned(userId string, mentions []rc.GlipMentionsInfo) bool
func IsAtMentionedFuzzy ¶
func IsAtMentionedGlipdown ¶
func NewApiClientCredentials ¶
func NewApiClientCredentials(creds credentials.Credentials) (*rc.APIClient, error)
func NewApiClientPassword ¶
func NewApiClientPassword(oc credentials.OAuth2Credentials) (*rc.APIClient, error)
func NewApiClientPasswordEnv ¶
func NewApiClientPasswordSimple ¶
func NewApiClientPasswordSimple(oc credentials.OAuth2Credentials) (*rc.APIClient, error)
func NewScimApiClient ¶
func NewScimApiClient(oc credentials.OAuth2Credentials) (*rs.APIClient, error)
func StripAtMention ¶
func StripAtMentionAll ¶
func StripAtMentionFuzzy ¶
Types ¶
type DeliveryMode ¶
type Event ¶
type Event struct { UUID string `json:"uuid,omitempty"` Event string `json:"event,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty"` OwnerId string `json:"ownerId,omitempty"` Body EventBodyWrapper `json:"body,omitempty"` }
Event is a generic event.
func EventParseBytes ¶
func (*Event) GetGlipPostEventBody ¶
func (evt *Event) GetGlipPostEventBody() (*rc.GlipPostEvent, error)
func (*Event) GetInstantMessageBody ¶
func (evt *Event) GetInstantMessageBody() (*rc.InstantMessageEvent, error)
func (*Event) IsEventType ¶
type EventBody ¶
type EventBody struct { ExpiresIn int `json:"expiresIn,omitempty"` CreationTime time.Time `json:"creationTime,omitempty"` Direction string `json:"direction,omitempty"` LastModificationTime time.Time `json:"lastModificationTime,omitempty"` Subject string `json:"subject,omitempty"` Type string `json:"type,omitempty"` }
type EventBodyWrapper ¶
type EventBodyWrapper struct { Raw string `json:"raw"` Parsed interface{} `json:"parsed"` }
func (*EventBodyWrapper) UnmarshalJSON ¶
func (w *EventBodyWrapper) UnmarshalJSON(data []byte) error
type EventSimple ¶
type EventSimple struct { UUID string `json:"uuid,omitempty"` Event string `json:"event,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty"` OwnerId string `json:"ownerId,omitempty"` Body EventBody `json:"body,omitempty"` }
EventSimple is a event for Instant SMS for testing purposes
type EventType ¶
type EventType int
const ( AccountPresenceEvent EventType = iota ContactDirectoryEvent DetailedExtensionPresenceEvent DetailedExtensionPresenceWithSIPEvent ExtensionFavoritesEvent ExtensionFavoritesPresenceEvent ExtensionGrantListEvent ExtensionListEvent ExtensionInfoEvent ExtensionPresenceEvent ExtensionPresenceLineEvent GlipGroupsEvent GlipPostEvent GlipUnreadMessageCountEvent InboundMessageEvent IncomingCallEvent InstantMessageEvent MessageEvent MissedCallEvent RCVideoNotificationsEvent SubscriptionRenewalEvent )
func ParseEventTypeForFilter ¶
func IsInstantMessageSMS(s string) bool { if strings.Index(s, InstantMessageSMSPattern) == -1 { return false } return true }
type FaxCoverPage ¶
type FaxCoverPage int
const ( None FaxCoverPage = iota // 0 Ancient // 1 Birthday // 2 Blank // 3 Clasmod // 4 Classic // 5 Confidential // 5 Contempo // 7 Elegant // 8 Express // 9 Formal // 10 Jazzy // 11 Modern // 12 Urgent // 13 )
func (FaxCoverPage) String ¶
func (d FaxCoverPage) String() string
String returns the English name of the fax cover page ("None", "Ancient", ...).
type FaxRequest ¶
type FaxRequest struct { CoverIndex int CoverPageText string Resolution string SendTime *time.Time IsoCode string To []string FilePaths []string FileHeaders []*multipart.FileHeader }
FaxRequest is a fax request helper that can send more than one attachment. The core Swagger Codegen appears to only send one file at a time with a fixed MIME part name.
func NewFaxRequest ¶
func NewFaxRequest() FaxRequest
type GlipApiUtil ¶
func (*GlipApiUtil) AtMentionedOrGroupOfTwo ¶
func (apiUtil *GlipApiUtil) AtMentionedOrGroupOfTwo(userId, groupId string, mentions []rc.GlipMentionsInfo) (bool, error)
DirectMessage means a group of 2 or a team of 2
func (*GlipApiUtil) AtMentionedOrGroupOfTwoFuzzy ¶
func (apiUtil *GlipApiUtil) AtMentionedOrGroupOfTwoFuzzy(info GlipInfoAtMentionOrGroupOfTwoInfo) (bool, error)
func (*GlipApiUtil) GlipGroupMemberCount ¶
func (apiUtil *GlipApiUtil) GlipGroupMemberCount(groupId string) (int64, error)
type RingOutRequest ¶
type RingOutRequest struct { To string From string CallerId string PlayPrompt bool CountryId string }
func (*RingOutRequest) Body ¶
func (ro *RingOutRequest) Body() *rc.MakeRingOutRequest
type SubscriptionInfo ¶
type SubscriptionManager ¶
type SubscriptionManager struct { Client *rc.APIClient EventFilters []string // contains filtered or unexported fields }
func NewSubscriptionManager ¶
func NewSubscriptionManager(apiClient *rc.APIClient) SubscriptionManager
Source Files ¶
Click to show internal directories.
Click to hide internal directories.