Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type APIKeyListParams
- type APIKeyListResponse
- type APIKeyListResponseData
- type APIKeyNewParams
- type APIKeyNewResponse
- type APIKeyService
- func (r *APIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *APIKeyService) List(ctx context.Context, query APIKeyListParams, opts ...option.RequestOption) (res *APIKeyListResponse, err error)
- func (r *APIKeyService) New(ctx context.Context, body APIKeyNewParams, opts ...option.RequestOption) (res *APIKeyNewResponse, err error)
- type AccountFacebookPageGetResponse
- type AccountFacebookPageGetResponseData
- type AccountFacebookPageService
- func (r *AccountFacebookPageService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountFacebookPageGetResponse, err error)
- func (r *AccountFacebookPageService) SetDefault(ctx context.Context, id string, body AccountFacebookPageSetDefaultParams, ...) (res *AccountFacebookPageSetDefaultResponse, err error)
- type AccountFacebookPageSetDefaultParams
- type AccountFacebookPageSetDefaultResponse
- type AccountFacebookPageSetDefaultResponseGroup
- type AccountFacebookPageSetDefaultResponsePlatform
- type AccountGetResponse
- type AccountGetResponseGroup
- type AccountGetResponsePlatform
- type AccountGmbLocationGetResponse
- type AccountGmbLocationGetResponseData
- type AccountGmbLocationService
- func (r *AccountGmbLocationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGmbLocationGetResponse, err error)
- func (r *AccountGmbLocationService) SetDefault(ctx context.Context, id string, body AccountGmbLocationSetDefaultParams, ...) (res *AccountGmbLocationSetDefaultResponse, err error)
- type AccountGmbLocationSetDefaultParams
- type AccountGmbLocationSetDefaultResponse
- type AccountGmbLocationSetDefaultResponseGroup
- type AccountGmbLocationSetDefaultResponsePlatform
- type AccountGroupListParams
- type AccountGroupListResponse
- type AccountGroupListResponseData
- type AccountGroupNewParams
- type AccountGroupNewResponse
- type AccountGroupService
- func (r *AccountGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *AccountGroupService) List(ctx context.Context, query AccountGroupListParams, ...) (res *AccountGroupListResponse, err error)
- func (r *AccountGroupService) New(ctx context.Context, body AccountGroupNewParams, opts ...option.RequestOption) (res *AccountGroupNewResponse, err error)
- func (r *AccountGroupService) Update(ctx context.Context, id string, body AccountGroupUpdateParams, ...) (res *AccountGroupUpdateResponse, err error)
- type AccountGroupUpdateParams
- type AccountGroupUpdateResponse
- type AccountHealthGetResponse
- type AccountHealthGetResponseError
- type AccountHealthListResponse
- type AccountHealthListResponseData
- type AccountHealthListResponseDataError
- type AccountHealthListResponseDataPlatform
- type AccountHealthService
- type AccountLinkedinOrganizationGetResponse
- type AccountLinkedinOrganizationGetResponseData
- type AccountLinkedinOrganizationService
- func (r *AccountLinkedinOrganizationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountLinkedinOrganizationGetResponse, err error)
- func (r *AccountLinkedinOrganizationService) SwitchType(ctx context.Context, id string, ...) (res *AccountLinkedinOrganizationSwitchTypeResponse, err error)
- type AccountLinkedinOrganizationSwitchTypeParams
- type AccountLinkedinOrganizationSwitchTypeParamsAccountType
- type AccountLinkedinOrganizationSwitchTypeResponse
- type AccountLinkedinOrganizationSwitchTypeResponseGroup
- type AccountLinkedinOrganizationSwitchTypeResponsePlatform
- type AccountListParams
- type AccountListResponse
- type AccountListResponseData
- type AccountListResponseDataGroup
- type AccountListResponseDataPlatform
- type AccountPinterestBoardGetResponse
- type AccountPinterestBoardGetResponseData
- type AccountPinterestBoardService
- func (r *AccountPinterestBoardService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountPinterestBoardGetResponse, err error)
- func (r *AccountPinterestBoardService) SetDefault(ctx context.Context, id string, body AccountPinterestBoardSetDefaultParams, ...) (res *AccountPinterestBoardSetDefaultResponse, err error)
- type AccountPinterestBoardSetDefaultParams
- type AccountPinterestBoardSetDefaultResponse
- type AccountPinterestBoardSetDefaultResponseGroup
- type AccountPinterestBoardSetDefaultResponsePlatform
- type AccountRedditFlairGetParams
- type AccountRedditFlairGetResponse
- type AccountRedditFlairGetResponseData
- type AccountRedditFlairService
- type AccountRedditSubredditGetResponse
- type AccountRedditSubredditGetResponseData
- type AccountRedditSubredditService
- func (r *AccountRedditSubredditService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountRedditSubredditGetResponse, err error)
- func (r *AccountRedditSubredditService) SetDefault(ctx context.Context, id string, body AccountRedditSubredditSetDefaultParams, ...) (res *AccountRedditSubredditSetDefaultResponse, err error)
- type AccountRedditSubredditSetDefaultParams
- type AccountRedditSubredditSetDefaultResponse
- type AccountRedditSubredditSetDefaultResponseGroup
- type AccountRedditSubredditSetDefaultResponsePlatform
- type AccountService
- func (r *AccountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGetResponse, err error)
- func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *AccountListResponse, err error)
- func (r *AccountService) Update(ctx context.Context, id string, body AccountUpdateParams, ...) (res *AccountUpdateResponse, err error)
- type AccountUpdateParams
- type AccountUpdateResponse
- type AccountUpdateResponseGroup
- type AccountUpdateResponsePlatform
- type AnalyticsGetBestTimeParams
- type AnalyticsGetBestTimeParamsPlatform
- type AnalyticsGetBestTimeResponse
- type AnalyticsGetBestTimeResponseData
- type AnalyticsGetContentDecayParams
- type AnalyticsGetContentDecayResponse
- type AnalyticsGetContentDecayResponseData
- type AnalyticsGetContentDecayResponsePlatform
- type AnalyticsGetParams
- type AnalyticsGetParamsPlatform
- type AnalyticsGetPostTimelineParams
- type AnalyticsGetPostTimelineResponse
- type AnalyticsGetPostTimelineResponseData
- type AnalyticsGetPostingFrequencyParams
- type AnalyticsGetPostingFrequencyParamsPlatform
- type AnalyticsGetPostingFrequencyResponse
- type AnalyticsGetPostingFrequencyResponseData
- type AnalyticsGetResponse
- type AnalyticsGetResponseData
- type AnalyticsGetResponseDataPlatform
- type AnalyticsGetResponseOverview
- type AnalyticsListDailyMetricsParams
- type AnalyticsListDailyMetricsParamsPlatform
- type AnalyticsListDailyMetricsResponse
- type AnalyticsListDailyMetricsResponseData
- type AnalyticsService
- func (r *AnalyticsService) Get(ctx context.Context, query AnalyticsGetParams, opts ...option.RequestOption) (res *AnalyticsGetResponse, err error)
- func (r *AnalyticsService) GetBestTime(ctx context.Context, query AnalyticsGetBestTimeParams, ...) (res *AnalyticsGetBestTimeResponse, err error)
- func (r *AnalyticsService) GetContentDecay(ctx context.Context, query AnalyticsGetContentDecayParams, ...) (res *AnalyticsGetContentDecayResponse, err error)
- func (r *AnalyticsService) GetPostTimeline(ctx context.Context, query AnalyticsGetPostTimelineParams, ...) (res *AnalyticsGetPostTimelineResponse, err error)
- func (r *AnalyticsService) GetPostingFrequency(ctx context.Context, query AnalyticsGetPostingFrequencyParams, ...) (res *AnalyticsGetPostingFrequencyResponse, err error)
- func (r *AnalyticsService) ListDailyMetrics(ctx context.Context, query AnalyticsListDailyMetricsParams, ...) (res *AnalyticsListDailyMetricsResponse, err error)
- type AnalyticsYoutubeGetDailyViewsParams
- type AnalyticsYoutubeGetDailyViewsResponse
- type AnalyticsYoutubeGetDailyViewsResponseData
- type AnalyticsYoutubeService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type ConnectCompleteOAuthCallbackParams
- type ConnectCompleteOAuthCallbackParamsPlatform
- type ConnectCompleteOAuthCallbackResponse
- type ConnectCompleteOAuthCallbackResponseAccount
- type ConnectCompleteOAuthCallbackResponseAccountGroup
- type ConnectCompleteOAuthCallbackResponseAccountPlatform
- type ConnectFacebookPageListResponse
- type ConnectFacebookPageListResponsePage
- type ConnectFacebookPageSelectParams
- type ConnectFacebookPageSelectResponse
- type ConnectFacebookPageSelectResponseAccount
- type ConnectFacebookPageSelectResponseAccountGroup
- type ConnectFacebookPageSelectResponseAccountPlatform
- type ConnectFacebookPageService
- func (r *ConnectFacebookPageService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectFacebookPageListResponse, err error)
- func (r *ConnectFacebookPageService) Select(ctx context.Context, body ConnectFacebookPageSelectParams, ...) (res *ConnectFacebookPageSelectResponse, err error)
- type ConnectFacebookService
- type ConnectFetchPendingDataParams
- type ConnectFetchPendingDataResponse
- type ConnectFetchPendingDataResponsePlatform
- type ConnectFetchPendingDataResponseUserProfile
- type ConnectGooglebusinessLocationListResponse
- type ConnectGooglebusinessLocationListResponseLocation
- type ConnectGooglebusinessLocationSelectParams
- type ConnectGooglebusinessLocationSelectResponse
- type ConnectGooglebusinessLocationSelectResponseAccount
- type ConnectGooglebusinessLocationSelectResponseAccountGroup
- type ConnectGooglebusinessLocationSelectResponseAccountPlatform
- type ConnectGooglebusinessLocationService
- func (r *ConnectGooglebusinessLocationService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectGooglebusinessLocationListResponse, err error)
- func (r *ConnectGooglebusinessLocationService) Select(ctx context.Context, body ConnectGooglebusinessLocationSelectParams, ...) (res *ConnectGooglebusinessLocationSelectResponse, err error)
- type ConnectGooglebusinessService
- type ConnectLinkedinOrganizationListResponse
- type ConnectLinkedinOrganizationListResponseOrganization
- type ConnectLinkedinOrganizationListResponsePersonalProfile
- type ConnectLinkedinOrganizationSelectParams
- type ConnectLinkedinOrganizationSelectParamsAccountType
- type ConnectLinkedinOrganizationSelectResponse
- type ConnectLinkedinOrganizationSelectResponseAccount
- type ConnectLinkedinOrganizationSelectResponseAccountGroup
- type ConnectLinkedinOrganizationSelectResponseAccountPlatform
- type ConnectLinkedinOrganizationService
- func (r *ConnectLinkedinOrganizationService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectLinkedinOrganizationListResponse, err error)
- func (r *ConnectLinkedinOrganizationService) Select(ctx context.Context, body ConnectLinkedinOrganizationSelectParams, ...) (res *ConnectLinkedinOrganizationSelectResponse, err error)
- type ConnectLinkedinService
- type ConnectNewBlueskyConnectionParams
- type ConnectNewBlueskyConnectionResponse
- type ConnectNewBlueskyConnectionResponseAccount
- type ConnectNewBlueskyConnectionResponseAccountGroup
- type ConnectNewBlueskyConnectionResponseAccountPlatform
- type ConnectPinterestBoardListResponse
- type ConnectPinterestBoardListResponseBoard
- type ConnectPinterestBoardSelectParams
- type ConnectPinterestBoardSelectResponse
- type ConnectPinterestBoardSelectResponseAccount
- type ConnectPinterestBoardSelectResponseAccountGroup
- type ConnectPinterestBoardSelectResponseAccountPlatform
- type ConnectPinterestBoardService
- func (r *ConnectPinterestBoardService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectPinterestBoardListResponse, err error)
- func (r *ConnectPinterestBoardService) Select(ctx context.Context, body ConnectPinterestBoardSelectParams, ...) (res *ConnectPinterestBoardSelectResponse, err error)
- type ConnectPinterestService
- type ConnectService
- func (r *ConnectService) CompleteOAuthCallback(ctx context.Context, platform ConnectCompleteOAuthCallbackParamsPlatform, ...) (res *ConnectCompleteOAuthCallbackResponse, err error)
- func (r *ConnectService) FetchPendingData(ctx context.Context, query ConnectFetchPendingDataParams, ...) (res *ConnectFetchPendingDataResponse, err error)
- func (r *ConnectService) NewBlueskyConnection(ctx context.Context, body ConnectNewBlueskyConnectionParams, ...) (res *ConnectNewBlueskyConnectionResponse, err error)
- func (r *ConnectService) StartOAuthFlow(ctx context.Context, platform ConnectStartOAuthFlowParamsPlatform, ...) (res *ConnectStartOAuthFlowResponse, err error)
- type ConnectSnapchatProfileListResponse
- type ConnectSnapchatProfileListResponseProfile
- type ConnectSnapchatProfileSelectParams
- type ConnectSnapchatProfileSelectResponse
- type ConnectSnapchatProfileSelectResponseAccount
- type ConnectSnapchatProfileSelectResponseAccountGroup
- type ConnectSnapchatProfileSelectResponseAccountPlatform
- type ConnectSnapchatProfileService
- func (r *ConnectSnapchatProfileService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectSnapchatProfileListResponse, err error)
- func (r *ConnectSnapchatProfileService) Select(ctx context.Context, body ConnectSnapchatProfileSelectParams, ...) (res *ConnectSnapchatProfileSelectResponse, err error)
- type ConnectSnapchatService
- type ConnectStartOAuthFlowParams
- type ConnectStartOAuthFlowParamsPlatform
- type ConnectStartOAuthFlowResponse
- type ConnectTelegramConnectDirectlyParams
- type ConnectTelegramConnectDirectlyResponse
- type ConnectTelegramConnectDirectlyResponseAccount
- type ConnectTelegramConnectDirectlyResponseAccountGroup
- type ConnectTelegramConnectDirectlyResponseAccountPlatform
- type ConnectTelegramInitiateConnectionResponse
- type ConnectTelegramPollConnectionStatusParams
- type ConnectTelegramPollConnectionStatusResponse
- type ConnectTelegramPollConnectionStatusResponseAccount
- type ConnectTelegramPollConnectionStatusResponseAccountGroup
- type ConnectTelegramPollConnectionStatusResponseAccountPlatform
- type ConnectTelegramPollConnectionStatusResponseStatus
- type ConnectTelegramService
- func (r *ConnectTelegramService) ConnectDirectly(ctx context.Context, body ConnectTelegramConnectDirectlyParams, ...) (res *ConnectTelegramConnectDirectlyResponse, err error)
- func (r *ConnectTelegramService) InitiateConnection(ctx context.Context, opts ...option.RequestOption) (res *ConnectTelegramInitiateConnectionResponse, err error)
- func (r *ConnectTelegramService) PollConnectionStatus(ctx context.Context, query ConnectTelegramPollConnectionStatusParams, ...) (res *ConnectTelegramPollConnectionStatusResponse, err error)
- type ConnectWhatsappCompleteEmbeddedSignupParams
- type ConnectWhatsappCompleteEmbeddedSignupResponse
- type ConnectWhatsappCompleteEmbeddedSignupResponseAccount
- type ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup
- type ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform
- type ConnectWhatsappConnectViaCredentialsParams
- type ConnectWhatsappConnectViaCredentialsResponse
- type ConnectWhatsappConnectViaCredentialsResponseAccount
- type ConnectWhatsappConnectViaCredentialsResponseAccountGroup
- type ConnectWhatsappConnectViaCredentialsResponseAccountPlatform
- type ConnectWhatsappGetSDKConfigResponse
- type ConnectWhatsappService
- func (r *ConnectWhatsappService) CompleteEmbeddedSignup(ctx context.Context, body ConnectWhatsappCompleteEmbeddedSignupParams, ...) (res *ConnectWhatsappCompleteEmbeddedSignupResponse, err error)
- func (r *ConnectWhatsappService) ConnectViaCredentials(ctx context.Context, body ConnectWhatsappConnectViaCredentialsParams, ...) (res *ConnectWhatsappConnectViaCredentialsResponse, err error)
- func (r *ConnectWhatsappService) GetSDKConfig(ctx context.Context, opts ...option.RequestOption) (res *ConnectWhatsappGetSDKConfigResponse, err error)
- type ConnectionListLogsParams
- type ConnectionListLogsResponse
- type ConnectionListLogsResponseData
- type ConnectionListLogsResponseDataEvent
- type ConnectionService
- type Error
- type InboxCommentDeleteResponse
- type InboxCommentGetParams
- type InboxCommentGetParamsPlatform
- type InboxCommentGetResponse
- type InboxCommentGetResponseData
- type InboxCommentGetResponseDataPlatform
- type InboxCommentGetResponsePlatform
- type InboxCommentHideDeleteResponse
- type InboxCommentHideNewResponse
- type InboxCommentHideService
- func (r *InboxCommentHideService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentHideDeleteResponse, err error)
- func (r *InboxCommentHideService) New(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentHideNewResponse, err error)
- type InboxCommentLikeDeleteResponse
- type InboxCommentLikeNewResponse
- type InboxCommentLikeService
- func (r *InboxCommentLikeService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentLikeDeleteResponse, err error)
- func (r *InboxCommentLikeService) New(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentLikeNewResponse, err error)
- type InboxCommentListParams
- type InboxCommentListParamsPlatform
- type InboxCommentListResponse
- type InboxCommentListResponseData
- type InboxCommentListResponseDataPlatform
- type InboxCommentListResponsePlatform
- type InboxCommentPrivateReplyParams
- type InboxCommentPrivateReplyResponse
- type InboxCommentReplyParams
- type InboxCommentReplyResponse
- type InboxCommentService
- func (r *InboxCommentService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentDeleteResponse, err error)
- func (r *InboxCommentService) Get(ctx context.Context, postID string, query InboxCommentGetParams, ...) (res *InboxCommentGetResponse, err error)
- func (r *InboxCommentService) List(ctx context.Context, query InboxCommentListParams, ...) (res *InboxCommentListResponse, err error)
- func (r *InboxCommentService) PrivateReply(ctx context.Context, commentID string, body InboxCommentPrivateReplyParams, ...) (res *InboxCommentPrivateReplyResponse, err error)
- func (r *InboxCommentService) Reply(ctx context.Context, postID string, body InboxCommentReplyParams, ...) (res *InboxCommentReplyResponse, err error)
- type InboxMessageArchiveResponse
- type InboxMessageEditParams
- type InboxMessageEditResponse
- type InboxMessageGetResponse
- type InboxMessageGetResponseData
- type InboxMessageGetResponseDataAttachment
- type InboxMessageGetResponseDataSender
- type InboxMessageListParams
- type InboxMessageListParamsPlatform
- type InboxMessageListResponse
- type InboxMessageListResponseData
- type InboxMessageListResponseDataPlatform
- type InboxMessageSendParams
- type InboxMessageSendParamsAttachment
- type InboxMessageSendResponse
- type InboxMessageService
- func (r *InboxMessageService) Archive(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageArchiveResponse, err error)
- func (r *InboxMessageService) Edit(ctx context.Context, conversationID string, messageID string, ...) (res *InboxMessageEditResponse, err error)
- func (r *InboxMessageService) Get(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageGetResponse, err error)
- func (r *InboxMessageService) List(ctx context.Context, query InboxMessageListParams, ...) (res *InboxMessageListResponse, err error)
- func (r *InboxMessageService) Send(ctx context.Context, conversationID string, body InboxMessageSendParams, ...) (res *InboxMessageSendResponse, err error)
- type InboxReviewListParams
- type InboxReviewListParamsPlatform
- type InboxReviewListResponse
- type InboxReviewListResponseData
- type InboxReviewListResponseDataPlatform
- type InboxReviewReplyDeleteResponse
- type InboxReviewReplyNewParams
- type InboxReviewReplyNewResponse
- type InboxReviewReplyService
- func (r *InboxReviewReplyService) Delete(ctx context.Context, reviewID string, opts ...option.RequestOption) (res *InboxReviewReplyDeleteResponse, err error)
- func (r *InboxReviewReplyService) New(ctx context.Context, reviewID string, body InboxReviewReplyNewParams, ...) (res *InboxReviewReplyNewResponse, err error)
- type InboxReviewService
- type InboxService
- type MediaGetPresignURLParams
- type MediaGetPresignURLResponse
- type MediaGetResponse
- type MediaService
- func (r *MediaService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *MediaService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MediaGetResponse, err error)
- func (r *MediaService) GetPresignURL(ctx context.Context, body MediaGetPresignURLParams, ...) (res *MediaGetPresignURLResponse, err error)
- func (r *MediaService) Upload(ctx context.Context, body io.Reader, params MediaUploadParams, ...) (res *MediaUploadResponse, err error)
- type MediaUploadParams
- type MediaUploadResponse
- type PostBulkNewParams
- type PostBulkNewParamsPost
- type PostBulkNewParamsPostsMedia
- type PostBulkNewParamsPostsMediaType
- type PostBulkNewResponse
- type PostBulkNewResponseData
- type PostBulkNewResponseDataMedia
- type PostBulkNewResponseDataMediaType
- type PostBulkNewResponseDataStatus
- type PostBulkNewResponseDataTarget
- type PostBulkNewResponseDataTargetsAccount
- type PostBulkNewResponseDataTargetsError
- type PostBulkNewResponseDataTargetsPlatform
- type PostBulkNewResponseDataTargetsStatus
- type PostBulkNewResponseSummary
- type PostGetResponse
- type PostGetResponseMedia
- type PostGetResponseMediaType
- type PostGetResponseStatus
- type PostGetResponseTarget
- type PostGetResponseTargetsAccount
- type PostGetResponseTargetsError
- type PostGetResponseTargetsPlatform
- type PostGetResponseTargetsStatus
- type PostListParams
- type PostListParamsStatus
- type PostListResponse
- type PostListResponseData
- type PostListResponseDataMedia
- type PostListResponseDataMediaType
- type PostListResponseDataStatus
- type PostListResponseDataTarget
- type PostListResponseDataTargetsAccount
- type PostListResponseDataTargetsError
- type PostListResponseDataTargetsPlatform
- type PostListResponseDataTargetsStatus
- type PostLogGetResponse
- type PostLogGetResponseData
- type PostLogListParams
- type PostLogListResponse
- type PostLogListResponseData
- type PostLogService
- type PostNewParams
- type PostNewParamsMedia
- type PostNewParamsMediaType
- type PostNewResponse
- type PostNewResponseMedia
- type PostNewResponseMediaType
- type PostNewResponseStatus
- type PostNewResponseTarget
- type PostNewResponseTargetsAccount
- type PostNewResponseTargetsError
- type PostNewResponseTargetsPlatform
- type PostNewResponseTargetsStatus
- type PostRetryResponse
- type PostRetryResponseMedia
- type PostRetryResponseMediaType
- type PostRetryResponseStatus
- type PostRetryResponseTarget
- type PostRetryResponseTargetsAccount
- type PostRetryResponseTargetsError
- type PostRetryResponseTargetsPlatform
- type PostRetryResponseTargetsStatus
- type PostService
- func (r *PostService) BulkNew(ctx context.Context, body PostBulkNewParams, opts ...option.RequestOption) (res *PostBulkNewResponse, err error)
- func (r *PostService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *PostService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PostGetResponse, err error)
- func (r *PostService) List(ctx context.Context, query PostListParams, opts ...option.RequestOption) (res *PostListResponse, err error)
- func (r *PostService) New(ctx context.Context, body PostNewParams, opts ...option.RequestOption) (res *PostNewResponse, err error)
- func (r *PostService) Retry(ctx context.Context, id string, opts ...option.RequestOption) (res *PostRetryResponse, err error)
- func (r *PostService) Unpublish(ctx context.Context, id string, body PostUnpublishParams, ...) (res *PostUnpublishResponse, err error)
- func (r *PostService) Update(ctx context.Context, id string, body PostUpdateParams, ...) (res *PostUpdateResponse, err error)
- type PostUnpublishParams
- type PostUnpublishResponse
- type PostUnpublishResponseMedia
- type PostUnpublishResponseMediaType
- type PostUnpublishResponseStatus
- type PostUnpublishResponseTarget
- type PostUnpublishResponseTargetsAccount
- type PostUnpublishResponseTargetsError
- type PostUnpublishResponseTargetsPlatform
- type PostUnpublishResponseTargetsStatus
- type PostUpdateParams
- type PostUpdateParamsMedia
- type PostUpdateParamsMediaType
- type PostUpdateResponse
- type PostUpdateResponseMedia
- type PostUpdateResponseMediaType
- type PostUpdateResponseStatus
- type PostUpdateResponseTarget
- type PostUpdateResponseTargetsAccount
- type PostUpdateResponseTargetsError
- type PostUpdateResponseTargetsPlatform
- type PostUpdateResponseTargetsStatus
- type QueueGetNextSlotResponse
- type QueuePreviewParams
- type QueuePreviewResponse
- type QueueService
- type QueueSlotListResponse
- type QueueSlotListResponseData
- type QueueSlotListResponseDataSlot
- type QueueSlotNewParams
- type QueueSlotNewParamsSlot
- type QueueSlotNewResponse
- type QueueSlotNewResponseSlot
- type QueueSlotService
- func (r *QueueSlotService) Delete(ctx context.Context, opts ...option.RequestOption) (err error)
- func (r *QueueSlotService) List(ctx context.Context, opts ...option.RequestOption) (res *QueueSlotListResponse, err error)
- func (r *QueueSlotService) New(ctx context.Context, body QueueSlotNewParams, opts ...option.RequestOption) (res *QueueSlotNewResponse, err error)
- func (r *QueueSlotService) Update(ctx context.Context, body QueueSlotUpdateParams, opts ...option.RequestOption) (res *QueueSlotUpdateResponse, err error)
- type QueueSlotUpdateParams
- type QueueSlotUpdateParamsSlot
- type QueueSlotUpdateResponse
- type QueueSlotUpdateResponseSlot
- type RedditGetFeedParams
- type RedditGetFeedParamsSort
- type RedditGetFeedParamsTime
- type RedditGetFeedResponse
- type RedditGetFeedResponseData
- type RedditSearchParams
- type RedditSearchParamsSort
- type RedditSearchParamsTime
- type RedditSearchResponse
- type RedditSearchResponseData
- type RedditService
- type ToolInstagramCheckHashtagSafetyParams
- type ToolInstagramCheckHashtagSafetyResponse
- type ToolInstagramCheckHashtagSafetyResponseResult
- type ToolInstagramCheckHashtagSafetyResponseResultsStatus
- type ToolInstagramService
- type ToolService
- type ToolValidateCheckPostLengthParams
- type ToolValidateCheckPostLengthResponse
- type ToolValidateCheckPostLengthResponsePlatforms
- type ToolValidateCheckPostLengthResponsePlatformsBluesky
- type ToolValidateCheckPostLengthResponsePlatformsDiscord
- type ToolValidateCheckPostLengthResponsePlatformsFacebook
- type ToolValidateCheckPostLengthResponsePlatformsGooglebusiness
- type ToolValidateCheckPostLengthResponsePlatformsInstagram
- type ToolValidateCheckPostLengthResponsePlatformsLinkedin
- type ToolValidateCheckPostLengthResponsePlatformsMastodon
- type ToolValidateCheckPostLengthResponsePlatformsPinterest
- type ToolValidateCheckPostLengthResponsePlatformsReddit
- type ToolValidateCheckPostLengthResponsePlatformsSMS
- type ToolValidateCheckPostLengthResponsePlatformsSnapchat
- type ToolValidateCheckPostLengthResponsePlatformsTelegram
- type ToolValidateCheckPostLengthResponsePlatformsThreads
- type ToolValidateCheckPostLengthResponsePlatformsTiktok
- type ToolValidateCheckPostLengthResponsePlatformsTwitter
- type ToolValidateCheckPostLengthResponsePlatformsWhatsapp
- type ToolValidateCheckPostLengthResponsePlatformsYoutube
- type ToolValidateGetSubredditParams
- type ToolValidateGetSubredditResponse
- type ToolValidateGetSubredditResponsePostTypes
- type ToolValidateService
- func (r *ToolValidateService) CheckPostLength(ctx context.Context, body ToolValidateCheckPostLengthParams, ...) (res *ToolValidateCheckPostLengthResponse, err error)
- func (r *ToolValidateService) GetSubreddit(ctx context.Context, query ToolValidateGetSubredditParams, ...) (res *ToolValidateGetSubredditResponse, err error)
- func (r *ToolValidateService) ValidateMedia(ctx context.Context, body ToolValidateValidateMediaParams, ...) (res *ToolValidateValidateMediaResponse, err error)
- func (r *ToolValidateService) ValidatePost(ctx context.Context, body ToolValidateValidatePostParams, ...) (res *ToolValidateValidatePostResponse, err error)
- type ToolValidateValidateMediaParams
- type ToolValidateValidateMediaResponse
- type ToolValidateValidateMediaResponsePlatformLimits
- type ToolValidateValidateMediaResponsePlatformLimitsBluesky
- type ToolValidateValidateMediaResponsePlatformLimitsDiscord
- type ToolValidateValidateMediaResponsePlatformLimitsFacebook
- type ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness
- type ToolValidateValidateMediaResponsePlatformLimitsInstagram
- type ToolValidateValidateMediaResponsePlatformLimitsLinkedin
- type ToolValidateValidateMediaResponsePlatformLimitsMastodon
- type ToolValidateValidateMediaResponsePlatformLimitsPinterest
- type ToolValidateValidateMediaResponsePlatformLimitsReddit
- type ToolValidateValidateMediaResponsePlatformLimitsSMS
- type ToolValidateValidateMediaResponsePlatformLimitsSnapchat
- type ToolValidateValidateMediaResponsePlatformLimitsTelegram
- type ToolValidateValidateMediaResponsePlatformLimitsThreads
- type ToolValidateValidateMediaResponsePlatformLimitsTiktok
- type ToolValidateValidateMediaResponsePlatformLimitsTwitter
- type ToolValidateValidateMediaResponsePlatformLimitsWhatsapp
- type ToolValidateValidateMediaResponsePlatformLimitsYoutube
- type ToolValidateValidatePostParams
- type ToolValidateValidatePostParamsMedia
- type ToolValidateValidatePostParamsMediaType
- type ToolValidateValidatePostResponse
- type ToolValidateValidatePostResponseError
- type ToolValidateValidatePostResponseWarning
- type TwitterBookmarkNewParams
- type TwitterBookmarkNewResponse
- type TwitterBookmarkRemoveParams
- type TwitterBookmarkRemoveResponse
- type TwitterBookmarkService
- type TwitterFollowNewParams
- type TwitterFollowNewResponse
- type TwitterFollowService
- func (r *TwitterFollowService) New(ctx context.Context, body TwitterFollowNewParams, opts ...option.RequestOption) (res *TwitterFollowNewResponse, err error)
- func (r *TwitterFollowService) Unfollow(ctx context.Context, body TwitterFollowUnfollowParams, ...) (res *TwitterFollowUnfollowResponse, err error)
- type TwitterFollowUnfollowParams
- type TwitterFollowUnfollowResponse
- type TwitterRetweetNewParams
- type TwitterRetweetNewResponse
- type TwitterRetweetService
- type TwitterRetweetUndoParams
- type TwitterRetweetUndoResponse
- type TwitterService
- type UsageGetResponse
- type UsageGetResponsePlan
- type UsageGetResponsePlanFeatures
- type UsageGetResponsePlanName
- type UsageGetResponseRateLimit
- type UsageGetResponseSubscription
- type UsageGetResponseUsage
- type UsageService
- type WebhookListLogsParams
- type WebhookListLogsResponse
- type WebhookListLogsResponseData
- type WebhookListParams
- type WebhookListResponse
- type WebhookListResponseData
- type WebhookNewParams
- type WebhookNewParamsEvent
- type WebhookNewResponse
- type WebhookSendTestParams
- type WebhookSendTestResponse
- type WebhookService
- func (r *WebhookService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *WebhookService) List(ctx context.Context, query WebhookListParams, opts ...option.RequestOption) (res *WebhookListResponse, err error)
- func (r *WebhookService) ListLogs(ctx context.Context, query WebhookListLogsParams, opts ...option.RequestOption) (res *WebhookListLogsResponse, err error)
- func (r *WebhookService) New(ctx context.Context, body WebhookNewParams, opts ...option.RequestOption) (res *WebhookNewResponse, err error)
- func (r *WebhookService) SendTest(ctx context.Context, body WebhookSendTestParams, opts ...option.RequestOption) (res *WebhookSendTestResponse, err error)
- func (r *WebhookService) Update(ctx context.Context, id string, body WebhookUpdateParams, ...) (res *WebhookUpdateResponse, err error)
- type WebhookUpdateParams
- type WebhookUpdateParamsEvent
- type WebhookUpdateResponse
- type WhatsappBroadcastGetResponse
- type WhatsappBroadcastGetResponseStatus
- type WhatsappBroadcastListParams
- type WhatsappBroadcastListResponse
- type WhatsappBroadcastListResponseData
- type WhatsappBroadcastListResponseDataStatus
- type WhatsappBroadcastNewParams
- type WhatsappBroadcastNewParamsRecipient
- type WhatsappBroadcastNewParamsTemplate
- type WhatsappBroadcastNewParamsTemplateComponent
- type WhatsappBroadcastNewParamsTemplateComponentsType
- type WhatsappBroadcastNewResponse
- type WhatsappBroadcastNewResponseStatus
- type WhatsappBroadcastScheduleResponse
- type WhatsappBroadcastScheduleResponseStatus
- type WhatsappBroadcastSendResponse
- type WhatsappBroadcastSendResponseStatus
- type WhatsappBroadcastService
- func (r *WhatsappBroadcastService) Delete(ctx context.Context, broadcastID string, opts ...option.RequestOption) (err error)
- func (r *WhatsappBroadcastService) Get(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastGetResponse, err error)
- func (r *WhatsappBroadcastService) List(ctx context.Context, query WhatsappBroadcastListParams, ...) (res *WhatsappBroadcastListResponse, err error)
- func (r *WhatsappBroadcastService) New(ctx context.Context, body WhatsappBroadcastNewParams, ...) (res *WhatsappBroadcastNewResponse, err error)
- func (r *WhatsappBroadcastService) Schedule(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastScheduleResponse, err error)
- func (r *WhatsappBroadcastService) Send(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastSendResponse, err error)
- type WhatsappBulkSendParams
- type WhatsappBulkSendParamsRecipient
- type WhatsappBulkSendParamsTemplate
- type WhatsappBulkSendParamsTemplateComponent
- type WhatsappBulkSendParamsTemplateComponentsType
- type WhatsappBulkSendResponse
- type WhatsappBulkSendResponseResult
- type WhatsappBulkSendResponseResultsStatus
- type WhatsappBulkSendResponseSummary
- type WhatsappBusinessProfileGetParams
- type WhatsappBusinessProfileGetResponse
- type WhatsappBusinessProfileService
- func (r *WhatsappBusinessProfileService) Get(ctx context.Context, query WhatsappBusinessProfileGetParams, ...) (res *WhatsappBusinessProfileGetResponse, err error)
- func (r *WhatsappBusinessProfileService) Update(ctx context.Context, body WhatsappBusinessProfileUpdateParams, ...) (res *WhatsappBusinessProfileUpdateResponse, err error)
- type WhatsappBusinessProfileUpdateParams
- type WhatsappBusinessProfileUpdateResponse
- type WhatsappContactBulkOperationsParams
- type WhatsappContactBulkOperationsParamsAction
- type WhatsappContactBulkOperationsResponse
- type WhatsappContactGetResponse
- type WhatsappContactImportParams
- type WhatsappContactImportParamsContact
- type WhatsappContactImportResponse
- type WhatsappContactListParams
- type WhatsappContactListResponse
- type WhatsappContactListResponseData
- type WhatsappContactNewParams
- type WhatsappContactNewResponse
- type WhatsappContactService
- func (r *WhatsappContactService) BulkOperations(ctx context.Context, body WhatsappContactBulkOperationsParams, ...) (res *WhatsappContactBulkOperationsResponse, err error)
- func (r *WhatsappContactService) Delete(ctx context.Context, contactID string, opts ...option.RequestOption) (err error)
- func (r *WhatsappContactService) Get(ctx context.Context, contactID string, opts ...option.RequestOption) (res *WhatsappContactGetResponse, err error)
- func (r *WhatsappContactService) Import(ctx context.Context, body WhatsappContactImportParams, ...) (res *WhatsappContactImportResponse, err error)
- func (r *WhatsappContactService) List(ctx context.Context, query WhatsappContactListParams, ...) (res *WhatsappContactListResponse, err error)
- func (r *WhatsappContactService) New(ctx context.Context, body WhatsappContactNewParams, ...) (res *WhatsappContactNewResponse, err error)
- type WhatsappGroupListParams
- type WhatsappGroupListResponse
- type WhatsappGroupListResponseData
- type WhatsappGroupNewParams
- type WhatsappGroupNewResponse
- type WhatsappGroupService
- func (r *WhatsappGroupService) Delete(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
- func (r *WhatsappGroupService) List(ctx context.Context, query WhatsappGroupListParams, ...) (res *WhatsappGroupListResponse, err error)
- func (r *WhatsappGroupService) New(ctx context.Context, body WhatsappGroupNewParams, opts ...option.RequestOption) (res *WhatsappGroupNewResponse, err error)
- type WhatsappListPhoneNumbersParams
- type WhatsappListPhoneNumbersResponse
- type WhatsappListPhoneNumbersResponseData
- type WhatsappListPhoneNumbersResponseDataStatus
- type WhatsappService
- func (r *WhatsappService) BulkSend(ctx context.Context, body WhatsappBulkSendParams, opts ...option.RequestOption) (res *WhatsappBulkSendResponse, err error)
- func (r *WhatsappService) ListPhoneNumbers(ctx context.Context, query WhatsappListPhoneNumbersParams, ...) (res *WhatsappListPhoneNumbersResponse, err error)
- type WhatsappTemplateDeleteParams
- type WhatsappTemplateGetParams
- type WhatsappTemplateGetResponse
- type WhatsappTemplateGetResponseCategory
- type WhatsappTemplateGetResponseComponent
- type WhatsappTemplateGetResponseComponentsButton
- type WhatsappTemplateGetResponseComponentsType
- type WhatsappTemplateGetResponseStatus
- type WhatsappTemplateListParams
- type WhatsappTemplateListResponse
- type WhatsappTemplateListResponseData
- type WhatsappTemplateListResponseDataCategory
- type WhatsappTemplateListResponseDataComponent
- type WhatsappTemplateListResponseDataComponentsButton
- type WhatsappTemplateListResponseDataComponentsType
- type WhatsappTemplateListResponseDataStatus
- type WhatsappTemplateNewParams
- type WhatsappTemplateNewParamsCategory
- type WhatsappTemplateNewParamsComponent
- type WhatsappTemplateNewParamsComponentsButton
- type WhatsappTemplateNewParamsComponentsType
- type WhatsappTemplateNewResponse
- type WhatsappTemplateNewResponseCategory
- type WhatsappTemplateNewResponseComponent
- type WhatsappTemplateNewResponseComponentsButton
- type WhatsappTemplateNewResponseComponentsType
- type WhatsappTemplateNewResponseStatus
- type WhatsappTemplateService
- func (r *WhatsappTemplateService) Delete(ctx context.Context, templateName string, body WhatsappTemplateDeleteParams, ...) (err error)
- func (r *WhatsappTemplateService) Get(ctx context.Context, templateName string, query WhatsappTemplateGetParams, ...) (res *WhatsappTemplateGetResponse, err error)
- func (r *WhatsappTemplateService) List(ctx context.Context, query WhatsappTemplateListParams, ...) (res *WhatsappTemplateListResponse, err error)
- func (r *WhatsappTemplateService) New(ctx context.Context, body WhatsappTemplateNewParams, ...) (res *WhatsappTemplateNewResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (RELAY_API_KEY, RELAY_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type APIKeyListParams ¶
type APIKeyListParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (APIKeyListParams) URLQuery ¶
func (r APIKeyListParams) URLQuery() (v url.Values)
URLQuery serializes APIKeyListParams's query parameters as `url.Values`.
type APIKeyListResponse ¶
type APIKeyListResponse struct {
Data []APIKeyListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON apiKeyListResponseJSON `json:"-"`
}
func (*APIKeyListResponse) UnmarshalJSON ¶
func (r *APIKeyListResponse) UnmarshalJSON(data []byte) (err error)
type APIKeyListResponseData ¶
type APIKeyListResponseData struct {
// API key ID
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether the key is active
Enabled bool `json:"enabled" api:"required"`
// Expiration timestamp
ExpiresAt time.Time `json:"expires_at" api:"required,nullable" format:"date-time"`
// API key name
Name string `json:"name" api:"required,nullable"`
// Key prefix (e.g. rlay*live*)
Prefix string `json:"prefix" api:"required,nullable"`
// First 8 characters of the key (preview)
Start string `json:"start" api:"required"`
JSON apiKeyListResponseDataJSON `json:"-"`
}
func (*APIKeyListResponseData) UnmarshalJSON ¶
func (r *APIKeyListResponseData) UnmarshalJSON(data []byte) (err error)
type APIKeyNewParams ¶
type APIKeyNewParams struct {
// Name for the API key
Name param.Field[string] `json:"name" api:"required"`
// Number of days until the key expires
ExpiresInDays param.Field[int64] `json:"expires_in_days"`
}
func (APIKeyNewParams) MarshalJSON ¶
func (r APIKeyNewParams) MarshalJSON() (data []byte, err error)
type APIKeyNewResponse ¶
type APIKeyNewResponse struct {
// API key ID
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Expiration timestamp
ExpiresAt time.Time `json:"expires_at" api:"required,nullable" format:"date-time"`
// Full API key (shown once, store securely)
Key string `json:"key" api:"required"`
// API key name
Name string `json:"name" api:"required,nullable"`
// Key prefix
Prefix string `json:"prefix" api:"required"`
JSON apiKeyNewResponseJSON `json:"-"`
}
func (*APIKeyNewResponse) UnmarshalJSON ¶
func (r *APIKeyNewResponse) UnmarshalJSON(data []byte) (err error)
type APIKeyService ¶
type APIKeyService struct {
Options []option.RequestOption
}
APIKeyService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAPIKeyService method instead.
func NewAPIKeyService ¶
func NewAPIKeyService(opts ...option.RequestOption) (r *APIKeyService)
NewAPIKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*APIKeyService) Delete ¶
func (r *APIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete an API key
func (*APIKeyService) List ¶
func (r *APIKeyService) List(ctx context.Context, query APIKeyListParams, opts ...option.RequestOption) (res *APIKeyListResponse, err error)
List API keys
func (*APIKeyService) New ¶
func (r *APIKeyService) New(ctx context.Context, body APIKeyNewParams, opts ...option.RequestOption) (res *APIKeyNewResponse, err error)
Create a new API key. The full key is returned only once in the response — store it securely.
type AccountFacebookPageGetResponse ¶
type AccountFacebookPageGetResponse struct {
Data []AccountFacebookPageGetResponseData `json:"data" api:"required"`
JSON accountFacebookPageGetResponseJSON `json:"-"`
}
func (*AccountFacebookPageGetResponse) UnmarshalJSON ¶
func (r *AccountFacebookPageGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountFacebookPageGetResponseData ¶
type AccountFacebookPageGetResponseData struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
AccessToken string `json:"access_token"`
JSON accountFacebookPageGetResponseDataJSON `json:"-"`
}
func (*AccountFacebookPageGetResponseData) UnmarshalJSON ¶
func (r *AccountFacebookPageGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountFacebookPageService ¶
type AccountFacebookPageService struct {
Options []option.RequestOption
}
AccountFacebookPageService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountFacebookPageService method instead.
func NewAccountFacebookPageService ¶
func NewAccountFacebookPageService(opts ...option.RequestOption) (r *AccountFacebookPageService)
NewAccountFacebookPageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountFacebookPageService) Get ¶
func (r *AccountFacebookPageService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountFacebookPageGetResponse, err error)
Fetch Facebook pages for an account
func (*AccountFacebookPageService) SetDefault ¶
func (r *AccountFacebookPageService) SetDefault(ctx context.Context, id string, body AccountFacebookPageSetDefaultParams, opts ...option.RequestOption) (res *AccountFacebookPageSetDefaultResponse, err error)
Set default Facebook page
type AccountFacebookPageSetDefaultParams ¶
type AccountFacebookPageSetDefaultParams struct {
// Facebook page ID to set as default
PageID param.Field[string] `json:"page_id" api:"required"`
}
func (AccountFacebookPageSetDefaultParams) MarshalJSON ¶
func (r AccountFacebookPageSetDefaultParams) MarshalJSON() (data []byte, err error)
type AccountFacebookPageSetDefaultResponse ¶
type AccountFacebookPageSetDefaultResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountFacebookPageSetDefaultResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountFacebookPageSetDefaultResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountFacebookPageSetDefaultResponseJSON `json:"-"`
}
func (*AccountFacebookPageSetDefaultResponse) UnmarshalJSON ¶
func (r *AccountFacebookPageSetDefaultResponse) UnmarshalJSON(data []byte) (err error)
type AccountFacebookPageSetDefaultResponseGroup ¶
type AccountFacebookPageSetDefaultResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountFacebookPageSetDefaultResponseGroupJSON `json:"-"`
}
Account group
func (*AccountFacebookPageSetDefaultResponseGroup) UnmarshalJSON ¶
func (r *AccountFacebookPageSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountFacebookPageSetDefaultResponsePlatform ¶
type AccountFacebookPageSetDefaultResponsePlatform string
const ( AccountFacebookPageSetDefaultResponsePlatformTwitter AccountFacebookPageSetDefaultResponsePlatform = "twitter" AccountFacebookPageSetDefaultResponsePlatformInstagram AccountFacebookPageSetDefaultResponsePlatform = "instagram" AccountFacebookPageSetDefaultResponsePlatformFacebook AccountFacebookPageSetDefaultResponsePlatform = "facebook" AccountFacebookPageSetDefaultResponsePlatformLinkedin AccountFacebookPageSetDefaultResponsePlatform = "linkedin" AccountFacebookPageSetDefaultResponsePlatformTiktok AccountFacebookPageSetDefaultResponsePlatform = "tiktok" AccountFacebookPageSetDefaultResponsePlatformYoutube AccountFacebookPageSetDefaultResponsePlatform = "youtube" AccountFacebookPageSetDefaultResponsePlatformPinterest AccountFacebookPageSetDefaultResponsePlatform = "pinterest" AccountFacebookPageSetDefaultResponsePlatformReddit AccountFacebookPageSetDefaultResponsePlatform = "reddit" AccountFacebookPageSetDefaultResponsePlatformBluesky AccountFacebookPageSetDefaultResponsePlatform = "bluesky" AccountFacebookPageSetDefaultResponsePlatformThreads AccountFacebookPageSetDefaultResponsePlatform = "threads" AccountFacebookPageSetDefaultResponsePlatformTelegram AccountFacebookPageSetDefaultResponsePlatform = "telegram" AccountFacebookPageSetDefaultResponsePlatformSnapchat AccountFacebookPageSetDefaultResponsePlatform = "snapchat" AccountFacebookPageSetDefaultResponsePlatformGooglebusiness AccountFacebookPageSetDefaultResponsePlatform = "googlebusiness" AccountFacebookPageSetDefaultResponsePlatformWhatsapp AccountFacebookPageSetDefaultResponsePlatform = "whatsapp" AccountFacebookPageSetDefaultResponsePlatformMastodon AccountFacebookPageSetDefaultResponsePlatform = "mastodon" AccountFacebookPageSetDefaultResponsePlatformDiscord AccountFacebookPageSetDefaultResponsePlatform = "discord" AccountFacebookPageSetDefaultResponsePlatformSMS AccountFacebookPageSetDefaultResponsePlatform = "sms" )
func (AccountFacebookPageSetDefaultResponsePlatform) IsKnown ¶
func (r AccountFacebookPageSetDefaultResponsePlatform) IsKnown() bool
type AccountGetResponse ¶
type AccountGetResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountGetResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountGetResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountGetResponseJSON `json:"-"`
}
func (*AccountGetResponse) UnmarshalJSON ¶
func (r *AccountGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseGroup ¶
type AccountGetResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountGetResponseGroupJSON `json:"-"`
}
Account group
func (*AccountGetResponseGroup) UnmarshalJSON ¶
func (r *AccountGetResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountGetResponsePlatform ¶
type AccountGetResponsePlatform string
const ( AccountGetResponsePlatformTwitter AccountGetResponsePlatform = "twitter" AccountGetResponsePlatformInstagram AccountGetResponsePlatform = "instagram" AccountGetResponsePlatformFacebook AccountGetResponsePlatform = "facebook" AccountGetResponsePlatformLinkedin AccountGetResponsePlatform = "linkedin" AccountGetResponsePlatformTiktok AccountGetResponsePlatform = "tiktok" AccountGetResponsePlatformYoutube AccountGetResponsePlatform = "youtube" AccountGetResponsePlatformPinterest AccountGetResponsePlatform = "pinterest" AccountGetResponsePlatformReddit AccountGetResponsePlatform = "reddit" AccountGetResponsePlatformBluesky AccountGetResponsePlatform = "bluesky" AccountGetResponsePlatformThreads AccountGetResponsePlatform = "threads" AccountGetResponsePlatformTelegram AccountGetResponsePlatform = "telegram" AccountGetResponsePlatformSnapchat AccountGetResponsePlatform = "snapchat" AccountGetResponsePlatformGooglebusiness AccountGetResponsePlatform = "googlebusiness" AccountGetResponsePlatformWhatsapp AccountGetResponsePlatform = "whatsapp" AccountGetResponsePlatformMastodon AccountGetResponsePlatform = "mastodon" AccountGetResponsePlatformDiscord AccountGetResponsePlatform = "discord" AccountGetResponsePlatformSMS AccountGetResponsePlatform = "sms" )
func (AccountGetResponsePlatform) IsKnown ¶
func (r AccountGetResponsePlatform) IsKnown() bool
type AccountGmbLocationGetResponse ¶
type AccountGmbLocationGetResponse struct {
Data []AccountGmbLocationGetResponseData `json:"data" api:"required"`
JSON accountGmbLocationGetResponseJSON `json:"-"`
}
func (*AccountGmbLocationGetResponse) UnmarshalJSON ¶
func (r *AccountGmbLocationGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountGmbLocationGetResponseData ¶
type AccountGmbLocationGetResponseData struct {
ID string `json:"id" api:"required"`
Address string `json:"address" api:"required,nullable"`
Name string `json:"name" api:"required"`
JSON accountGmbLocationGetResponseDataJSON `json:"-"`
}
func (*AccountGmbLocationGetResponseData) UnmarshalJSON ¶
func (r *AccountGmbLocationGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountGmbLocationService ¶
type AccountGmbLocationService struct {
Options []option.RequestOption
}
AccountGmbLocationService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountGmbLocationService method instead.
func NewAccountGmbLocationService ¶
func NewAccountGmbLocationService(opts ...option.RequestOption) (r *AccountGmbLocationService)
NewAccountGmbLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountGmbLocationService) Get ¶
func (r *AccountGmbLocationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGmbLocationGetResponse, err error)
Fetch Google My Business locations
func (*AccountGmbLocationService) SetDefault ¶
func (r *AccountGmbLocationService) SetDefault(ctx context.Context, id string, body AccountGmbLocationSetDefaultParams, opts ...option.RequestOption) (res *AccountGmbLocationSetDefaultResponse, err error)
Set default GMB location
type AccountGmbLocationSetDefaultParams ¶
type AccountGmbLocationSetDefaultParams struct {
// Google My Business location ID to set as default
LocationID param.Field[string] `json:"location_id" api:"required"`
}
func (AccountGmbLocationSetDefaultParams) MarshalJSON ¶
func (r AccountGmbLocationSetDefaultParams) MarshalJSON() (data []byte, err error)
type AccountGmbLocationSetDefaultResponse ¶
type AccountGmbLocationSetDefaultResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountGmbLocationSetDefaultResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountGmbLocationSetDefaultResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountGmbLocationSetDefaultResponseJSON `json:"-"`
}
func (*AccountGmbLocationSetDefaultResponse) UnmarshalJSON ¶
func (r *AccountGmbLocationSetDefaultResponse) UnmarshalJSON(data []byte) (err error)
type AccountGmbLocationSetDefaultResponseGroup ¶
type AccountGmbLocationSetDefaultResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountGmbLocationSetDefaultResponseGroupJSON `json:"-"`
}
Account group
func (*AccountGmbLocationSetDefaultResponseGroup) UnmarshalJSON ¶
func (r *AccountGmbLocationSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountGmbLocationSetDefaultResponsePlatform ¶
type AccountGmbLocationSetDefaultResponsePlatform string
const ( AccountGmbLocationSetDefaultResponsePlatformTwitter AccountGmbLocationSetDefaultResponsePlatform = "twitter" AccountGmbLocationSetDefaultResponsePlatformInstagram AccountGmbLocationSetDefaultResponsePlatform = "instagram" AccountGmbLocationSetDefaultResponsePlatformFacebook AccountGmbLocationSetDefaultResponsePlatform = "facebook" AccountGmbLocationSetDefaultResponsePlatformLinkedin AccountGmbLocationSetDefaultResponsePlatform = "linkedin" AccountGmbLocationSetDefaultResponsePlatformTiktok AccountGmbLocationSetDefaultResponsePlatform = "tiktok" AccountGmbLocationSetDefaultResponsePlatformYoutube AccountGmbLocationSetDefaultResponsePlatform = "youtube" AccountGmbLocationSetDefaultResponsePlatformPinterest AccountGmbLocationSetDefaultResponsePlatform = "pinterest" AccountGmbLocationSetDefaultResponsePlatformReddit AccountGmbLocationSetDefaultResponsePlatform = "reddit" AccountGmbLocationSetDefaultResponsePlatformBluesky AccountGmbLocationSetDefaultResponsePlatform = "bluesky" AccountGmbLocationSetDefaultResponsePlatformThreads AccountGmbLocationSetDefaultResponsePlatform = "threads" AccountGmbLocationSetDefaultResponsePlatformTelegram AccountGmbLocationSetDefaultResponsePlatform = "telegram" AccountGmbLocationSetDefaultResponsePlatformSnapchat AccountGmbLocationSetDefaultResponsePlatform = "snapchat" AccountGmbLocationSetDefaultResponsePlatformGooglebusiness AccountGmbLocationSetDefaultResponsePlatform = "googlebusiness" AccountGmbLocationSetDefaultResponsePlatformWhatsapp AccountGmbLocationSetDefaultResponsePlatform = "whatsapp" AccountGmbLocationSetDefaultResponsePlatformMastodon AccountGmbLocationSetDefaultResponsePlatform = "mastodon" AccountGmbLocationSetDefaultResponsePlatformDiscord AccountGmbLocationSetDefaultResponsePlatform = "discord" AccountGmbLocationSetDefaultResponsePlatformSMS AccountGmbLocationSetDefaultResponsePlatform = "sms" )
func (AccountGmbLocationSetDefaultResponsePlatform) IsKnown ¶
func (r AccountGmbLocationSetDefaultResponsePlatform) IsKnown() bool
type AccountGroupListParams ¶
type AccountGroupListParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Page size
Limit param.Field[float64] `query:"limit"`
// Search groups by name
Search param.Field[string] `query:"search"`
}
func (AccountGroupListParams) URLQuery ¶
func (r AccountGroupListParams) URLQuery() (v url.Values)
URLQuery serializes AccountGroupListParams's query parameters as `url.Values`.
type AccountGroupListResponse ¶
type AccountGroupListResponse struct {
Data []AccountGroupListResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON accountGroupListResponseJSON `json:"-"`
}
func (*AccountGroupListResponse) UnmarshalJSON ¶
func (r *AccountGroupListResponse) UnmarshalJSON(data []byte) (err error)
type AccountGroupListResponseData ¶
type AccountGroupListResponseData struct {
// Group ID
ID string `json:"id" api:"required"`
// Number of accounts in this group
AccountCount float64 `json:"account_count" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Group description
Description string `json:"description" api:"required,nullable"`
// Group name
Name string `json:"name" api:"required"`
// Last updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON accountGroupListResponseDataJSON `json:"-"`
}
func (*AccountGroupListResponseData) UnmarshalJSON ¶
func (r *AccountGroupListResponseData) UnmarshalJSON(data []byte) (err error)
type AccountGroupNewParams ¶
type AccountGroupNewParams struct {
// Group name
Name param.Field[string] `json:"name" api:"required"`
// Group description
Description param.Field[string] `json:"description"`
}
func (AccountGroupNewParams) MarshalJSON ¶
func (r AccountGroupNewParams) MarshalJSON() (data []byte, err error)
type AccountGroupNewResponse ¶
type AccountGroupNewResponse struct {
// Group ID
ID string `json:"id" api:"required"`
// Number of accounts in this group
AccountCount float64 `json:"account_count" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Group description
Description string `json:"description" api:"required,nullable"`
// Group name
Name string `json:"name" api:"required"`
// Last updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON accountGroupNewResponseJSON `json:"-"`
}
func (*AccountGroupNewResponse) UnmarshalJSON ¶
func (r *AccountGroupNewResponse) UnmarshalJSON(data []byte) (err error)
type AccountGroupService ¶
type AccountGroupService struct {
Options []option.RequestOption
}
AccountGroupService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountGroupService method instead.
func NewAccountGroupService ¶
func NewAccountGroupService(opts ...option.RequestOption) (r *AccountGroupService)
NewAccountGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountGroupService) Delete ¶
func (r *AccountGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete an account group
func (*AccountGroupService) List ¶
func (r *AccountGroupService) List(ctx context.Context, query AccountGroupListParams, opts ...option.RequestOption) (res *AccountGroupListResponse, err error)
List account groups
func (*AccountGroupService) New ¶
func (r *AccountGroupService) New(ctx context.Context, body AccountGroupNewParams, opts ...option.RequestOption) (res *AccountGroupNewResponse, err error)
Create an account group
func (*AccountGroupService) Update ¶
func (r *AccountGroupService) Update(ctx context.Context, id string, body AccountGroupUpdateParams, opts ...option.RequestOption) (res *AccountGroupUpdateResponse, err error)
Update an account group
type AccountGroupUpdateParams ¶
type AccountGroupUpdateParams struct {
// Group description
Description param.Field[string] `json:"description"`
// Group name
Name param.Field[string] `json:"name"`
}
func (AccountGroupUpdateParams) MarshalJSON ¶
func (r AccountGroupUpdateParams) MarshalJSON() (data []byte, err error)
type AccountGroupUpdateResponse ¶
type AccountGroupUpdateResponse struct {
// Group ID
ID string `json:"id" api:"required"`
// Number of accounts in this group
AccountCount float64 `json:"account_count" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Group description
Description string `json:"description" api:"required,nullable"`
// Group name
Name string `json:"name" api:"required"`
// Last updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON accountGroupUpdateResponseJSON `json:"-"`
}
func (*AccountGroupUpdateResponse) UnmarshalJSON ¶
func (r *AccountGroupUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AccountHealthGetResponse ¶
type AccountHealthGetResponse struct {
ID string `json:"id" api:"required"`
Healthy bool `json:"healthy" api:"required"`
Platform string `json:"platform" api:"required"`
TokenExpiresAt string `json:"token_expires_at" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
Error AccountHealthGetResponseError `json:"error"`
JSON accountHealthGetResponseJSON `json:"-"`
}
func (*AccountHealthGetResponse) UnmarshalJSON ¶
func (r *AccountHealthGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountHealthGetResponseError ¶
type AccountHealthGetResponseError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON accountHealthGetResponseErrorJSON `json:"-"`
}
func (*AccountHealthGetResponseError) UnmarshalJSON ¶
func (r *AccountHealthGetResponseError) UnmarshalJSON(data []byte) (err error)
type AccountHealthListResponse ¶
type AccountHealthListResponse struct {
Data []AccountHealthListResponseData `json:"data" api:"required"`
JSON accountHealthListResponseJSON `json:"-"`
}
func (*AccountHealthListResponse) UnmarshalJSON ¶
func (r *AccountHealthListResponse) UnmarshalJSON(data []byte) (err error)
type AccountHealthListResponseData ¶
type AccountHealthListResponseData struct {
ID string `json:"id" api:"required"`
Healthy bool `json:"healthy" api:"required"`
Platform AccountHealthListResponseDataPlatform `json:"platform" api:"required"`
TokenExpiresAt time.Time `json:"token_expires_at" api:"required,nullable" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
Error AccountHealthListResponseDataError `json:"error"`
JSON accountHealthListResponseDataJSON `json:"-"`
}
func (*AccountHealthListResponseData) UnmarshalJSON ¶
func (r *AccountHealthListResponseData) UnmarshalJSON(data []byte) (err error)
type AccountHealthListResponseDataError ¶
type AccountHealthListResponseDataError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON accountHealthListResponseDataErrorJSON `json:"-"`
}
func (*AccountHealthListResponseDataError) UnmarshalJSON ¶
func (r *AccountHealthListResponseDataError) UnmarshalJSON(data []byte) (err error)
type AccountHealthListResponseDataPlatform ¶
type AccountHealthListResponseDataPlatform string
const ( AccountHealthListResponseDataPlatformTwitter AccountHealthListResponseDataPlatform = "twitter" AccountHealthListResponseDataPlatformInstagram AccountHealthListResponseDataPlatform = "instagram" AccountHealthListResponseDataPlatformFacebook AccountHealthListResponseDataPlatform = "facebook" AccountHealthListResponseDataPlatformLinkedin AccountHealthListResponseDataPlatform = "linkedin" AccountHealthListResponseDataPlatformTiktok AccountHealthListResponseDataPlatform = "tiktok" AccountHealthListResponseDataPlatformYoutube AccountHealthListResponseDataPlatform = "youtube" AccountHealthListResponseDataPlatformPinterest AccountHealthListResponseDataPlatform = "pinterest" AccountHealthListResponseDataPlatformReddit AccountHealthListResponseDataPlatform = "reddit" AccountHealthListResponseDataPlatformBluesky AccountHealthListResponseDataPlatform = "bluesky" AccountHealthListResponseDataPlatformThreads AccountHealthListResponseDataPlatform = "threads" AccountHealthListResponseDataPlatformTelegram AccountHealthListResponseDataPlatform = "telegram" AccountHealthListResponseDataPlatformSnapchat AccountHealthListResponseDataPlatform = "snapchat" AccountHealthListResponseDataPlatformGooglebusiness AccountHealthListResponseDataPlatform = "googlebusiness" AccountHealthListResponseDataPlatformWhatsapp AccountHealthListResponseDataPlatform = "whatsapp" AccountHealthListResponseDataPlatformMastodon AccountHealthListResponseDataPlatform = "mastodon" AccountHealthListResponseDataPlatformDiscord AccountHealthListResponseDataPlatform = "discord" AccountHealthListResponseDataPlatformSMS AccountHealthListResponseDataPlatform = "sms" )
func (AccountHealthListResponseDataPlatform) IsKnown ¶
func (r AccountHealthListResponseDataPlatform) IsKnown() bool
type AccountHealthService ¶
type AccountHealthService struct {
Options []option.RequestOption
}
AccountHealthService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountHealthService method instead.
func NewAccountHealthService ¶
func NewAccountHealthService(opts ...option.RequestOption) (r *AccountHealthService)
NewAccountHealthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountHealthService) Get ¶
func (r *AccountHealthService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountHealthGetResponse, err error)
Check health of a single connected account
func (*AccountHealthService) List ¶
func (r *AccountHealthService) List(ctx context.Context, opts ...option.RequestOption) (res *AccountHealthListResponse, err error)
Check health of all connected accounts
type AccountLinkedinOrganizationGetResponse ¶
type AccountLinkedinOrganizationGetResponse struct {
Data []AccountLinkedinOrganizationGetResponseData `json:"data" api:"required"`
JSON accountLinkedinOrganizationGetResponseJSON `json:"-"`
}
func (*AccountLinkedinOrganizationGetResponse) UnmarshalJSON ¶
func (r *AccountLinkedinOrganizationGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountLinkedinOrganizationGetResponseData ¶
type AccountLinkedinOrganizationGetResponseData struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
VanityName string `json:"vanity_name" api:"required,nullable"`
JSON accountLinkedinOrganizationGetResponseDataJSON `json:"-"`
}
func (*AccountLinkedinOrganizationGetResponseData) UnmarshalJSON ¶
func (r *AccountLinkedinOrganizationGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountLinkedinOrganizationService ¶
type AccountLinkedinOrganizationService struct {
Options []option.RequestOption
}
AccountLinkedinOrganizationService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountLinkedinOrganizationService method instead.
func NewAccountLinkedinOrganizationService ¶
func NewAccountLinkedinOrganizationService(opts ...option.RequestOption) (r *AccountLinkedinOrganizationService)
NewAccountLinkedinOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountLinkedinOrganizationService) Get ¶
func (r *AccountLinkedinOrganizationService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountLinkedinOrganizationGetResponse, err error)
Fetch LinkedIn organizations for an account
func (*AccountLinkedinOrganizationService) SwitchType ¶
func (r *AccountLinkedinOrganizationService) SwitchType(ctx context.Context, id string, body AccountLinkedinOrganizationSwitchTypeParams, opts ...option.RequestOption) (res *AccountLinkedinOrganizationSwitchTypeResponse, err error)
Switch LinkedIn account type
type AccountLinkedinOrganizationSwitchTypeParams ¶
type AccountLinkedinOrganizationSwitchTypeParams struct {
// Account type to switch to
AccountType param.Field[AccountLinkedinOrganizationSwitchTypeParamsAccountType] `json:"account_type" api:"required"`
// LinkedIn organization ID
OrganizationID param.Field[string] `json:"organization_id" api:"required"`
}
func (AccountLinkedinOrganizationSwitchTypeParams) MarshalJSON ¶
func (r AccountLinkedinOrganizationSwitchTypeParams) MarshalJSON() (data []byte, err error)
type AccountLinkedinOrganizationSwitchTypeParamsAccountType ¶
type AccountLinkedinOrganizationSwitchTypeParamsAccountType string
Account type to switch to
const ( AccountLinkedinOrganizationSwitchTypeParamsAccountTypePersonal AccountLinkedinOrganizationSwitchTypeParamsAccountType = "personal" AccountLinkedinOrganizationSwitchTypeParamsAccountTypeOrganization AccountLinkedinOrganizationSwitchTypeParamsAccountType = "organization" )
func (AccountLinkedinOrganizationSwitchTypeParamsAccountType) IsKnown ¶
func (r AccountLinkedinOrganizationSwitchTypeParamsAccountType) IsKnown() bool
type AccountLinkedinOrganizationSwitchTypeResponse ¶
type AccountLinkedinOrganizationSwitchTypeResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountLinkedinOrganizationSwitchTypeResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountLinkedinOrganizationSwitchTypeResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountLinkedinOrganizationSwitchTypeResponseJSON `json:"-"`
}
func (*AccountLinkedinOrganizationSwitchTypeResponse) UnmarshalJSON ¶
func (r *AccountLinkedinOrganizationSwitchTypeResponse) UnmarshalJSON(data []byte) (err error)
type AccountLinkedinOrganizationSwitchTypeResponseGroup ¶
type AccountLinkedinOrganizationSwitchTypeResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountLinkedinOrganizationSwitchTypeResponseGroupJSON `json:"-"`
}
Account group
func (*AccountLinkedinOrganizationSwitchTypeResponseGroup) UnmarshalJSON ¶
func (r *AccountLinkedinOrganizationSwitchTypeResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountLinkedinOrganizationSwitchTypeResponsePlatform ¶
type AccountLinkedinOrganizationSwitchTypeResponsePlatform string
const ( AccountLinkedinOrganizationSwitchTypeResponsePlatformTwitter AccountLinkedinOrganizationSwitchTypeResponsePlatform = "twitter" AccountLinkedinOrganizationSwitchTypeResponsePlatformInstagram AccountLinkedinOrganizationSwitchTypeResponsePlatform = "instagram" AccountLinkedinOrganizationSwitchTypeResponsePlatformFacebook AccountLinkedinOrganizationSwitchTypeResponsePlatform = "facebook" AccountLinkedinOrganizationSwitchTypeResponsePlatformLinkedin AccountLinkedinOrganizationSwitchTypeResponsePlatform = "linkedin" AccountLinkedinOrganizationSwitchTypeResponsePlatformTiktok AccountLinkedinOrganizationSwitchTypeResponsePlatform = "tiktok" AccountLinkedinOrganizationSwitchTypeResponsePlatformYoutube AccountLinkedinOrganizationSwitchTypeResponsePlatform = "youtube" AccountLinkedinOrganizationSwitchTypeResponsePlatformPinterest AccountLinkedinOrganizationSwitchTypeResponsePlatform = "pinterest" AccountLinkedinOrganizationSwitchTypeResponsePlatformReddit AccountLinkedinOrganizationSwitchTypeResponsePlatform = "reddit" AccountLinkedinOrganizationSwitchTypeResponsePlatformBluesky AccountLinkedinOrganizationSwitchTypeResponsePlatform = "bluesky" AccountLinkedinOrganizationSwitchTypeResponsePlatformThreads AccountLinkedinOrganizationSwitchTypeResponsePlatform = "threads" AccountLinkedinOrganizationSwitchTypeResponsePlatformTelegram AccountLinkedinOrganizationSwitchTypeResponsePlatform = "telegram" AccountLinkedinOrganizationSwitchTypeResponsePlatformSnapchat AccountLinkedinOrganizationSwitchTypeResponsePlatform = "snapchat" AccountLinkedinOrganizationSwitchTypeResponsePlatformGooglebusiness AccountLinkedinOrganizationSwitchTypeResponsePlatform = "googlebusiness" AccountLinkedinOrganizationSwitchTypeResponsePlatformWhatsapp AccountLinkedinOrganizationSwitchTypeResponsePlatform = "whatsapp" AccountLinkedinOrganizationSwitchTypeResponsePlatformMastodon AccountLinkedinOrganizationSwitchTypeResponsePlatform = "mastodon" AccountLinkedinOrganizationSwitchTypeResponsePlatformDiscord AccountLinkedinOrganizationSwitchTypeResponsePlatform = "discord" AccountLinkedinOrganizationSwitchTypeResponsePlatformSMS AccountLinkedinOrganizationSwitchTypeResponsePlatform = "sms" )
func (AccountLinkedinOrganizationSwitchTypeResponsePlatform) IsKnown ¶
func (r AccountLinkedinOrganizationSwitchTypeResponsePlatform) IsKnown() bool
type AccountListParams ¶
type AccountListParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Filter by group ID
GroupID param.Field[string] `query:"group_id"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Search by name or username
Search param.Field[string] `query:"search"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
// Only show ungrouped accounts
Ungrouped param.Field[bool] `query:"ungrouped"`
}
func (AccountListParams) URLQuery ¶
func (r AccountListParams) URLQuery() (v url.Values)
URLQuery serializes AccountListParams's query parameters as `url.Values`.
type AccountListResponse ¶
type AccountListResponse struct {
Data []AccountListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON accountListResponseJSON `json:"-"`
}
func (*AccountListResponse) UnmarshalJSON ¶
func (r *AccountListResponse) UnmarshalJSON(data []byte) (err error)
type AccountListResponseData ¶
type AccountListResponseData struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountListResponseDataGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountListResponseDataPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountListResponseDataJSON `json:"-"`
}
func (*AccountListResponseData) UnmarshalJSON ¶
func (r *AccountListResponseData) UnmarshalJSON(data []byte) (err error)
type AccountListResponseDataGroup ¶
type AccountListResponseDataGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountListResponseDataGroupJSON `json:"-"`
}
Account group
func (*AccountListResponseDataGroup) UnmarshalJSON ¶
func (r *AccountListResponseDataGroup) UnmarshalJSON(data []byte) (err error)
type AccountListResponseDataPlatform ¶
type AccountListResponseDataPlatform string
const ( AccountListResponseDataPlatformTwitter AccountListResponseDataPlatform = "twitter" AccountListResponseDataPlatformInstagram AccountListResponseDataPlatform = "instagram" AccountListResponseDataPlatformFacebook AccountListResponseDataPlatform = "facebook" AccountListResponseDataPlatformLinkedin AccountListResponseDataPlatform = "linkedin" AccountListResponseDataPlatformTiktok AccountListResponseDataPlatform = "tiktok" AccountListResponseDataPlatformYoutube AccountListResponseDataPlatform = "youtube" AccountListResponseDataPlatformPinterest AccountListResponseDataPlatform = "pinterest" AccountListResponseDataPlatformReddit AccountListResponseDataPlatform = "reddit" AccountListResponseDataPlatformBluesky AccountListResponseDataPlatform = "bluesky" AccountListResponseDataPlatformThreads AccountListResponseDataPlatform = "threads" AccountListResponseDataPlatformTelegram AccountListResponseDataPlatform = "telegram" AccountListResponseDataPlatformSnapchat AccountListResponseDataPlatform = "snapchat" AccountListResponseDataPlatformGooglebusiness AccountListResponseDataPlatform = "googlebusiness" AccountListResponseDataPlatformWhatsapp AccountListResponseDataPlatform = "whatsapp" AccountListResponseDataPlatformMastodon AccountListResponseDataPlatform = "mastodon" AccountListResponseDataPlatformDiscord AccountListResponseDataPlatform = "discord" AccountListResponseDataPlatformSMS AccountListResponseDataPlatform = "sms" )
func (AccountListResponseDataPlatform) IsKnown ¶
func (r AccountListResponseDataPlatform) IsKnown() bool
type AccountPinterestBoardGetResponse ¶
type AccountPinterestBoardGetResponse struct {
Data []AccountPinterestBoardGetResponseData `json:"data" api:"required"`
JSON accountPinterestBoardGetResponseJSON `json:"-"`
}
func (*AccountPinterestBoardGetResponse) UnmarshalJSON ¶
func (r *AccountPinterestBoardGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountPinterestBoardGetResponseData ¶
type AccountPinterestBoardGetResponseData struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
URL string `json:"url" api:"required,nullable"`
JSON accountPinterestBoardGetResponseDataJSON `json:"-"`
}
func (*AccountPinterestBoardGetResponseData) UnmarshalJSON ¶
func (r *AccountPinterestBoardGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountPinterestBoardService ¶
type AccountPinterestBoardService struct {
Options []option.RequestOption
}
AccountPinterestBoardService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountPinterestBoardService method instead.
func NewAccountPinterestBoardService ¶
func NewAccountPinterestBoardService(opts ...option.RequestOption) (r *AccountPinterestBoardService)
NewAccountPinterestBoardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountPinterestBoardService) Get ¶
func (r *AccountPinterestBoardService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountPinterestBoardGetResponse, err error)
Fetch Pinterest boards for an account
func (*AccountPinterestBoardService) SetDefault ¶
func (r *AccountPinterestBoardService) SetDefault(ctx context.Context, id string, body AccountPinterestBoardSetDefaultParams, opts ...option.RequestOption) (res *AccountPinterestBoardSetDefaultResponse, err error)
Set default Pinterest board
type AccountPinterestBoardSetDefaultParams ¶
type AccountPinterestBoardSetDefaultParams struct {
// Pinterest board ID to set as default
BoardID param.Field[string] `json:"board_id" api:"required"`
}
func (AccountPinterestBoardSetDefaultParams) MarshalJSON ¶
func (r AccountPinterestBoardSetDefaultParams) MarshalJSON() (data []byte, err error)
type AccountPinterestBoardSetDefaultResponse ¶
type AccountPinterestBoardSetDefaultResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountPinterestBoardSetDefaultResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountPinterestBoardSetDefaultResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountPinterestBoardSetDefaultResponseJSON `json:"-"`
}
func (*AccountPinterestBoardSetDefaultResponse) UnmarshalJSON ¶
func (r *AccountPinterestBoardSetDefaultResponse) UnmarshalJSON(data []byte) (err error)
type AccountPinterestBoardSetDefaultResponseGroup ¶
type AccountPinterestBoardSetDefaultResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountPinterestBoardSetDefaultResponseGroupJSON `json:"-"`
}
Account group
func (*AccountPinterestBoardSetDefaultResponseGroup) UnmarshalJSON ¶
func (r *AccountPinterestBoardSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountPinterestBoardSetDefaultResponsePlatform ¶
type AccountPinterestBoardSetDefaultResponsePlatform string
const ( AccountPinterestBoardSetDefaultResponsePlatformTwitter AccountPinterestBoardSetDefaultResponsePlatform = "twitter" AccountPinterestBoardSetDefaultResponsePlatformInstagram AccountPinterestBoardSetDefaultResponsePlatform = "instagram" AccountPinterestBoardSetDefaultResponsePlatformFacebook AccountPinterestBoardSetDefaultResponsePlatform = "facebook" AccountPinterestBoardSetDefaultResponsePlatformLinkedin AccountPinterestBoardSetDefaultResponsePlatform = "linkedin" AccountPinterestBoardSetDefaultResponsePlatformTiktok AccountPinterestBoardSetDefaultResponsePlatform = "tiktok" AccountPinterestBoardSetDefaultResponsePlatformYoutube AccountPinterestBoardSetDefaultResponsePlatform = "youtube" AccountPinterestBoardSetDefaultResponsePlatformPinterest AccountPinterestBoardSetDefaultResponsePlatform = "pinterest" AccountPinterestBoardSetDefaultResponsePlatformReddit AccountPinterestBoardSetDefaultResponsePlatform = "reddit" AccountPinterestBoardSetDefaultResponsePlatformBluesky AccountPinterestBoardSetDefaultResponsePlatform = "bluesky" AccountPinterestBoardSetDefaultResponsePlatformThreads AccountPinterestBoardSetDefaultResponsePlatform = "threads" AccountPinterestBoardSetDefaultResponsePlatformTelegram AccountPinterestBoardSetDefaultResponsePlatform = "telegram" AccountPinterestBoardSetDefaultResponsePlatformSnapchat AccountPinterestBoardSetDefaultResponsePlatform = "snapchat" AccountPinterestBoardSetDefaultResponsePlatformGooglebusiness AccountPinterestBoardSetDefaultResponsePlatform = "googlebusiness" AccountPinterestBoardSetDefaultResponsePlatformWhatsapp AccountPinterestBoardSetDefaultResponsePlatform = "whatsapp" AccountPinterestBoardSetDefaultResponsePlatformMastodon AccountPinterestBoardSetDefaultResponsePlatform = "mastodon" AccountPinterestBoardSetDefaultResponsePlatformDiscord AccountPinterestBoardSetDefaultResponsePlatform = "discord" AccountPinterestBoardSetDefaultResponsePlatformSMS AccountPinterestBoardSetDefaultResponsePlatform = "sms" )
func (AccountPinterestBoardSetDefaultResponsePlatform) IsKnown ¶
func (r AccountPinterestBoardSetDefaultResponsePlatform) IsKnown() bool
type AccountRedditFlairGetParams ¶
type AccountRedditFlairGetParams struct {
// Subreddit name
Subreddit param.Field[string] `query:"subreddit" api:"required"`
}
func (AccountRedditFlairGetParams) URLQuery ¶
func (r AccountRedditFlairGetParams) URLQuery() (v url.Values)
URLQuery serializes AccountRedditFlairGetParams's query parameters as `url.Values`.
type AccountRedditFlairGetResponse ¶
type AccountRedditFlairGetResponse struct {
Data []AccountRedditFlairGetResponseData `json:"data" api:"required"`
JSON accountRedditFlairGetResponseJSON `json:"-"`
}
func (*AccountRedditFlairGetResponse) UnmarshalJSON ¶
func (r *AccountRedditFlairGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountRedditFlairGetResponseData ¶
type AccountRedditFlairGetResponseData struct {
ID string `json:"id" api:"required"`
Text string `json:"text" api:"required"`
JSON accountRedditFlairGetResponseDataJSON `json:"-"`
}
func (*AccountRedditFlairGetResponseData) UnmarshalJSON ¶
func (r *AccountRedditFlairGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountRedditFlairService ¶
type AccountRedditFlairService struct {
Options []option.RequestOption
}
AccountRedditFlairService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountRedditFlairService method instead.
func NewAccountRedditFlairService ¶
func NewAccountRedditFlairService(opts ...option.RequestOption) (r *AccountRedditFlairService)
NewAccountRedditFlairService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountRedditFlairService) Get ¶
func (r *AccountRedditFlairService) Get(ctx context.Context, id string, query AccountRedditFlairGetParams, opts ...option.RequestOption) (res *AccountRedditFlairGetResponse, err error)
Fetch Reddit flairs for a subreddit
type AccountRedditSubredditGetResponse ¶
type AccountRedditSubredditGetResponse struct {
Data []AccountRedditSubredditGetResponseData `json:"data" api:"required"`
JSON accountRedditSubredditGetResponseJSON `json:"-"`
}
func (*AccountRedditSubredditGetResponse) UnmarshalJSON ¶
func (r *AccountRedditSubredditGetResponse) UnmarshalJSON(data []byte) (err error)
type AccountRedditSubredditGetResponseData ¶
type AccountRedditSubredditGetResponseData struct {
DisplayName string `json:"display_name" api:"required"`
Name string `json:"name" api:"required"`
Subscribers float64 `json:"subscribers" api:"required,nullable"`
JSON accountRedditSubredditGetResponseDataJSON `json:"-"`
}
func (*AccountRedditSubredditGetResponseData) UnmarshalJSON ¶
func (r *AccountRedditSubredditGetResponseData) UnmarshalJSON(data []byte) (err error)
type AccountRedditSubredditService ¶
type AccountRedditSubredditService struct {
Options []option.RequestOption
}
AccountRedditSubredditService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountRedditSubredditService method instead.
func NewAccountRedditSubredditService ¶
func NewAccountRedditSubredditService(opts ...option.RequestOption) (r *AccountRedditSubredditService)
NewAccountRedditSubredditService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountRedditSubredditService) Get ¶
func (r *AccountRedditSubredditService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountRedditSubredditGetResponse, err error)
Fetch Reddit subreddits for an account
func (*AccountRedditSubredditService) SetDefault ¶
func (r *AccountRedditSubredditService) SetDefault(ctx context.Context, id string, body AccountRedditSubredditSetDefaultParams, opts ...option.RequestOption) (res *AccountRedditSubredditSetDefaultResponse, err error)
Set default Reddit subreddit
type AccountRedditSubredditSetDefaultParams ¶
type AccountRedditSubredditSetDefaultParams struct {
// Subreddit name to set as default
Subreddit param.Field[string] `json:"subreddit" api:"required"`
}
func (AccountRedditSubredditSetDefaultParams) MarshalJSON ¶
func (r AccountRedditSubredditSetDefaultParams) MarshalJSON() (data []byte, err error)
type AccountRedditSubredditSetDefaultResponse ¶
type AccountRedditSubredditSetDefaultResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountRedditSubredditSetDefaultResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountRedditSubredditSetDefaultResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountRedditSubredditSetDefaultResponseJSON `json:"-"`
}
func (*AccountRedditSubredditSetDefaultResponse) UnmarshalJSON ¶
func (r *AccountRedditSubredditSetDefaultResponse) UnmarshalJSON(data []byte) (err error)
type AccountRedditSubredditSetDefaultResponseGroup ¶
type AccountRedditSubredditSetDefaultResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountRedditSubredditSetDefaultResponseGroupJSON `json:"-"`
}
Account group
func (*AccountRedditSubredditSetDefaultResponseGroup) UnmarshalJSON ¶
func (r *AccountRedditSubredditSetDefaultResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountRedditSubredditSetDefaultResponsePlatform ¶
type AccountRedditSubredditSetDefaultResponsePlatform string
const ( AccountRedditSubredditSetDefaultResponsePlatformTwitter AccountRedditSubredditSetDefaultResponsePlatform = "twitter" AccountRedditSubredditSetDefaultResponsePlatformInstagram AccountRedditSubredditSetDefaultResponsePlatform = "instagram" AccountRedditSubredditSetDefaultResponsePlatformFacebook AccountRedditSubredditSetDefaultResponsePlatform = "facebook" AccountRedditSubredditSetDefaultResponsePlatformLinkedin AccountRedditSubredditSetDefaultResponsePlatform = "linkedin" AccountRedditSubredditSetDefaultResponsePlatformTiktok AccountRedditSubredditSetDefaultResponsePlatform = "tiktok" AccountRedditSubredditSetDefaultResponsePlatformYoutube AccountRedditSubredditSetDefaultResponsePlatform = "youtube" AccountRedditSubredditSetDefaultResponsePlatformPinterest AccountRedditSubredditSetDefaultResponsePlatform = "pinterest" AccountRedditSubredditSetDefaultResponsePlatformReddit AccountRedditSubredditSetDefaultResponsePlatform = "reddit" AccountRedditSubredditSetDefaultResponsePlatformBluesky AccountRedditSubredditSetDefaultResponsePlatform = "bluesky" AccountRedditSubredditSetDefaultResponsePlatformThreads AccountRedditSubredditSetDefaultResponsePlatform = "threads" AccountRedditSubredditSetDefaultResponsePlatformTelegram AccountRedditSubredditSetDefaultResponsePlatform = "telegram" AccountRedditSubredditSetDefaultResponsePlatformSnapchat AccountRedditSubredditSetDefaultResponsePlatform = "snapchat" AccountRedditSubredditSetDefaultResponsePlatformGooglebusiness AccountRedditSubredditSetDefaultResponsePlatform = "googlebusiness" AccountRedditSubredditSetDefaultResponsePlatformWhatsapp AccountRedditSubredditSetDefaultResponsePlatform = "whatsapp" AccountRedditSubredditSetDefaultResponsePlatformMastodon AccountRedditSubredditSetDefaultResponsePlatform = "mastodon" AccountRedditSubredditSetDefaultResponsePlatformDiscord AccountRedditSubredditSetDefaultResponsePlatform = "discord" AccountRedditSubredditSetDefaultResponsePlatformSMS AccountRedditSubredditSetDefaultResponsePlatform = "sms" )
func (AccountRedditSubredditSetDefaultResponsePlatform) IsKnown ¶
func (r AccountRedditSubredditSetDefaultResponsePlatform) IsKnown() bool
type AccountService ¶
type AccountService struct {
Options []option.RequestOption
Health *AccountHealthService
RedditFlairs *AccountRedditFlairService
FacebookPages *AccountFacebookPageService
LinkedinOrganizations *AccountLinkedinOrganizationService
PinterestBoards *AccountPinterestBoardService
RedditSubreddits *AccountRedditSubredditService
GmbLocations *AccountGmbLocationService
}
AccountService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AccountService) Delete ¶
func (r *AccountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Disconnect a social account
func (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGetResponse, err error)
Get a connected account
func (*AccountService) List ¶
func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *AccountListResponse, err error)
List connected accounts
func (*AccountService) Update ¶
func (r *AccountService) Update(ctx context.Context, id string, body AccountUpdateParams, opts ...option.RequestOption) (res *AccountUpdateResponse, err error)
Update account metadata
type AccountUpdateParams ¶
type AccountUpdateParams struct {
DisplayName param.Field[string] `json:"display_name"`
// Group ID (null to ungroup)
GroupID param.Field[string] `json:"group_id"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
}
func (AccountUpdateParams) MarshalJSON ¶
func (r AccountUpdateParams) MarshalJSON() (data []byte, err error)
type AccountUpdateResponse ¶
type AccountUpdateResponse struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group AccountUpdateResponseGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform AccountUpdateResponsePlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON accountUpdateResponseJSON `json:"-"`
}
func (*AccountUpdateResponse) UnmarshalJSON ¶
func (r *AccountUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AccountUpdateResponseGroup ¶
type AccountUpdateResponseGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON accountUpdateResponseGroupJSON `json:"-"`
}
Account group
func (*AccountUpdateResponseGroup) UnmarshalJSON ¶
func (r *AccountUpdateResponseGroup) UnmarshalJSON(data []byte) (err error)
type AccountUpdateResponsePlatform ¶
type AccountUpdateResponsePlatform string
const ( AccountUpdateResponsePlatformTwitter AccountUpdateResponsePlatform = "twitter" AccountUpdateResponsePlatformInstagram AccountUpdateResponsePlatform = "instagram" AccountUpdateResponsePlatformFacebook AccountUpdateResponsePlatform = "facebook" AccountUpdateResponsePlatformLinkedin AccountUpdateResponsePlatform = "linkedin" AccountUpdateResponsePlatformTiktok AccountUpdateResponsePlatform = "tiktok" AccountUpdateResponsePlatformYoutube AccountUpdateResponsePlatform = "youtube" AccountUpdateResponsePlatformPinterest AccountUpdateResponsePlatform = "pinterest" AccountUpdateResponsePlatformReddit AccountUpdateResponsePlatform = "reddit" AccountUpdateResponsePlatformBluesky AccountUpdateResponsePlatform = "bluesky" AccountUpdateResponsePlatformThreads AccountUpdateResponsePlatform = "threads" AccountUpdateResponsePlatformTelegram AccountUpdateResponsePlatform = "telegram" AccountUpdateResponsePlatformSnapchat AccountUpdateResponsePlatform = "snapchat" AccountUpdateResponsePlatformGooglebusiness AccountUpdateResponsePlatform = "googlebusiness" AccountUpdateResponsePlatformWhatsapp AccountUpdateResponsePlatform = "whatsapp" AccountUpdateResponsePlatformMastodon AccountUpdateResponsePlatform = "mastodon" AccountUpdateResponsePlatformDiscord AccountUpdateResponsePlatform = "discord" AccountUpdateResponsePlatformSMS AccountUpdateResponsePlatform = "sms" )
func (AccountUpdateResponsePlatform) IsKnown ¶
func (r AccountUpdateResponsePlatform) IsKnown() bool
type AnalyticsGetBestTimeParams ¶
type AnalyticsGetBestTimeParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Start date (ISO 8601)
FromDate param.Field[string] `query:"from_date"`
// Filter by platform
Platform param.Field[AnalyticsGetBestTimeParamsPlatform] `query:"platform"`
// End date (ISO 8601)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsGetBestTimeParams) URLQuery ¶
func (r AnalyticsGetBestTimeParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsGetBestTimeParams's query parameters as `url.Values`.
type AnalyticsGetBestTimeParamsPlatform ¶
type AnalyticsGetBestTimeParamsPlatform string
Filter by platform
const ( AnalyticsGetBestTimeParamsPlatformTwitter AnalyticsGetBestTimeParamsPlatform = "twitter" AnalyticsGetBestTimeParamsPlatformInstagram AnalyticsGetBestTimeParamsPlatform = "instagram" AnalyticsGetBestTimeParamsPlatformFacebook AnalyticsGetBestTimeParamsPlatform = "facebook" AnalyticsGetBestTimeParamsPlatformLinkedin AnalyticsGetBestTimeParamsPlatform = "linkedin" AnalyticsGetBestTimeParamsPlatformTiktok AnalyticsGetBestTimeParamsPlatform = "tiktok" AnalyticsGetBestTimeParamsPlatformYoutube AnalyticsGetBestTimeParamsPlatform = "youtube" AnalyticsGetBestTimeParamsPlatformPinterest AnalyticsGetBestTimeParamsPlatform = "pinterest" AnalyticsGetBestTimeParamsPlatformReddit AnalyticsGetBestTimeParamsPlatform = "reddit" AnalyticsGetBestTimeParamsPlatformBluesky AnalyticsGetBestTimeParamsPlatform = "bluesky" AnalyticsGetBestTimeParamsPlatformThreads AnalyticsGetBestTimeParamsPlatform = "threads" AnalyticsGetBestTimeParamsPlatformTelegram AnalyticsGetBestTimeParamsPlatform = "telegram" AnalyticsGetBestTimeParamsPlatformSnapchat AnalyticsGetBestTimeParamsPlatform = "snapchat" AnalyticsGetBestTimeParamsPlatformGooglebusiness AnalyticsGetBestTimeParamsPlatform = "googlebusiness" AnalyticsGetBestTimeParamsPlatformWhatsapp AnalyticsGetBestTimeParamsPlatform = "whatsapp" AnalyticsGetBestTimeParamsPlatformMastodon AnalyticsGetBestTimeParamsPlatform = "mastodon" AnalyticsGetBestTimeParamsPlatformDiscord AnalyticsGetBestTimeParamsPlatform = "discord" AnalyticsGetBestTimeParamsPlatformSMS AnalyticsGetBestTimeParamsPlatform = "sms" )
func (AnalyticsGetBestTimeParamsPlatform) IsKnown ¶
func (r AnalyticsGetBestTimeParamsPlatform) IsKnown() bool
type AnalyticsGetBestTimeResponse ¶
type AnalyticsGetBestTimeResponse struct {
Data []AnalyticsGetBestTimeResponseData `json:"data" api:"required"`
JSON analyticsGetBestTimeResponseJSON `json:"-"`
}
func (*AnalyticsGetBestTimeResponse) UnmarshalJSON ¶
func (r *AnalyticsGetBestTimeResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetBestTimeResponseData ¶
type AnalyticsGetBestTimeResponseData struct {
// Average engagement score
AvgEngagement float64 `json:"avg_engagement" api:"required"`
// Day of week (0=Sunday)
DayOfWeek int64 `json:"day_of_week" api:"required"`
// Hour in UTC
HourUtc int64 `json:"hour_utc" api:"required"`
// Number of posts analyzed
PostCount float64 `json:"post_count" api:"required"`
JSON analyticsGetBestTimeResponseDataJSON `json:"-"`
}
func (*AnalyticsGetBestTimeResponseData) UnmarshalJSON ¶
func (r *AnalyticsGetBestTimeResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetContentDecayParams ¶
type AnalyticsGetContentDecayParams struct {
// Post ID to analyze decay for
PostID param.Field[string] `query:"post_id" api:"required"`
// Number of days to analyze
Days param.Field[int64] `query:"days"`
}
func (AnalyticsGetContentDecayParams) URLQuery ¶
func (r AnalyticsGetContentDecayParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsGetContentDecayParams's query parameters as `url.Values`.
type AnalyticsGetContentDecayResponse ¶
type AnalyticsGetContentDecayResponse struct {
Data []AnalyticsGetContentDecayResponseData `json:"data" api:"required"`
// Days until engagement halved
HalfLifeDays float64 `json:"half_life_days" api:"required,nullable"`
Platform AnalyticsGetContentDecayResponsePlatform `json:"platform" api:"required"`
PostID string `json:"post_id" api:"required"`
JSON analyticsGetContentDecayResponseJSON `json:"-"`
}
func (*AnalyticsGetContentDecayResponse) UnmarshalJSON ¶
func (r *AnalyticsGetContentDecayResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetContentDecayResponseData ¶
type AnalyticsGetContentDecayResponseData struct {
// Cumulative engagement
CumulativeEngagement float64 `json:"cumulative_engagement" api:"required"`
// Cumulative impressions
CumulativeImpressions float64 `json:"cumulative_impressions" api:"required"`
// Days since publication
Day float64 `json:"day" api:"required"`
// Engagement on this day
Engagement float64 `json:"engagement" api:"required"`
// Impressions on this day
Impressions float64 `json:"impressions" api:"required"`
JSON analyticsGetContentDecayResponseDataJSON `json:"-"`
}
func (*AnalyticsGetContentDecayResponseData) UnmarshalJSON ¶
func (r *AnalyticsGetContentDecayResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetContentDecayResponsePlatform ¶
type AnalyticsGetContentDecayResponsePlatform string
const ( AnalyticsGetContentDecayResponsePlatformTwitter AnalyticsGetContentDecayResponsePlatform = "twitter" AnalyticsGetContentDecayResponsePlatformInstagram AnalyticsGetContentDecayResponsePlatform = "instagram" AnalyticsGetContentDecayResponsePlatformFacebook AnalyticsGetContentDecayResponsePlatform = "facebook" AnalyticsGetContentDecayResponsePlatformLinkedin AnalyticsGetContentDecayResponsePlatform = "linkedin" AnalyticsGetContentDecayResponsePlatformTiktok AnalyticsGetContentDecayResponsePlatform = "tiktok" AnalyticsGetContentDecayResponsePlatformYoutube AnalyticsGetContentDecayResponsePlatform = "youtube" AnalyticsGetContentDecayResponsePlatformPinterest AnalyticsGetContentDecayResponsePlatform = "pinterest" AnalyticsGetContentDecayResponsePlatformReddit AnalyticsGetContentDecayResponsePlatform = "reddit" AnalyticsGetContentDecayResponsePlatformBluesky AnalyticsGetContentDecayResponsePlatform = "bluesky" AnalyticsGetContentDecayResponsePlatformThreads AnalyticsGetContentDecayResponsePlatform = "threads" AnalyticsGetContentDecayResponsePlatformTelegram AnalyticsGetContentDecayResponsePlatform = "telegram" AnalyticsGetContentDecayResponsePlatformSnapchat AnalyticsGetContentDecayResponsePlatform = "snapchat" AnalyticsGetContentDecayResponsePlatformGooglebusiness AnalyticsGetContentDecayResponsePlatform = "googlebusiness" AnalyticsGetContentDecayResponsePlatformWhatsapp AnalyticsGetContentDecayResponsePlatform = "whatsapp" AnalyticsGetContentDecayResponsePlatformMastodon AnalyticsGetContentDecayResponsePlatform = "mastodon" AnalyticsGetContentDecayResponsePlatformDiscord AnalyticsGetContentDecayResponsePlatform = "discord" AnalyticsGetContentDecayResponsePlatformSMS AnalyticsGetContentDecayResponsePlatform = "sms" )
func (AnalyticsGetContentDecayResponsePlatform) IsKnown ¶
func (r AnalyticsGetContentDecayResponsePlatform) IsKnown() bool
type AnalyticsGetParams ¶
type AnalyticsGetParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Start date (ISO 8601 date string)
FromDate param.Field[string] `query:"from_date"`
// Number of items
Limit param.Field[int64] `query:"limit"`
// Offset
Offset param.Field[int64] `query:"offset"`
// Filter by platform
Platform param.Field[AnalyticsGetParamsPlatform] `query:"platform"`
// Filter by post ID
PostID param.Field[string] `query:"post_id"`
// End date (ISO 8601 date string)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsGetParams) URLQuery ¶
func (r AnalyticsGetParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsGetParams's query parameters as `url.Values`.
type AnalyticsGetParamsPlatform ¶
type AnalyticsGetParamsPlatform string
Filter by platform
const ( AnalyticsGetParamsPlatformTwitter AnalyticsGetParamsPlatform = "twitter" AnalyticsGetParamsPlatformInstagram AnalyticsGetParamsPlatform = "instagram" AnalyticsGetParamsPlatformFacebook AnalyticsGetParamsPlatform = "facebook" AnalyticsGetParamsPlatformLinkedin AnalyticsGetParamsPlatform = "linkedin" AnalyticsGetParamsPlatformTiktok AnalyticsGetParamsPlatform = "tiktok" AnalyticsGetParamsPlatformYoutube AnalyticsGetParamsPlatform = "youtube" AnalyticsGetParamsPlatformPinterest AnalyticsGetParamsPlatform = "pinterest" AnalyticsGetParamsPlatformReddit AnalyticsGetParamsPlatform = "reddit" AnalyticsGetParamsPlatformBluesky AnalyticsGetParamsPlatform = "bluesky" AnalyticsGetParamsPlatformThreads AnalyticsGetParamsPlatform = "threads" AnalyticsGetParamsPlatformTelegram AnalyticsGetParamsPlatform = "telegram" AnalyticsGetParamsPlatformSnapchat AnalyticsGetParamsPlatform = "snapchat" AnalyticsGetParamsPlatformGooglebusiness AnalyticsGetParamsPlatform = "googlebusiness" AnalyticsGetParamsPlatformWhatsapp AnalyticsGetParamsPlatform = "whatsapp" AnalyticsGetParamsPlatformMastodon AnalyticsGetParamsPlatform = "mastodon" AnalyticsGetParamsPlatformDiscord AnalyticsGetParamsPlatform = "discord" AnalyticsGetParamsPlatformSMS AnalyticsGetParamsPlatform = "sms" )
func (AnalyticsGetParamsPlatform) IsKnown ¶
func (r AnalyticsGetParamsPlatform) IsKnown() bool
type AnalyticsGetPostTimelineParams ¶
type AnalyticsGetPostTimelineParams struct {
// Post ID
PostID param.Field[string] `query:"post_id" api:"required"`
// Start date (ISO 8601)
FromDate param.Field[string] `query:"from_date"`
// End date (ISO 8601)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsGetPostTimelineParams) URLQuery ¶
func (r AnalyticsGetPostTimelineParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsGetPostTimelineParams's query parameters as `url.Values`.
type AnalyticsGetPostTimelineResponse ¶
type AnalyticsGetPostTimelineResponse struct {
Data []AnalyticsGetPostTimelineResponseData `json:"data" api:"required"`
PostID string `json:"post_id" api:"required"`
JSON analyticsGetPostTimelineResponseJSON `json:"-"`
}
func (*AnalyticsGetPostTimelineResponse) UnmarshalJSON ¶
func (r *AnalyticsGetPostTimelineResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetPostTimelineResponseData ¶
type AnalyticsGetPostTimelineResponseData struct {
Clicks float64 `json:"clicks" api:"required"`
Comments float64 `json:"comments" api:"required"`
// Date (YYYY-MM-DD)
Date string `json:"date" api:"required"`
Impressions float64 `json:"impressions" api:"required"`
Likes float64 `json:"likes" api:"required"`
Views float64 `json:"views" api:"required"`
JSON analyticsGetPostTimelineResponseDataJSON `json:"-"`
}
func (*AnalyticsGetPostTimelineResponseData) UnmarshalJSON ¶
func (r *AnalyticsGetPostTimelineResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetPostingFrequencyParams ¶
type AnalyticsGetPostingFrequencyParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Start date (ISO 8601)
FromDate param.Field[string] `query:"from_date"`
// Filter by platform
Platform param.Field[AnalyticsGetPostingFrequencyParamsPlatform] `query:"platform"`
// End date (ISO 8601)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsGetPostingFrequencyParams) URLQuery ¶
func (r AnalyticsGetPostingFrequencyParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsGetPostingFrequencyParams's query parameters as `url.Values`.
type AnalyticsGetPostingFrequencyParamsPlatform ¶
type AnalyticsGetPostingFrequencyParamsPlatform string
Filter by platform
const ( AnalyticsGetPostingFrequencyParamsPlatformTwitter AnalyticsGetPostingFrequencyParamsPlatform = "twitter" AnalyticsGetPostingFrequencyParamsPlatformInstagram AnalyticsGetPostingFrequencyParamsPlatform = "instagram" AnalyticsGetPostingFrequencyParamsPlatformFacebook AnalyticsGetPostingFrequencyParamsPlatform = "facebook" AnalyticsGetPostingFrequencyParamsPlatformLinkedin AnalyticsGetPostingFrequencyParamsPlatform = "linkedin" AnalyticsGetPostingFrequencyParamsPlatformTiktok AnalyticsGetPostingFrequencyParamsPlatform = "tiktok" AnalyticsGetPostingFrequencyParamsPlatformYoutube AnalyticsGetPostingFrequencyParamsPlatform = "youtube" AnalyticsGetPostingFrequencyParamsPlatformPinterest AnalyticsGetPostingFrequencyParamsPlatform = "pinterest" AnalyticsGetPostingFrequencyParamsPlatformReddit AnalyticsGetPostingFrequencyParamsPlatform = "reddit" AnalyticsGetPostingFrequencyParamsPlatformBluesky AnalyticsGetPostingFrequencyParamsPlatform = "bluesky" AnalyticsGetPostingFrequencyParamsPlatformThreads AnalyticsGetPostingFrequencyParamsPlatform = "threads" AnalyticsGetPostingFrequencyParamsPlatformTelegram AnalyticsGetPostingFrequencyParamsPlatform = "telegram" AnalyticsGetPostingFrequencyParamsPlatformSnapchat AnalyticsGetPostingFrequencyParamsPlatform = "snapchat" AnalyticsGetPostingFrequencyParamsPlatformGooglebusiness AnalyticsGetPostingFrequencyParamsPlatform = "googlebusiness" AnalyticsGetPostingFrequencyParamsPlatformWhatsapp AnalyticsGetPostingFrequencyParamsPlatform = "whatsapp" AnalyticsGetPostingFrequencyParamsPlatformMastodon AnalyticsGetPostingFrequencyParamsPlatform = "mastodon" AnalyticsGetPostingFrequencyParamsPlatformDiscord AnalyticsGetPostingFrequencyParamsPlatform = "discord" AnalyticsGetPostingFrequencyParamsPlatformSMS AnalyticsGetPostingFrequencyParamsPlatform = "sms" )
func (AnalyticsGetPostingFrequencyParamsPlatform) IsKnown ¶
func (r AnalyticsGetPostingFrequencyParamsPlatform) IsKnown() bool
type AnalyticsGetPostingFrequencyResponse ¶
type AnalyticsGetPostingFrequencyResponse struct {
Data []AnalyticsGetPostingFrequencyResponseData `json:"data" api:"required"`
// Recommended posts per week
OptimalFrequency float64 `json:"optimal_frequency" api:"required,nullable"`
JSON analyticsGetPostingFrequencyResponseJSON `json:"-"`
}
func (*AnalyticsGetPostingFrequencyResponse) UnmarshalJSON ¶
func (r *AnalyticsGetPostingFrequencyResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetPostingFrequencyResponseData ¶
type AnalyticsGetPostingFrequencyResponseData struct {
// Average engagement
AvgEngagement float64 `json:"avg_engagement" api:"required"`
// Average impressions
AvgImpressions float64 `json:"avg_impressions" api:"required"`
// Average posts per week in bucket
PostsPerWeek float64 `json:"posts_per_week" api:"required"`
// Number of weeks in sample
SampleWeeks float64 `json:"sample_weeks" api:"required"`
JSON analyticsGetPostingFrequencyResponseDataJSON `json:"-"`
}
func (*AnalyticsGetPostingFrequencyResponseData) UnmarshalJSON ¶
func (r *AnalyticsGetPostingFrequencyResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetResponse ¶
type AnalyticsGetResponse struct {
Data []AnalyticsGetResponseData `json:"data" api:"required"`
Overview AnalyticsGetResponseOverview `json:"overview"`
JSON analyticsGetResponseJSON `json:"-"`
}
func (*AnalyticsGetResponse) UnmarshalJSON ¶
func (r *AnalyticsGetResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetResponseData ¶
type AnalyticsGetResponseData struct {
Platform AnalyticsGetResponseDataPlatform `json:"platform" api:"required"`
// Post ID
PostID string `json:"post_id" api:"required"`
// Published timestamp
PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
// Total clicks
Clicks float64 `json:"clicks" api:"nullable"`
// Total comments
Comments float64 `json:"comments" api:"nullable"`
// Total impressions
Impressions float64 `json:"impressions" api:"nullable"`
// Total likes
Likes float64 `json:"likes" api:"nullable"`
// Total reach
Reach float64 `json:"reach" api:"nullable"`
// Total saves
Saves float64 `json:"saves" api:"nullable"`
Shares float64 `json:"shares" api:"nullable"`
// Total views
Views float64 `json:"views" api:"nullable"`
JSON analyticsGetResponseDataJSON `json:"-"`
}
func (*AnalyticsGetResponseData) UnmarshalJSON ¶
func (r *AnalyticsGetResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsGetResponseDataPlatform ¶
type AnalyticsGetResponseDataPlatform string
const ( AnalyticsGetResponseDataPlatformTwitter AnalyticsGetResponseDataPlatform = "twitter" AnalyticsGetResponseDataPlatformInstagram AnalyticsGetResponseDataPlatform = "instagram" AnalyticsGetResponseDataPlatformFacebook AnalyticsGetResponseDataPlatform = "facebook" AnalyticsGetResponseDataPlatformLinkedin AnalyticsGetResponseDataPlatform = "linkedin" AnalyticsGetResponseDataPlatformTiktok AnalyticsGetResponseDataPlatform = "tiktok" AnalyticsGetResponseDataPlatformYoutube AnalyticsGetResponseDataPlatform = "youtube" AnalyticsGetResponseDataPlatformPinterest AnalyticsGetResponseDataPlatform = "pinterest" AnalyticsGetResponseDataPlatformReddit AnalyticsGetResponseDataPlatform = "reddit" AnalyticsGetResponseDataPlatformBluesky AnalyticsGetResponseDataPlatform = "bluesky" AnalyticsGetResponseDataPlatformThreads AnalyticsGetResponseDataPlatform = "threads" AnalyticsGetResponseDataPlatformTelegram AnalyticsGetResponseDataPlatform = "telegram" AnalyticsGetResponseDataPlatformSnapchat AnalyticsGetResponseDataPlatform = "snapchat" AnalyticsGetResponseDataPlatformGooglebusiness AnalyticsGetResponseDataPlatform = "googlebusiness" AnalyticsGetResponseDataPlatformWhatsapp AnalyticsGetResponseDataPlatform = "whatsapp" AnalyticsGetResponseDataPlatformMastodon AnalyticsGetResponseDataPlatform = "mastodon" AnalyticsGetResponseDataPlatformDiscord AnalyticsGetResponseDataPlatform = "discord" AnalyticsGetResponseDataPlatformSMS AnalyticsGetResponseDataPlatform = "sms" )
func (AnalyticsGetResponseDataPlatform) IsKnown ¶
func (r AnalyticsGetResponseDataPlatform) IsKnown() bool
type AnalyticsGetResponseOverview ¶
type AnalyticsGetResponseOverview struct {
// Total clicks across posts
TotalClicks float64 `json:"total_clicks" api:"required"`
// Total comments across posts
TotalComments float64 `json:"total_comments" api:"required"`
// Total impressions across posts
TotalImpressions float64 `json:"total_impressions" api:"required"`
// Total likes across posts
TotalLikes float64 `json:"total_likes" api:"required"`
// Total number of posts
TotalPosts float64 `json:"total_posts" api:"required"`
TotalShares float64 `json:"total_shares" api:"required"`
// Total views across posts
TotalViews float64 `json:"total_views" api:"required"`
JSON analyticsGetResponseOverviewJSON `json:"-"`
}
func (*AnalyticsGetResponseOverview) UnmarshalJSON ¶
func (r *AnalyticsGetResponseOverview) UnmarshalJSON(data []byte) (err error)
type AnalyticsListDailyMetricsParams ¶
type AnalyticsListDailyMetricsParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Start date (ISO 8601)
FromDate param.Field[string] `query:"from_date"`
// Filter by platform
Platform param.Field[AnalyticsListDailyMetricsParamsPlatform] `query:"platform"`
// End date (ISO 8601)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsListDailyMetricsParams) URLQuery ¶
func (r AnalyticsListDailyMetricsParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsListDailyMetricsParams's query parameters as `url.Values`.
type AnalyticsListDailyMetricsParamsPlatform ¶
type AnalyticsListDailyMetricsParamsPlatform string
Filter by platform
const ( AnalyticsListDailyMetricsParamsPlatformTwitter AnalyticsListDailyMetricsParamsPlatform = "twitter" AnalyticsListDailyMetricsParamsPlatformInstagram AnalyticsListDailyMetricsParamsPlatform = "instagram" AnalyticsListDailyMetricsParamsPlatformFacebook AnalyticsListDailyMetricsParamsPlatform = "facebook" AnalyticsListDailyMetricsParamsPlatformLinkedin AnalyticsListDailyMetricsParamsPlatform = "linkedin" AnalyticsListDailyMetricsParamsPlatformTiktok AnalyticsListDailyMetricsParamsPlatform = "tiktok" AnalyticsListDailyMetricsParamsPlatformYoutube AnalyticsListDailyMetricsParamsPlatform = "youtube" AnalyticsListDailyMetricsParamsPlatformPinterest AnalyticsListDailyMetricsParamsPlatform = "pinterest" AnalyticsListDailyMetricsParamsPlatformReddit AnalyticsListDailyMetricsParamsPlatform = "reddit" AnalyticsListDailyMetricsParamsPlatformBluesky AnalyticsListDailyMetricsParamsPlatform = "bluesky" AnalyticsListDailyMetricsParamsPlatformThreads AnalyticsListDailyMetricsParamsPlatform = "threads" AnalyticsListDailyMetricsParamsPlatformTelegram AnalyticsListDailyMetricsParamsPlatform = "telegram" AnalyticsListDailyMetricsParamsPlatformSnapchat AnalyticsListDailyMetricsParamsPlatform = "snapchat" AnalyticsListDailyMetricsParamsPlatformGooglebusiness AnalyticsListDailyMetricsParamsPlatform = "googlebusiness" AnalyticsListDailyMetricsParamsPlatformWhatsapp AnalyticsListDailyMetricsParamsPlatform = "whatsapp" AnalyticsListDailyMetricsParamsPlatformMastodon AnalyticsListDailyMetricsParamsPlatform = "mastodon" AnalyticsListDailyMetricsParamsPlatformDiscord AnalyticsListDailyMetricsParamsPlatform = "discord" AnalyticsListDailyMetricsParamsPlatformSMS AnalyticsListDailyMetricsParamsPlatform = "sms" )
func (AnalyticsListDailyMetricsParamsPlatform) IsKnown ¶
func (r AnalyticsListDailyMetricsParamsPlatform) IsKnown() bool
type AnalyticsListDailyMetricsResponse ¶
type AnalyticsListDailyMetricsResponse struct {
Data []AnalyticsListDailyMetricsResponseData `json:"data" api:"required"`
JSON analyticsListDailyMetricsResponseJSON `json:"-"`
}
func (*AnalyticsListDailyMetricsResponse) UnmarshalJSON ¶
func (r *AnalyticsListDailyMetricsResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsListDailyMetricsResponseData ¶
type AnalyticsListDailyMetricsResponseData struct {
// Total clicks
Clicks float64 `json:"clicks" api:"required"`
// Total comments
Comments float64 `json:"comments" api:"required"`
// Date (YYYY-MM-DD)
Date string `json:"date" api:"required"`
// Total impressions
Impressions float64 `json:"impressions" api:"required"`
// Total likes
Likes float64 `json:"likes" api:"required"`
// Post count per platform
Platforms map[string]float64 `json:"platforms" api:"required"`
// Posts published on this date
PostCount float64 `json:"post_count" api:"required"`
Shares float64 `json:"shares" api:"required"`
// Total views
Views float64 `json:"views" api:"required"`
JSON analyticsListDailyMetricsResponseDataJSON `json:"-"`
}
func (*AnalyticsListDailyMetricsResponseData) UnmarshalJSON ¶
func (r *AnalyticsListDailyMetricsResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsService ¶
type AnalyticsService struct {
Options []option.RequestOption
Youtube *AnalyticsYoutubeService
}
AnalyticsService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnalyticsService method instead.
func NewAnalyticsService ¶
func NewAnalyticsService(opts ...option.RequestOption) (r *AnalyticsService)
NewAnalyticsService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AnalyticsService) Get ¶
func (r *AnalyticsService) Get(ctx context.Context, query AnalyticsGetParams, opts ...option.RequestOption) (res *AnalyticsGetResponse, err error)
Get post analytics
func (*AnalyticsService) GetBestTime ¶
func (r *AnalyticsService) GetBestTime(ctx context.Context, query AnalyticsGetBestTimeParams, opts ...option.RequestOption) (res *AnalyticsGetBestTimeResponse, err error)
Get best posting times based on engagement
func (*AnalyticsService) GetContentDecay ¶
func (r *AnalyticsService) GetContentDecay(ctx context.Context, query AnalyticsGetContentDecayParams, opts ...option.RequestOption) (res *AnalyticsGetContentDecayResponse, err error)
Get engagement decay curve for a post
func (*AnalyticsService) GetPostTimeline ¶
func (r *AnalyticsService) GetPostTimeline(ctx context.Context, query AnalyticsGetPostTimelineParams, opts ...option.RequestOption) (res *AnalyticsGetPostTimelineResponse, err error)
Get per-post daily timeline of metrics
func (*AnalyticsService) GetPostingFrequency ¶
func (r *AnalyticsService) GetPostingFrequency(ctx context.Context, query AnalyticsGetPostingFrequencyParams, opts ...option.RequestOption) (res *AnalyticsGetPostingFrequencyResponse, err error)
Get posting frequency vs engagement analysis
func (*AnalyticsService) ListDailyMetrics ¶
func (r *AnalyticsService) ListDailyMetrics(ctx context.Context, query AnalyticsListDailyMetricsParams, opts ...option.RequestOption) (res *AnalyticsListDailyMetricsResponse, err error)
Get daily aggregated metrics
type AnalyticsYoutubeGetDailyViewsParams ¶
type AnalyticsYoutubeGetDailyViewsParams struct {
// YouTube account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
// Start date (ISO 8601)
FromDate param.Field[string] `query:"from_date"`
// End date (ISO 8601)
ToDate param.Field[string] `query:"to_date"`
}
func (AnalyticsYoutubeGetDailyViewsParams) URLQuery ¶
func (r AnalyticsYoutubeGetDailyViewsParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsYoutubeGetDailyViewsParams's query parameters as `url.Values`.
type AnalyticsYoutubeGetDailyViewsResponse ¶
type AnalyticsYoutubeGetDailyViewsResponse struct {
Data []AnalyticsYoutubeGetDailyViewsResponseData `json:"data" api:"required"`
JSON analyticsYoutubeGetDailyViewsResponseJSON `json:"-"`
}
func (*AnalyticsYoutubeGetDailyViewsResponse) UnmarshalJSON ¶
func (r *AnalyticsYoutubeGetDailyViewsResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsYoutubeGetDailyViewsResponseData ¶
type AnalyticsYoutubeGetDailyViewsResponseData struct {
// Date (YYYY-MM-DD)
Date string `json:"date" api:"required"`
// Net subscribers gained
SubscribersGained float64 `json:"subscribers_gained" api:"required"`
// Total views
Views float64 `json:"views" api:"required"`
// Watch time in minutes
WatchTimeMinutes float64 `json:"watch_time_minutes" api:"required"`
JSON analyticsYoutubeGetDailyViewsResponseDataJSON `json:"-"`
}
func (*AnalyticsYoutubeGetDailyViewsResponseData) UnmarshalJSON ¶
func (r *AnalyticsYoutubeGetDailyViewsResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsYoutubeService ¶
type AnalyticsYoutubeService struct {
Options []option.RequestOption
}
AnalyticsYoutubeService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnalyticsYoutubeService method instead.
func NewAnalyticsYoutubeService ¶
func NewAnalyticsYoutubeService(opts ...option.RequestOption) (r *AnalyticsYoutubeService)
NewAnalyticsYoutubeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AnalyticsYoutubeService) GetDailyViews ¶
func (r *AnalyticsYoutubeService) GetDailyViews(ctx context.Context, query AnalyticsYoutubeGetDailyViewsParams, opts ...option.RequestOption) (res *AnalyticsYoutubeGetDailyViewsResponse, err error)
Get YouTube daily views and watch time
type Client ¶
type Client struct {
Options []option.RequestOption
Posts *PostService
Accounts *AccountService
Media *MediaService
Webhooks *WebhookService
APIKeys *APIKeyService
Usage *UsageService
AccountGroups *AccountGroupService
Connect *ConnectService
Connections *ConnectionService
Analytics *AnalyticsService
Tools *ToolService
Queue *QueueService
Twitter *TwitterService
Inbox *InboxService
Reddit *RedditService
Whatsapp *WhatsappService
}
Client creates a struct with services and top level methods that help with interacting with the relay API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (RELAY_API_KEY, RELAY_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ConnectCompleteOAuthCallbackParams ¶
type ConnectCompleteOAuthCallbackParams struct {
// OAuth authorization code
Code param.Field[string] `json:"code" api:"required"`
// Redirect URL used during the OAuth flow (must match)
RedirectURL param.Field[string] `json:"redirect_url" format:"uri"`
}
func (ConnectCompleteOAuthCallbackParams) MarshalJSON ¶
func (r ConnectCompleteOAuthCallbackParams) MarshalJSON() (data []byte, err error)
type ConnectCompleteOAuthCallbackParamsPlatform ¶
type ConnectCompleteOAuthCallbackParamsPlatform string
OAuth platform to complete
const ( ConnectCompleteOAuthCallbackParamsPlatformTwitter ConnectCompleteOAuthCallbackParamsPlatform = "twitter" ConnectCompleteOAuthCallbackParamsPlatformInstagram ConnectCompleteOAuthCallbackParamsPlatform = "instagram" ConnectCompleteOAuthCallbackParamsPlatformFacebook ConnectCompleteOAuthCallbackParamsPlatform = "facebook" ConnectCompleteOAuthCallbackParamsPlatformLinkedin ConnectCompleteOAuthCallbackParamsPlatform = "linkedin" ConnectCompleteOAuthCallbackParamsPlatformTiktok ConnectCompleteOAuthCallbackParamsPlatform = "tiktok" ConnectCompleteOAuthCallbackParamsPlatformYoutube ConnectCompleteOAuthCallbackParamsPlatform = "youtube" ConnectCompleteOAuthCallbackParamsPlatformPinterest ConnectCompleteOAuthCallbackParamsPlatform = "pinterest" ConnectCompleteOAuthCallbackParamsPlatformReddit ConnectCompleteOAuthCallbackParamsPlatform = "reddit" ConnectCompleteOAuthCallbackParamsPlatformThreads ConnectCompleteOAuthCallbackParamsPlatform = "threads" ConnectCompleteOAuthCallbackParamsPlatformSnapchat ConnectCompleteOAuthCallbackParamsPlatform = "snapchat" ConnectCompleteOAuthCallbackParamsPlatformGooglebusiness ConnectCompleteOAuthCallbackParamsPlatform = "googlebusiness" ConnectCompleteOAuthCallbackParamsPlatformMastodon ConnectCompleteOAuthCallbackParamsPlatform = "mastodon" )
func (ConnectCompleteOAuthCallbackParamsPlatform) IsKnown ¶
func (r ConnectCompleteOAuthCallbackParamsPlatform) IsKnown() bool
type ConnectCompleteOAuthCallbackResponse ¶
type ConnectCompleteOAuthCallbackResponse struct {
Account ConnectCompleteOAuthCallbackResponseAccount `json:"account" api:"required"`
JSON connectCompleteOAuthCallbackResponseJSON `json:"-"`
}
func (*ConnectCompleteOAuthCallbackResponse) UnmarshalJSON ¶
func (r *ConnectCompleteOAuthCallbackResponse) UnmarshalJSON(data []byte) (err error)
type ConnectCompleteOAuthCallbackResponseAccount ¶
type ConnectCompleteOAuthCallbackResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectCompleteOAuthCallbackResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectCompleteOAuthCallbackResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectCompleteOAuthCallbackResponseAccountJSON `json:"-"`
}
func (*ConnectCompleteOAuthCallbackResponseAccount) UnmarshalJSON ¶
func (r *ConnectCompleteOAuthCallbackResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectCompleteOAuthCallbackResponseAccountGroup ¶
type ConnectCompleteOAuthCallbackResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectCompleteOAuthCallbackResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectCompleteOAuthCallbackResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectCompleteOAuthCallbackResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectCompleteOAuthCallbackResponseAccountPlatform ¶
type ConnectCompleteOAuthCallbackResponseAccountPlatform string
const ( ConnectCompleteOAuthCallbackResponseAccountPlatformTwitter ConnectCompleteOAuthCallbackResponseAccountPlatform = "twitter" ConnectCompleteOAuthCallbackResponseAccountPlatformInstagram ConnectCompleteOAuthCallbackResponseAccountPlatform = "instagram" ConnectCompleteOAuthCallbackResponseAccountPlatformFacebook ConnectCompleteOAuthCallbackResponseAccountPlatform = "facebook" ConnectCompleteOAuthCallbackResponseAccountPlatformLinkedin ConnectCompleteOAuthCallbackResponseAccountPlatform = "linkedin" ConnectCompleteOAuthCallbackResponseAccountPlatformTiktok ConnectCompleteOAuthCallbackResponseAccountPlatform = "tiktok" ConnectCompleteOAuthCallbackResponseAccountPlatformYoutube ConnectCompleteOAuthCallbackResponseAccountPlatform = "youtube" ConnectCompleteOAuthCallbackResponseAccountPlatformPinterest ConnectCompleteOAuthCallbackResponseAccountPlatform = "pinterest" ConnectCompleteOAuthCallbackResponseAccountPlatformReddit ConnectCompleteOAuthCallbackResponseAccountPlatform = "reddit" ConnectCompleteOAuthCallbackResponseAccountPlatformBluesky ConnectCompleteOAuthCallbackResponseAccountPlatform = "bluesky" ConnectCompleteOAuthCallbackResponseAccountPlatformThreads ConnectCompleteOAuthCallbackResponseAccountPlatform = "threads" ConnectCompleteOAuthCallbackResponseAccountPlatformTelegram ConnectCompleteOAuthCallbackResponseAccountPlatform = "telegram" ConnectCompleteOAuthCallbackResponseAccountPlatformSnapchat ConnectCompleteOAuthCallbackResponseAccountPlatform = "snapchat" ConnectCompleteOAuthCallbackResponseAccountPlatformGooglebusiness ConnectCompleteOAuthCallbackResponseAccountPlatform = "googlebusiness" ConnectCompleteOAuthCallbackResponseAccountPlatformWhatsapp ConnectCompleteOAuthCallbackResponseAccountPlatform = "whatsapp" ConnectCompleteOAuthCallbackResponseAccountPlatformMastodon ConnectCompleteOAuthCallbackResponseAccountPlatform = "mastodon" ConnectCompleteOAuthCallbackResponseAccountPlatformDiscord ConnectCompleteOAuthCallbackResponseAccountPlatform = "discord" ConnectCompleteOAuthCallbackResponseAccountPlatformSMS ConnectCompleteOAuthCallbackResponseAccountPlatform = "sms" )
func (ConnectCompleteOAuthCallbackResponseAccountPlatform) IsKnown ¶
func (r ConnectCompleteOAuthCallbackResponseAccountPlatform) IsKnown() bool
type ConnectFacebookPageListResponse ¶
type ConnectFacebookPageListResponse struct {
Pages []ConnectFacebookPageListResponsePage `json:"pages" api:"required"`
JSON connectFacebookPageListResponseJSON `json:"-"`
}
func (*ConnectFacebookPageListResponse) UnmarshalJSON ¶
func (r *ConnectFacebookPageListResponse) UnmarshalJSON(data []byte) (err error)
type ConnectFacebookPageListResponsePage ¶
type ConnectFacebookPageListResponsePage struct {
// Facebook page ID
ID string `json:"id" api:"required"`
// Page name
Name string `json:"name" api:"required"`
// Page category
Category string `json:"category" api:"nullable"`
// Page profile picture URL
PictureURL string `json:"picture_url" api:"nullable"`
JSON connectFacebookPageListResponsePageJSON `json:"-"`
}
func (*ConnectFacebookPageListResponsePage) UnmarshalJSON ¶
func (r *ConnectFacebookPageListResponsePage) UnmarshalJSON(data []byte) (err error)
type ConnectFacebookPageSelectParams ¶
type ConnectFacebookPageSelectParams struct {
// Token from pending data or OAuth flow
ConnectToken param.Field[string] `json:"connect_token" api:"required"`
// Selected Facebook page ID
PageID param.Field[string] `json:"page_id" api:"required"`
}
func (ConnectFacebookPageSelectParams) MarshalJSON ¶
func (r ConnectFacebookPageSelectParams) MarshalJSON() (data []byte, err error)
type ConnectFacebookPageSelectResponse ¶
type ConnectFacebookPageSelectResponse struct {
Account ConnectFacebookPageSelectResponseAccount `json:"account" api:"required"`
JSON connectFacebookPageSelectResponseJSON `json:"-"`
}
func (*ConnectFacebookPageSelectResponse) UnmarshalJSON ¶
func (r *ConnectFacebookPageSelectResponse) UnmarshalJSON(data []byte) (err error)
type ConnectFacebookPageSelectResponseAccount ¶
type ConnectFacebookPageSelectResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectFacebookPageSelectResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectFacebookPageSelectResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectFacebookPageSelectResponseAccountJSON `json:"-"`
}
func (*ConnectFacebookPageSelectResponseAccount) UnmarshalJSON ¶
func (r *ConnectFacebookPageSelectResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectFacebookPageSelectResponseAccountGroup ¶
type ConnectFacebookPageSelectResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectFacebookPageSelectResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectFacebookPageSelectResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectFacebookPageSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectFacebookPageSelectResponseAccountPlatform ¶
type ConnectFacebookPageSelectResponseAccountPlatform string
const ( ConnectFacebookPageSelectResponseAccountPlatformTwitter ConnectFacebookPageSelectResponseAccountPlatform = "twitter" ConnectFacebookPageSelectResponseAccountPlatformInstagram ConnectFacebookPageSelectResponseAccountPlatform = "instagram" ConnectFacebookPageSelectResponseAccountPlatformFacebook ConnectFacebookPageSelectResponseAccountPlatform = "facebook" ConnectFacebookPageSelectResponseAccountPlatformLinkedin ConnectFacebookPageSelectResponseAccountPlatform = "linkedin" ConnectFacebookPageSelectResponseAccountPlatformTiktok ConnectFacebookPageSelectResponseAccountPlatform = "tiktok" ConnectFacebookPageSelectResponseAccountPlatformYoutube ConnectFacebookPageSelectResponseAccountPlatform = "youtube" ConnectFacebookPageSelectResponseAccountPlatformPinterest ConnectFacebookPageSelectResponseAccountPlatform = "pinterest" ConnectFacebookPageSelectResponseAccountPlatformReddit ConnectFacebookPageSelectResponseAccountPlatform = "reddit" ConnectFacebookPageSelectResponseAccountPlatformBluesky ConnectFacebookPageSelectResponseAccountPlatform = "bluesky" ConnectFacebookPageSelectResponseAccountPlatformThreads ConnectFacebookPageSelectResponseAccountPlatform = "threads" ConnectFacebookPageSelectResponseAccountPlatformTelegram ConnectFacebookPageSelectResponseAccountPlatform = "telegram" ConnectFacebookPageSelectResponseAccountPlatformSnapchat ConnectFacebookPageSelectResponseAccountPlatform = "snapchat" ConnectFacebookPageSelectResponseAccountPlatformGooglebusiness ConnectFacebookPageSelectResponseAccountPlatform = "googlebusiness" ConnectFacebookPageSelectResponseAccountPlatformWhatsapp ConnectFacebookPageSelectResponseAccountPlatform = "whatsapp" ConnectFacebookPageSelectResponseAccountPlatformMastodon ConnectFacebookPageSelectResponseAccountPlatform = "mastodon" ConnectFacebookPageSelectResponseAccountPlatformDiscord ConnectFacebookPageSelectResponseAccountPlatform = "discord" ConnectFacebookPageSelectResponseAccountPlatformSMS ConnectFacebookPageSelectResponseAccountPlatform = "sms" )
func (ConnectFacebookPageSelectResponseAccountPlatform) IsKnown ¶
func (r ConnectFacebookPageSelectResponseAccountPlatform) IsKnown() bool
type ConnectFacebookPageService ¶
type ConnectFacebookPageService struct {
Options []option.RequestOption
}
ConnectFacebookPageService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectFacebookPageService method instead.
func NewConnectFacebookPageService ¶
func NewConnectFacebookPageService(opts ...option.RequestOption) (r *ConnectFacebookPageService)
NewConnectFacebookPageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectFacebookPageService) List ¶
func (r *ConnectFacebookPageService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectFacebookPageListResponse, err error)
List Facebook Pages after OAuth
func (*ConnectFacebookPageService) Select ¶
func (r *ConnectFacebookPageService) Select(ctx context.Context, body ConnectFacebookPageSelectParams, opts ...option.RequestOption) (res *ConnectFacebookPageSelectResponse, err error)
Select Facebook Page to connect
type ConnectFacebookService ¶
type ConnectFacebookService struct {
Options []option.RequestOption
Pages *ConnectFacebookPageService
}
ConnectFacebookService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectFacebookService method instead.
func NewConnectFacebookService ¶
func NewConnectFacebookService(opts ...option.RequestOption) (r *ConnectFacebookService)
NewConnectFacebookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectFetchPendingDataParams ¶
type ConnectFetchPendingDataParams struct {
// Temporary token from headless OAuth flow
Token param.Field[string] `query:"token" api:"required"`
}
func (ConnectFetchPendingDataParams) URLQuery ¶
func (r ConnectFetchPendingDataParams) URLQuery() (v url.Values)
URLQuery serializes ConnectFetchPendingDataParams's query parameters as `url.Values`.
type ConnectFetchPendingDataResponse ¶
type ConnectFetchPendingDataResponse struct {
Platform ConnectFetchPendingDataResponsePlatform `json:"platform" api:"required"`
// Token to use for secondary selection
TempToken string `json:"temp_token" api:"required"`
// Basic user profile from the platform
UserProfile ConnectFetchPendingDataResponseUserProfile `json:"user_profile" api:"required"`
// Pinterest boards available
Boards []map[string]interface{} `json:"boards"`
// Google Business locations available
Locations []map[string]interface{} `json:"locations"`
// LinkedIn organizations available
Organizations []map[string]interface{} `json:"organizations"`
// Facebook pages available
Pages []map[string]interface{} `json:"pages"`
// Snapchat profiles available
Profiles []map[string]interface{} `json:"profiles"`
JSON connectFetchPendingDataResponseJSON `json:"-"`
}
func (*ConnectFetchPendingDataResponse) UnmarshalJSON ¶
func (r *ConnectFetchPendingDataResponse) UnmarshalJSON(data []byte) (err error)
type ConnectFetchPendingDataResponsePlatform ¶
type ConnectFetchPendingDataResponsePlatform string
const ( ConnectFetchPendingDataResponsePlatformTwitter ConnectFetchPendingDataResponsePlatform = "twitter" ConnectFetchPendingDataResponsePlatformInstagram ConnectFetchPendingDataResponsePlatform = "instagram" ConnectFetchPendingDataResponsePlatformFacebook ConnectFetchPendingDataResponsePlatform = "facebook" ConnectFetchPendingDataResponsePlatformLinkedin ConnectFetchPendingDataResponsePlatform = "linkedin" ConnectFetchPendingDataResponsePlatformTiktok ConnectFetchPendingDataResponsePlatform = "tiktok" ConnectFetchPendingDataResponsePlatformYoutube ConnectFetchPendingDataResponsePlatform = "youtube" ConnectFetchPendingDataResponsePlatformPinterest ConnectFetchPendingDataResponsePlatform = "pinterest" ConnectFetchPendingDataResponsePlatformReddit ConnectFetchPendingDataResponsePlatform = "reddit" ConnectFetchPendingDataResponsePlatformBluesky ConnectFetchPendingDataResponsePlatform = "bluesky" ConnectFetchPendingDataResponsePlatformThreads ConnectFetchPendingDataResponsePlatform = "threads" ConnectFetchPendingDataResponsePlatformTelegram ConnectFetchPendingDataResponsePlatform = "telegram" ConnectFetchPendingDataResponsePlatformSnapchat ConnectFetchPendingDataResponsePlatform = "snapchat" ConnectFetchPendingDataResponsePlatformGooglebusiness ConnectFetchPendingDataResponsePlatform = "googlebusiness" ConnectFetchPendingDataResponsePlatformWhatsapp ConnectFetchPendingDataResponsePlatform = "whatsapp" ConnectFetchPendingDataResponsePlatformMastodon ConnectFetchPendingDataResponsePlatform = "mastodon" ConnectFetchPendingDataResponsePlatformDiscord ConnectFetchPendingDataResponsePlatform = "discord" ConnectFetchPendingDataResponsePlatformSMS ConnectFetchPendingDataResponsePlatform = "sms" )
func (ConnectFetchPendingDataResponsePlatform) IsKnown ¶
func (r ConnectFetchPendingDataResponsePlatform) IsKnown() bool
type ConnectFetchPendingDataResponseUserProfile ¶
type ConnectFetchPendingDataResponseUserProfile struct {
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
Name string `json:"name" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON connectFetchPendingDataResponseUserProfileJSON `json:"-"`
}
Basic user profile from the platform
func (*ConnectFetchPendingDataResponseUserProfile) UnmarshalJSON ¶
func (r *ConnectFetchPendingDataResponseUserProfile) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationListResponse ¶
type ConnectGooglebusinessLocationListResponse struct {
Locations []ConnectGooglebusinessLocationListResponseLocation `json:"locations" api:"required"`
JSON connectGooglebusinessLocationListResponseJSON `json:"-"`
}
func (*ConnectGooglebusinessLocationListResponse) UnmarshalJSON ¶
func (r *ConnectGooglebusinessLocationListResponse) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationListResponseLocation ¶
type ConnectGooglebusinessLocationListResponseLocation struct {
// Google Business location ID
ID string `json:"id" api:"required"`
// Business name
Name string `json:"name" api:"required"`
// Business address
Address string `json:"address" api:"nullable"`
// Business phone number
Phone string `json:"phone" api:"nullable"`
JSON connectGooglebusinessLocationListResponseLocationJSON `json:"-"`
}
func (*ConnectGooglebusinessLocationListResponseLocation) UnmarshalJSON ¶
func (r *ConnectGooglebusinessLocationListResponseLocation) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationSelectParams ¶
type ConnectGooglebusinessLocationSelectParams struct {
// Token from pending data or OAuth flow
ConnectToken param.Field[string] `json:"connect_token" api:"required"`
// Selected Google Business location ID
LocationID param.Field[string] `json:"location_id" api:"required"`
}
func (ConnectGooglebusinessLocationSelectParams) MarshalJSON ¶
func (r ConnectGooglebusinessLocationSelectParams) MarshalJSON() (data []byte, err error)
type ConnectGooglebusinessLocationSelectResponse ¶
type ConnectGooglebusinessLocationSelectResponse struct {
Account ConnectGooglebusinessLocationSelectResponseAccount `json:"account" api:"required"`
JSON connectGooglebusinessLocationSelectResponseJSON `json:"-"`
}
func (*ConnectGooglebusinessLocationSelectResponse) UnmarshalJSON ¶
func (r *ConnectGooglebusinessLocationSelectResponse) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationSelectResponseAccount ¶
type ConnectGooglebusinessLocationSelectResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectGooglebusinessLocationSelectResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectGooglebusinessLocationSelectResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectGooglebusinessLocationSelectResponseAccountJSON `json:"-"`
}
func (*ConnectGooglebusinessLocationSelectResponseAccount) UnmarshalJSON ¶
func (r *ConnectGooglebusinessLocationSelectResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationSelectResponseAccountGroup ¶
type ConnectGooglebusinessLocationSelectResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectGooglebusinessLocationSelectResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectGooglebusinessLocationSelectResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectGooglebusinessLocationSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectGooglebusinessLocationSelectResponseAccountPlatform ¶
type ConnectGooglebusinessLocationSelectResponseAccountPlatform string
const ( ConnectGooglebusinessLocationSelectResponseAccountPlatformTwitter ConnectGooglebusinessLocationSelectResponseAccountPlatform = "twitter" ConnectGooglebusinessLocationSelectResponseAccountPlatformInstagram ConnectGooglebusinessLocationSelectResponseAccountPlatform = "instagram" ConnectGooglebusinessLocationSelectResponseAccountPlatformFacebook ConnectGooglebusinessLocationSelectResponseAccountPlatform = "facebook" ConnectGooglebusinessLocationSelectResponseAccountPlatformLinkedin ConnectGooglebusinessLocationSelectResponseAccountPlatform = "linkedin" ConnectGooglebusinessLocationSelectResponseAccountPlatformTiktok ConnectGooglebusinessLocationSelectResponseAccountPlatform = "tiktok" ConnectGooglebusinessLocationSelectResponseAccountPlatformYoutube ConnectGooglebusinessLocationSelectResponseAccountPlatform = "youtube" ConnectGooglebusinessLocationSelectResponseAccountPlatformPinterest ConnectGooglebusinessLocationSelectResponseAccountPlatform = "pinterest" ConnectGooglebusinessLocationSelectResponseAccountPlatformReddit ConnectGooglebusinessLocationSelectResponseAccountPlatform = "reddit" ConnectGooglebusinessLocationSelectResponseAccountPlatformBluesky ConnectGooglebusinessLocationSelectResponseAccountPlatform = "bluesky" ConnectGooglebusinessLocationSelectResponseAccountPlatformThreads ConnectGooglebusinessLocationSelectResponseAccountPlatform = "threads" ConnectGooglebusinessLocationSelectResponseAccountPlatformTelegram ConnectGooglebusinessLocationSelectResponseAccountPlatform = "telegram" ConnectGooglebusinessLocationSelectResponseAccountPlatformSnapchat ConnectGooglebusinessLocationSelectResponseAccountPlatform = "snapchat" ConnectGooglebusinessLocationSelectResponseAccountPlatformGooglebusiness ConnectGooglebusinessLocationSelectResponseAccountPlatform = "googlebusiness" ConnectGooglebusinessLocationSelectResponseAccountPlatformWhatsapp ConnectGooglebusinessLocationSelectResponseAccountPlatform = "whatsapp" ConnectGooglebusinessLocationSelectResponseAccountPlatformMastodon ConnectGooglebusinessLocationSelectResponseAccountPlatform = "mastodon" ConnectGooglebusinessLocationSelectResponseAccountPlatformDiscord ConnectGooglebusinessLocationSelectResponseAccountPlatform = "discord" ConnectGooglebusinessLocationSelectResponseAccountPlatformSMS ConnectGooglebusinessLocationSelectResponseAccountPlatform = "sms" )
func (ConnectGooglebusinessLocationSelectResponseAccountPlatform) IsKnown ¶
func (r ConnectGooglebusinessLocationSelectResponseAccountPlatform) IsKnown() bool
type ConnectGooglebusinessLocationService ¶
type ConnectGooglebusinessLocationService struct {
Options []option.RequestOption
}
ConnectGooglebusinessLocationService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectGooglebusinessLocationService method instead.
func NewConnectGooglebusinessLocationService ¶
func NewConnectGooglebusinessLocationService(opts ...option.RequestOption) (r *ConnectGooglebusinessLocationService)
NewConnectGooglebusinessLocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectGooglebusinessLocationService) List ¶
func (r *ConnectGooglebusinessLocationService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectGooglebusinessLocationListResponse, err error)
List Google Business locations after OAuth
func (*ConnectGooglebusinessLocationService) Select ¶
func (r *ConnectGooglebusinessLocationService) Select(ctx context.Context, body ConnectGooglebusinessLocationSelectParams, opts ...option.RequestOption) (res *ConnectGooglebusinessLocationSelectResponse, err error)
Select Google Business location
type ConnectGooglebusinessService ¶
type ConnectGooglebusinessService struct {
Options []option.RequestOption
Locations *ConnectGooglebusinessLocationService
}
ConnectGooglebusinessService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectGooglebusinessService method instead.
func NewConnectGooglebusinessService ¶
func NewConnectGooglebusinessService(opts ...option.RequestOption) (r *ConnectGooglebusinessService)
NewConnectGooglebusinessService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectLinkedinOrganizationListResponse ¶
type ConnectLinkedinOrganizationListResponse struct {
Organizations []ConnectLinkedinOrganizationListResponseOrganization `json:"organizations" api:"required"`
// User's personal LinkedIn profile
PersonalProfile ConnectLinkedinOrganizationListResponsePersonalProfile `json:"personal_profile"`
JSON connectLinkedinOrganizationListResponseJSON `json:"-"`
}
func (*ConnectLinkedinOrganizationListResponse) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationListResponse) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationListResponseOrganization ¶
type ConnectLinkedinOrganizationListResponseOrganization struct {
// Organization name
Name string `json:"name" api:"required"`
// LinkedIn organization URN
Urn string `json:"urn" api:"required"`
// Organization logo URL
LogoURL string `json:"logo_url" api:"nullable"`
// Organization vanity name
VanityName string `json:"vanity_name" api:"nullable"`
JSON connectLinkedinOrganizationListResponseOrganizationJSON `json:"-"`
}
func (*ConnectLinkedinOrganizationListResponseOrganization) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationListResponseOrganization) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationListResponsePersonalProfile ¶
type ConnectLinkedinOrganizationListResponsePersonalProfile struct {
Name string `json:"name" api:"required"`
Urn string `json:"urn" api:"required"`
JSON connectLinkedinOrganizationListResponsePersonalProfileJSON `json:"-"`
}
User's personal LinkedIn profile
func (*ConnectLinkedinOrganizationListResponsePersonalProfile) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationListResponsePersonalProfile) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationSelectParams ¶
type ConnectLinkedinOrganizationSelectParams struct {
// Whether to connect as a personal profile or organization
AccountType param.Field[ConnectLinkedinOrganizationSelectParamsAccountType] `json:"account_type" api:"required"`
// Token from pending data or OAuth flow
ConnectToken param.Field[string] `json:"connect_token" api:"required"`
// LinkedIn organization URN (required if account_type is organization)
OrganizationUrn param.Field[string] `json:"organization_urn"`
}
func (ConnectLinkedinOrganizationSelectParams) MarshalJSON ¶
func (r ConnectLinkedinOrganizationSelectParams) MarshalJSON() (data []byte, err error)
type ConnectLinkedinOrganizationSelectParamsAccountType ¶
type ConnectLinkedinOrganizationSelectParamsAccountType string
Whether to connect as a personal profile or organization
const ( ConnectLinkedinOrganizationSelectParamsAccountTypePersonal ConnectLinkedinOrganizationSelectParamsAccountType = "personal" ConnectLinkedinOrganizationSelectParamsAccountTypeOrganization ConnectLinkedinOrganizationSelectParamsAccountType = "organization" )
func (ConnectLinkedinOrganizationSelectParamsAccountType) IsKnown ¶
func (r ConnectLinkedinOrganizationSelectParamsAccountType) IsKnown() bool
type ConnectLinkedinOrganizationSelectResponse ¶
type ConnectLinkedinOrganizationSelectResponse struct {
Account ConnectLinkedinOrganizationSelectResponseAccount `json:"account" api:"required"`
JSON connectLinkedinOrganizationSelectResponseJSON `json:"-"`
}
func (*ConnectLinkedinOrganizationSelectResponse) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationSelectResponse) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationSelectResponseAccount ¶
type ConnectLinkedinOrganizationSelectResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectLinkedinOrganizationSelectResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectLinkedinOrganizationSelectResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectLinkedinOrganizationSelectResponseAccountJSON `json:"-"`
}
func (*ConnectLinkedinOrganizationSelectResponseAccount) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationSelectResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationSelectResponseAccountGroup ¶
type ConnectLinkedinOrganizationSelectResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectLinkedinOrganizationSelectResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectLinkedinOrganizationSelectResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectLinkedinOrganizationSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectLinkedinOrganizationSelectResponseAccountPlatform ¶
type ConnectLinkedinOrganizationSelectResponseAccountPlatform string
const ( ConnectLinkedinOrganizationSelectResponseAccountPlatformTwitter ConnectLinkedinOrganizationSelectResponseAccountPlatform = "twitter" ConnectLinkedinOrganizationSelectResponseAccountPlatformInstagram ConnectLinkedinOrganizationSelectResponseAccountPlatform = "instagram" ConnectLinkedinOrganizationSelectResponseAccountPlatformFacebook ConnectLinkedinOrganizationSelectResponseAccountPlatform = "facebook" ConnectLinkedinOrganizationSelectResponseAccountPlatformLinkedin ConnectLinkedinOrganizationSelectResponseAccountPlatform = "linkedin" ConnectLinkedinOrganizationSelectResponseAccountPlatformTiktok ConnectLinkedinOrganizationSelectResponseAccountPlatform = "tiktok" ConnectLinkedinOrganizationSelectResponseAccountPlatformYoutube ConnectLinkedinOrganizationSelectResponseAccountPlatform = "youtube" ConnectLinkedinOrganizationSelectResponseAccountPlatformPinterest ConnectLinkedinOrganizationSelectResponseAccountPlatform = "pinterest" ConnectLinkedinOrganizationSelectResponseAccountPlatformReddit ConnectLinkedinOrganizationSelectResponseAccountPlatform = "reddit" ConnectLinkedinOrganizationSelectResponseAccountPlatformBluesky ConnectLinkedinOrganizationSelectResponseAccountPlatform = "bluesky" ConnectLinkedinOrganizationSelectResponseAccountPlatformThreads ConnectLinkedinOrganizationSelectResponseAccountPlatform = "threads" ConnectLinkedinOrganizationSelectResponseAccountPlatformTelegram ConnectLinkedinOrganizationSelectResponseAccountPlatform = "telegram" ConnectLinkedinOrganizationSelectResponseAccountPlatformSnapchat ConnectLinkedinOrganizationSelectResponseAccountPlatform = "snapchat" ConnectLinkedinOrganizationSelectResponseAccountPlatformGooglebusiness ConnectLinkedinOrganizationSelectResponseAccountPlatform = "googlebusiness" ConnectLinkedinOrganizationSelectResponseAccountPlatformWhatsapp ConnectLinkedinOrganizationSelectResponseAccountPlatform = "whatsapp" ConnectLinkedinOrganizationSelectResponseAccountPlatformMastodon ConnectLinkedinOrganizationSelectResponseAccountPlatform = "mastodon" ConnectLinkedinOrganizationSelectResponseAccountPlatformDiscord ConnectLinkedinOrganizationSelectResponseAccountPlatform = "discord" ConnectLinkedinOrganizationSelectResponseAccountPlatformSMS ConnectLinkedinOrganizationSelectResponseAccountPlatform = "sms" )
func (ConnectLinkedinOrganizationSelectResponseAccountPlatform) IsKnown ¶
func (r ConnectLinkedinOrganizationSelectResponseAccountPlatform) IsKnown() bool
type ConnectLinkedinOrganizationService ¶
type ConnectLinkedinOrganizationService struct {
Options []option.RequestOption
}
ConnectLinkedinOrganizationService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectLinkedinOrganizationService method instead.
func NewConnectLinkedinOrganizationService ¶
func NewConnectLinkedinOrganizationService(opts ...option.RequestOption) (r *ConnectLinkedinOrganizationService)
NewConnectLinkedinOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectLinkedinOrganizationService) List ¶
func (r *ConnectLinkedinOrganizationService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectLinkedinOrganizationListResponse, err error)
List LinkedIn organizations after OAuth
func (*ConnectLinkedinOrganizationService) Select ¶
func (r *ConnectLinkedinOrganizationService) Select(ctx context.Context, body ConnectLinkedinOrganizationSelectParams, opts ...option.RequestOption) (res *ConnectLinkedinOrganizationSelectResponse, err error)
Select LinkedIn organization
type ConnectLinkedinService ¶
type ConnectLinkedinService struct {
Options []option.RequestOption
Organizations *ConnectLinkedinOrganizationService
}
ConnectLinkedinService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectLinkedinService method instead.
func NewConnectLinkedinService ¶
func NewConnectLinkedinService(opts ...option.RequestOption) (r *ConnectLinkedinService)
NewConnectLinkedinService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectNewBlueskyConnectionParams ¶
type ConnectNewBlueskyConnectionParams struct {
// Bluesky app password
AppPassword param.Field[string] `json:"app_password" api:"required"`
// Bluesky handle (e.g. user.bsky.social)
Handle param.Field[string] `json:"handle" api:"required"`
}
func (ConnectNewBlueskyConnectionParams) MarshalJSON ¶
func (r ConnectNewBlueskyConnectionParams) MarshalJSON() (data []byte, err error)
type ConnectNewBlueskyConnectionResponse ¶
type ConnectNewBlueskyConnectionResponse struct {
Account ConnectNewBlueskyConnectionResponseAccount `json:"account" api:"required"`
JSON connectNewBlueskyConnectionResponseJSON `json:"-"`
}
func (*ConnectNewBlueskyConnectionResponse) UnmarshalJSON ¶
func (r *ConnectNewBlueskyConnectionResponse) UnmarshalJSON(data []byte) (err error)
type ConnectNewBlueskyConnectionResponseAccount ¶
type ConnectNewBlueskyConnectionResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectNewBlueskyConnectionResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectNewBlueskyConnectionResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectNewBlueskyConnectionResponseAccountJSON `json:"-"`
}
func (*ConnectNewBlueskyConnectionResponseAccount) UnmarshalJSON ¶
func (r *ConnectNewBlueskyConnectionResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectNewBlueskyConnectionResponseAccountGroup ¶
type ConnectNewBlueskyConnectionResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectNewBlueskyConnectionResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectNewBlueskyConnectionResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectNewBlueskyConnectionResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectNewBlueskyConnectionResponseAccountPlatform ¶
type ConnectNewBlueskyConnectionResponseAccountPlatform string
const ( ConnectNewBlueskyConnectionResponseAccountPlatformTwitter ConnectNewBlueskyConnectionResponseAccountPlatform = "twitter" ConnectNewBlueskyConnectionResponseAccountPlatformInstagram ConnectNewBlueskyConnectionResponseAccountPlatform = "instagram" ConnectNewBlueskyConnectionResponseAccountPlatformFacebook ConnectNewBlueskyConnectionResponseAccountPlatform = "facebook" ConnectNewBlueskyConnectionResponseAccountPlatformLinkedin ConnectNewBlueskyConnectionResponseAccountPlatform = "linkedin" ConnectNewBlueskyConnectionResponseAccountPlatformTiktok ConnectNewBlueskyConnectionResponseAccountPlatform = "tiktok" ConnectNewBlueskyConnectionResponseAccountPlatformYoutube ConnectNewBlueskyConnectionResponseAccountPlatform = "youtube" ConnectNewBlueskyConnectionResponseAccountPlatformPinterest ConnectNewBlueskyConnectionResponseAccountPlatform = "pinterest" ConnectNewBlueskyConnectionResponseAccountPlatformReddit ConnectNewBlueskyConnectionResponseAccountPlatform = "reddit" ConnectNewBlueskyConnectionResponseAccountPlatformBluesky ConnectNewBlueskyConnectionResponseAccountPlatform = "bluesky" ConnectNewBlueskyConnectionResponseAccountPlatformThreads ConnectNewBlueskyConnectionResponseAccountPlatform = "threads" ConnectNewBlueskyConnectionResponseAccountPlatformTelegram ConnectNewBlueskyConnectionResponseAccountPlatform = "telegram" ConnectNewBlueskyConnectionResponseAccountPlatformSnapchat ConnectNewBlueskyConnectionResponseAccountPlatform = "snapchat" ConnectNewBlueskyConnectionResponseAccountPlatformGooglebusiness ConnectNewBlueskyConnectionResponseAccountPlatform = "googlebusiness" ConnectNewBlueskyConnectionResponseAccountPlatformWhatsapp ConnectNewBlueskyConnectionResponseAccountPlatform = "whatsapp" ConnectNewBlueskyConnectionResponseAccountPlatformMastodon ConnectNewBlueskyConnectionResponseAccountPlatform = "mastodon" ConnectNewBlueskyConnectionResponseAccountPlatformDiscord ConnectNewBlueskyConnectionResponseAccountPlatform = "discord" ConnectNewBlueskyConnectionResponseAccountPlatformSMS ConnectNewBlueskyConnectionResponseAccountPlatform = "sms" )
func (ConnectNewBlueskyConnectionResponseAccountPlatform) IsKnown ¶
func (r ConnectNewBlueskyConnectionResponseAccountPlatform) IsKnown() bool
type ConnectPinterestBoardListResponse ¶
type ConnectPinterestBoardListResponse struct {
Boards []ConnectPinterestBoardListResponseBoard `json:"boards" api:"required"`
JSON connectPinterestBoardListResponseJSON `json:"-"`
}
func (*ConnectPinterestBoardListResponse) UnmarshalJSON ¶
func (r *ConnectPinterestBoardListResponse) UnmarshalJSON(data []byte) (err error)
type ConnectPinterestBoardListResponseBoard ¶
type ConnectPinterestBoardListResponseBoard struct {
// Pinterest board ID
ID string `json:"id" api:"required"`
// Board name
Name string `json:"name" api:"required"`
// Board description
Description string `json:"description" api:"nullable"`
// Number of pins on the board
PinCount int64 `json:"pin_count"`
JSON connectPinterestBoardListResponseBoardJSON `json:"-"`
}
func (*ConnectPinterestBoardListResponseBoard) UnmarshalJSON ¶
func (r *ConnectPinterestBoardListResponseBoard) UnmarshalJSON(data []byte) (err error)
type ConnectPinterestBoardSelectParams ¶
type ConnectPinterestBoardSelectParams struct {
// Selected Pinterest board ID
BoardID param.Field[string] `json:"board_id" api:"required"`
// Token from pending data or OAuth flow
ConnectToken param.Field[string] `json:"connect_token" api:"required"`
}
func (ConnectPinterestBoardSelectParams) MarshalJSON ¶
func (r ConnectPinterestBoardSelectParams) MarshalJSON() (data []byte, err error)
type ConnectPinterestBoardSelectResponse ¶
type ConnectPinterestBoardSelectResponse struct {
Account ConnectPinterestBoardSelectResponseAccount `json:"account" api:"required"`
JSON connectPinterestBoardSelectResponseJSON `json:"-"`
}
func (*ConnectPinterestBoardSelectResponse) UnmarshalJSON ¶
func (r *ConnectPinterestBoardSelectResponse) UnmarshalJSON(data []byte) (err error)
type ConnectPinterestBoardSelectResponseAccount ¶
type ConnectPinterestBoardSelectResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectPinterestBoardSelectResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectPinterestBoardSelectResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectPinterestBoardSelectResponseAccountJSON `json:"-"`
}
func (*ConnectPinterestBoardSelectResponseAccount) UnmarshalJSON ¶
func (r *ConnectPinterestBoardSelectResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectPinterestBoardSelectResponseAccountGroup ¶
type ConnectPinterestBoardSelectResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectPinterestBoardSelectResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectPinterestBoardSelectResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectPinterestBoardSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectPinterestBoardSelectResponseAccountPlatform ¶
type ConnectPinterestBoardSelectResponseAccountPlatform string
const ( ConnectPinterestBoardSelectResponseAccountPlatformTwitter ConnectPinterestBoardSelectResponseAccountPlatform = "twitter" ConnectPinterestBoardSelectResponseAccountPlatformInstagram ConnectPinterestBoardSelectResponseAccountPlatform = "instagram" ConnectPinterestBoardSelectResponseAccountPlatformFacebook ConnectPinterestBoardSelectResponseAccountPlatform = "facebook" ConnectPinterestBoardSelectResponseAccountPlatformLinkedin ConnectPinterestBoardSelectResponseAccountPlatform = "linkedin" ConnectPinterestBoardSelectResponseAccountPlatformTiktok ConnectPinterestBoardSelectResponseAccountPlatform = "tiktok" ConnectPinterestBoardSelectResponseAccountPlatformYoutube ConnectPinterestBoardSelectResponseAccountPlatform = "youtube" ConnectPinterestBoardSelectResponseAccountPlatformPinterest ConnectPinterestBoardSelectResponseAccountPlatform = "pinterest" ConnectPinterestBoardSelectResponseAccountPlatformReddit ConnectPinterestBoardSelectResponseAccountPlatform = "reddit" ConnectPinterestBoardSelectResponseAccountPlatformBluesky ConnectPinterestBoardSelectResponseAccountPlatform = "bluesky" ConnectPinterestBoardSelectResponseAccountPlatformThreads ConnectPinterestBoardSelectResponseAccountPlatform = "threads" ConnectPinterestBoardSelectResponseAccountPlatformTelegram ConnectPinterestBoardSelectResponseAccountPlatform = "telegram" ConnectPinterestBoardSelectResponseAccountPlatformSnapchat ConnectPinterestBoardSelectResponseAccountPlatform = "snapchat" ConnectPinterestBoardSelectResponseAccountPlatformGooglebusiness ConnectPinterestBoardSelectResponseAccountPlatform = "googlebusiness" ConnectPinterestBoardSelectResponseAccountPlatformWhatsapp ConnectPinterestBoardSelectResponseAccountPlatform = "whatsapp" ConnectPinterestBoardSelectResponseAccountPlatformMastodon ConnectPinterestBoardSelectResponseAccountPlatform = "mastodon" ConnectPinterestBoardSelectResponseAccountPlatformDiscord ConnectPinterestBoardSelectResponseAccountPlatform = "discord" ConnectPinterestBoardSelectResponseAccountPlatformSMS ConnectPinterestBoardSelectResponseAccountPlatform = "sms" )
func (ConnectPinterestBoardSelectResponseAccountPlatform) IsKnown ¶
func (r ConnectPinterestBoardSelectResponseAccountPlatform) IsKnown() bool
type ConnectPinterestBoardService ¶
type ConnectPinterestBoardService struct {
Options []option.RequestOption
}
ConnectPinterestBoardService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectPinterestBoardService method instead.
func NewConnectPinterestBoardService ¶
func NewConnectPinterestBoardService(opts ...option.RequestOption) (r *ConnectPinterestBoardService)
NewConnectPinterestBoardService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectPinterestBoardService) List ¶
func (r *ConnectPinterestBoardService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectPinterestBoardListResponse, err error)
List Pinterest boards after OAuth
func (*ConnectPinterestBoardService) Select ¶
func (r *ConnectPinterestBoardService) Select(ctx context.Context, body ConnectPinterestBoardSelectParams, opts ...option.RequestOption) (res *ConnectPinterestBoardSelectResponse, err error)
Select Pinterest board
type ConnectPinterestService ¶
type ConnectPinterestService struct {
Options []option.RequestOption
Boards *ConnectPinterestBoardService
}
ConnectPinterestService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectPinterestService method instead.
func NewConnectPinterestService ¶
func NewConnectPinterestService(opts ...option.RequestOption) (r *ConnectPinterestService)
NewConnectPinterestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectService ¶
type ConnectService struct {
Options []option.RequestOption
Telegram *ConnectTelegramService
Whatsapp *ConnectWhatsappService
Facebook *ConnectFacebookService
Linkedin *ConnectLinkedinService
Pinterest *ConnectPinterestService
Googlebusiness *ConnectGooglebusinessService
Snapchat *ConnectSnapchatService
}
ConnectService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectService method instead.
func NewConnectService ¶
func NewConnectService(opts ...option.RequestOption) (r *ConnectService)
NewConnectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectService) CompleteOAuthCallback ¶
func (r *ConnectService) CompleteOAuthCallback(ctx context.Context, platform ConnectCompleteOAuthCallbackParamsPlatform, body ConnectCompleteOAuthCallbackParams, opts ...option.RequestOption) (res *ConnectCompleteOAuthCallbackResponse, err error)
Exchange OAuth code for tokens and save the account.
func (*ConnectService) FetchPendingData ¶
func (r *ConnectService) FetchPendingData(ctx context.Context, query ConnectFetchPendingDataParams, opts ...option.RequestOption) (res *ConnectFetchPendingDataResponse, err error)
One-time use, expires after 10 minutes. For headless OAuth flows.
func (*ConnectService) NewBlueskyConnection ¶
func (r *ConnectService) NewBlueskyConnection(ctx context.Context, body ConnectNewBlueskyConnectionParams, opts ...option.RequestOption) (res *ConnectNewBlueskyConnectionResponse, err error)
Connect Bluesky via app password
func (*ConnectService) StartOAuthFlow ¶
func (r *ConnectService) StartOAuthFlow(ctx context.Context, platform ConnectStartOAuthFlowParamsPlatform, query ConnectStartOAuthFlowParams, opts ...option.RequestOption) (res *ConnectStartOAuthFlowResponse, err error)
Returns an auth_url to redirect the user for OAuth authorization.
type ConnectSnapchatProfileListResponse ¶
type ConnectSnapchatProfileListResponse struct {
Profiles []ConnectSnapchatProfileListResponseProfile `json:"profiles" api:"required"`
JSON connectSnapchatProfileListResponseJSON `json:"-"`
}
func (*ConnectSnapchatProfileListResponse) UnmarshalJSON ¶
func (r *ConnectSnapchatProfileListResponse) UnmarshalJSON(data []byte) (err error)
type ConnectSnapchatProfileListResponseProfile ¶
type ConnectSnapchatProfileListResponseProfile struct {
// Snapchat profile ID
ID string `json:"id" api:"required"`
// Display name
DisplayName string `json:"display_name" api:"required"`
// Snapchat username
Username string `json:"username" api:"required"`
// Profile image URL
ProfileImageURL string `json:"profile_image_url" api:"nullable"`
// Number of subscribers
SubscriberCount int64 `json:"subscriber_count"`
JSON connectSnapchatProfileListResponseProfileJSON `json:"-"`
}
func (*ConnectSnapchatProfileListResponseProfile) UnmarshalJSON ¶
func (r *ConnectSnapchatProfileListResponseProfile) UnmarshalJSON(data []byte) (err error)
type ConnectSnapchatProfileSelectParams ¶
type ConnectSnapchatProfileSelectParams struct {
// Token from pending data or OAuth flow
ConnectToken param.Field[string] `json:"connect_token" api:"required"`
// Selected Snapchat profile ID
ProfileID param.Field[string] `json:"profile_id" api:"required"`
}
func (ConnectSnapchatProfileSelectParams) MarshalJSON ¶
func (r ConnectSnapchatProfileSelectParams) MarshalJSON() (data []byte, err error)
type ConnectSnapchatProfileSelectResponse ¶
type ConnectSnapchatProfileSelectResponse struct {
Account ConnectSnapchatProfileSelectResponseAccount `json:"account" api:"required"`
JSON connectSnapchatProfileSelectResponseJSON `json:"-"`
}
func (*ConnectSnapchatProfileSelectResponse) UnmarshalJSON ¶
func (r *ConnectSnapchatProfileSelectResponse) UnmarshalJSON(data []byte) (err error)
type ConnectSnapchatProfileSelectResponseAccount ¶
type ConnectSnapchatProfileSelectResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectSnapchatProfileSelectResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectSnapchatProfileSelectResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectSnapchatProfileSelectResponseAccountJSON `json:"-"`
}
func (*ConnectSnapchatProfileSelectResponseAccount) UnmarshalJSON ¶
func (r *ConnectSnapchatProfileSelectResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectSnapchatProfileSelectResponseAccountGroup ¶
type ConnectSnapchatProfileSelectResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectSnapchatProfileSelectResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectSnapchatProfileSelectResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectSnapchatProfileSelectResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectSnapchatProfileSelectResponseAccountPlatform ¶
type ConnectSnapchatProfileSelectResponseAccountPlatform string
const ( ConnectSnapchatProfileSelectResponseAccountPlatformTwitter ConnectSnapchatProfileSelectResponseAccountPlatform = "twitter" ConnectSnapchatProfileSelectResponseAccountPlatformInstagram ConnectSnapchatProfileSelectResponseAccountPlatform = "instagram" ConnectSnapchatProfileSelectResponseAccountPlatformFacebook ConnectSnapchatProfileSelectResponseAccountPlatform = "facebook" ConnectSnapchatProfileSelectResponseAccountPlatformLinkedin ConnectSnapchatProfileSelectResponseAccountPlatform = "linkedin" ConnectSnapchatProfileSelectResponseAccountPlatformTiktok ConnectSnapchatProfileSelectResponseAccountPlatform = "tiktok" ConnectSnapchatProfileSelectResponseAccountPlatformYoutube ConnectSnapchatProfileSelectResponseAccountPlatform = "youtube" ConnectSnapchatProfileSelectResponseAccountPlatformPinterest ConnectSnapchatProfileSelectResponseAccountPlatform = "pinterest" ConnectSnapchatProfileSelectResponseAccountPlatformReddit ConnectSnapchatProfileSelectResponseAccountPlatform = "reddit" ConnectSnapchatProfileSelectResponseAccountPlatformBluesky ConnectSnapchatProfileSelectResponseAccountPlatform = "bluesky" ConnectSnapchatProfileSelectResponseAccountPlatformThreads ConnectSnapchatProfileSelectResponseAccountPlatform = "threads" ConnectSnapchatProfileSelectResponseAccountPlatformTelegram ConnectSnapchatProfileSelectResponseAccountPlatform = "telegram" ConnectSnapchatProfileSelectResponseAccountPlatformSnapchat ConnectSnapchatProfileSelectResponseAccountPlatform = "snapchat" ConnectSnapchatProfileSelectResponseAccountPlatformGooglebusiness ConnectSnapchatProfileSelectResponseAccountPlatform = "googlebusiness" ConnectSnapchatProfileSelectResponseAccountPlatformWhatsapp ConnectSnapchatProfileSelectResponseAccountPlatform = "whatsapp" ConnectSnapchatProfileSelectResponseAccountPlatformMastodon ConnectSnapchatProfileSelectResponseAccountPlatform = "mastodon" ConnectSnapchatProfileSelectResponseAccountPlatformDiscord ConnectSnapchatProfileSelectResponseAccountPlatform = "discord" ConnectSnapchatProfileSelectResponseAccountPlatformSMS ConnectSnapchatProfileSelectResponseAccountPlatform = "sms" )
func (ConnectSnapchatProfileSelectResponseAccountPlatform) IsKnown ¶
func (r ConnectSnapchatProfileSelectResponseAccountPlatform) IsKnown() bool
type ConnectSnapchatProfileService ¶
type ConnectSnapchatProfileService struct {
Options []option.RequestOption
}
ConnectSnapchatProfileService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectSnapchatProfileService method instead.
func NewConnectSnapchatProfileService ¶
func NewConnectSnapchatProfileService(opts ...option.RequestOption) (r *ConnectSnapchatProfileService)
NewConnectSnapchatProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectSnapchatProfileService) List ¶
func (r *ConnectSnapchatProfileService) List(ctx context.Context, opts ...option.RequestOption) (res *ConnectSnapchatProfileListResponse, err error)
List Snapchat Public Profiles after OAuth
func (*ConnectSnapchatProfileService) Select ¶
func (r *ConnectSnapchatProfileService) Select(ctx context.Context, body ConnectSnapchatProfileSelectParams, opts ...option.RequestOption) (res *ConnectSnapchatProfileSelectResponse, err error)
Select Snapchat Public Profile
type ConnectSnapchatService ¶
type ConnectSnapchatService struct {
Options []option.RequestOption
Profiles *ConnectSnapchatProfileService
}
ConnectSnapchatService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectSnapchatService method instead.
func NewConnectSnapchatService ¶
func NewConnectSnapchatService(opts ...option.RequestOption) (r *ConnectSnapchatService)
NewConnectSnapchatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ConnectStartOAuthFlowParams ¶
type ConnectStartOAuthFlowParams struct {
// Set to "true" for headless mode (returns data instead of redirecting)
Headless param.Field[string] `query:"headless"`
// Auth method variant (e.g. "direct" for Instagram Login instead of Facebook
// Login)
Method param.Field[string] `query:"method"`
// URL to redirect after OAuth completes
RedirectURL param.Field[string] `query:"redirect_url" format:"uri"`
}
func (ConnectStartOAuthFlowParams) URLQuery ¶
func (r ConnectStartOAuthFlowParams) URLQuery() (v url.Values)
URLQuery serializes ConnectStartOAuthFlowParams's query parameters as `url.Values`.
type ConnectStartOAuthFlowParamsPlatform ¶
type ConnectStartOAuthFlowParamsPlatform string
OAuth platform to connect
const ( ConnectStartOAuthFlowParamsPlatformTwitter ConnectStartOAuthFlowParamsPlatform = "twitter" ConnectStartOAuthFlowParamsPlatformInstagram ConnectStartOAuthFlowParamsPlatform = "instagram" ConnectStartOAuthFlowParamsPlatformFacebook ConnectStartOAuthFlowParamsPlatform = "facebook" ConnectStartOAuthFlowParamsPlatformLinkedin ConnectStartOAuthFlowParamsPlatform = "linkedin" ConnectStartOAuthFlowParamsPlatformTiktok ConnectStartOAuthFlowParamsPlatform = "tiktok" ConnectStartOAuthFlowParamsPlatformYoutube ConnectStartOAuthFlowParamsPlatform = "youtube" ConnectStartOAuthFlowParamsPlatformPinterest ConnectStartOAuthFlowParamsPlatform = "pinterest" ConnectStartOAuthFlowParamsPlatformReddit ConnectStartOAuthFlowParamsPlatform = "reddit" ConnectStartOAuthFlowParamsPlatformThreads ConnectStartOAuthFlowParamsPlatform = "threads" ConnectStartOAuthFlowParamsPlatformSnapchat ConnectStartOAuthFlowParamsPlatform = "snapchat" ConnectStartOAuthFlowParamsPlatformGooglebusiness ConnectStartOAuthFlowParamsPlatform = "googlebusiness" ConnectStartOAuthFlowParamsPlatformMastodon ConnectStartOAuthFlowParamsPlatform = "mastodon" )
func (ConnectStartOAuthFlowParamsPlatform) IsKnown ¶
func (r ConnectStartOAuthFlowParamsPlatform) IsKnown() bool
type ConnectStartOAuthFlowResponse ¶
type ConnectStartOAuthFlowResponse struct {
// URL to redirect the user for OAuth authorization
AuthURL string `json:"auth_url" api:"required" format:"uri"`
JSON connectStartOAuthFlowResponseJSON `json:"-"`
}
func (*ConnectStartOAuthFlowResponse) UnmarshalJSON ¶
func (r *ConnectStartOAuthFlowResponse) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramConnectDirectlyParams ¶
type ConnectTelegramConnectDirectlyParams struct {
// Telegram chat or channel ID
ChatID param.Field[string] `json:"chat_id" api:"required"`
}
func (ConnectTelegramConnectDirectlyParams) MarshalJSON ¶
func (r ConnectTelegramConnectDirectlyParams) MarshalJSON() (data []byte, err error)
type ConnectTelegramConnectDirectlyResponse ¶
type ConnectTelegramConnectDirectlyResponse struct {
Account ConnectTelegramConnectDirectlyResponseAccount `json:"account" api:"required"`
JSON connectTelegramConnectDirectlyResponseJSON `json:"-"`
}
func (*ConnectTelegramConnectDirectlyResponse) UnmarshalJSON ¶
func (r *ConnectTelegramConnectDirectlyResponse) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramConnectDirectlyResponseAccount ¶
type ConnectTelegramConnectDirectlyResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectTelegramConnectDirectlyResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectTelegramConnectDirectlyResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectTelegramConnectDirectlyResponseAccountJSON `json:"-"`
}
func (*ConnectTelegramConnectDirectlyResponseAccount) UnmarshalJSON ¶
func (r *ConnectTelegramConnectDirectlyResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramConnectDirectlyResponseAccountGroup ¶
type ConnectTelegramConnectDirectlyResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectTelegramConnectDirectlyResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectTelegramConnectDirectlyResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectTelegramConnectDirectlyResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramConnectDirectlyResponseAccountPlatform ¶
type ConnectTelegramConnectDirectlyResponseAccountPlatform string
const ( ConnectTelegramConnectDirectlyResponseAccountPlatformTwitter ConnectTelegramConnectDirectlyResponseAccountPlatform = "twitter" ConnectTelegramConnectDirectlyResponseAccountPlatformInstagram ConnectTelegramConnectDirectlyResponseAccountPlatform = "instagram" ConnectTelegramConnectDirectlyResponseAccountPlatformFacebook ConnectTelegramConnectDirectlyResponseAccountPlatform = "facebook" ConnectTelegramConnectDirectlyResponseAccountPlatformLinkedin ConnectTelegramConnectDirectlyResponseAccountPlatform = "linkedin" ConnectTelegramConnectDirectlyResponseAccountPlatformTiktok ConnectTelegramConnectDirectlyResponseAccountPlatform = "tiktok" ConnectTelegramConnectDirectlyResponseAccountPlatformYoutube ConnectTelegramConnectDirectlyResponseAccountPlatform = "youtube" ConnectTelegramConnectDirectlyResponseAccountPlatformPinterest ConnectTelegramConnectDirectlyResponseAccountPlatform = "pinterest" ConnectTelegramConnectDirectlyResponseAccountPlatformReddit ConnectTelegramConnectDirectlyResponseAccountPlatform = "reddit" ConnectTelegramConnectDirectlyResponseAccountPlatformBluesky ConnectTelegramConnectDirectlyResponseAccountPlatform = "bluesky" ConnectTelegramConnectDirectlyResponseAccountPlatformThreads ConnectTelegramConnectDirectlyResponseAccountPlatform = "threads" ConnectTelegramConnectDirectlyResponseAccountPlatformTelegram ConnectTelegramConnectDirectlyResponseAccountPlatform = "telegram" ConnectTelegramConnectDirectlyResponseAccountPlatformSnapchat ConnectTelegramConnectDirectlyResponseAccountPlatform = "snapchat" ConnectTelegramConnectDirectlyResponseAccountPlatformGooglebusiness ConnectTelegramConnectDirectlyResponseAccountPlatform = "googlebusiness" ConnectTelegramConnectDirectlyResponseAccountPlatformWhatsapp ConnectTelegramConnectDirectlyResponseAccountPlatform = "whatsapp" ConnectTelegramConnectDirectlyResponseAccountPlatformMastodon ConnectTelegramConnectDirectlyResponseAccountPlatform = "mastodon" ConnectTelegramConnectDirectlyResponseAccountPlatformDiscord ConnectTelegramConnectDirectlyResponseAccountPlatform = "discord" ConnectTelegramConnectDirectlyResponseAccountPlatformSMS ConnectTelegramConnectDirectlyResponseAccountPlatform = "sms" )
func (ConnectTelegramConnectDirectlyResponseAccountPlatform) IsKnown ¶
func (r ConnectTelegramConnectDirectlyResponseAccountPlatform) IsKnown() bool
type ConnectTelegramInitiateConnectionResponse ¶
type ConnectTelegramInitiateConnectionResponse struct {
// Telegram bot username to message
BotUsername string `json:"bot_username" api:"required"`
// 6-character access code
Code string `json:"code" api:"required"`
// ISO 8601 expiry timestamp
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// Seconds until code expires
ExpiresIn int64 `json:"expires_in" api:"required"`
// Step-by-step instructions for the user
Instructions []string `json:"instructions" api:"required"`
JSON connectTelegramInitiateConnectionResponseJSON `json:"-"`
}
func (*ConnectTelegramInitiateConnectionResponse) UnmarshalJSON ¶
func (r *ConnectTelegramInitiateConnectionResponse) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramPollConnectionStatusParams ¶
type ConnectTelegramPollConnectionStatusParams struct {
// The 6-character access code to check
Code param.Field[string] `query:"code" api:"required"`
}
func (ConnectTelegramPollConnectionStatusParams) URLQuery ¶
func (r ConnectTelegramPollConnectionStatusParams) URLQuery() (v url.Values)
URLQuery serializes ConnectTelegramPollConnectionStatusParams's query parameters as `url.Values`.
type ConnectTelegramPollConnectionStatusResponse ¶
type ConnectTelegramPollConnectionStatusResponse struct {
// Current connection status
Status ConnectTelegramPollConnectionStatusResponseStatus `json:"status" api:"required"`
// Connected account details
Account ConnectTelegramPollConnectionStatusResponseAccount `json:"account"`
// Telegram chat ID once connected
ChatID string `json:"chat_id"`
// Chat or channel title
ChatTitle string `json:"chat_title"`
// Chat type (private, group, supergroup, channel)
ChatType string `json:"chat_type"`
// Code expiry timestamp
ExpiresAt time.Time `json:"expires_at" format:"date-time"`
JSON connectTelegramPollConnectionStatusResponseJSON `json:"-"`
}
func (*ConnectTelegramPollConnectionStatusResponse) UnmarshalJSON ¶
func (r *ConnectTelegramPollConnectionStatusResponse) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramPollConnectionStatusResponseAccount ¶
type ConnectTelegramPollConnectionStatusResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectTelegramPollConnectionStatusResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectTelegramPollConnectionStatusResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectTelegramPollConnectionStatusResponseAccountJSON `json:"-"`
}
Connected account details
func (*ConnectTelegramPollConnectionStatusResponseAccount) UnmarshalJSON ¶
func (r *ConnectTelegramPollConnectionStatusResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramPollConnectionStatusResponseAccountGroup ¶
type ConnectTelegramPollConnectionStatusResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectTelegramPollConnectionStatusResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectTelegramPollConnectionStatusResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectTelegramPollConnectionStatusResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectTelegramPollConnectionStatusResponseAccountPlatform ¶
type ConnectTelegramPollConnectionStatusResponseAccountPlatform string
const ( ConnectTelegramPollConnectionStatusResponseAccountPlatformTwitter ConnectTelegramPollConnectionStatusResponseAccountPlatform = "twitter" ConnectTelegramPollConnectionStatusResponseAccountPlatformInstagram ConnectTelegramPollConnectionStatusResponseAccountPlatform = "instagram" ConnectTelegramPollConnectionStatusResponseAccountPlatformFacebook ConnectTelegramPollConnectionStatusResponseAccountPlatform = "facebook" ConnectTelegramPollConnectionStatusResponseAccountPlatformLinkedin ConnectTelegramPollConnectionStatusResponseAccountPlatform = "linkedin" ConnectTelegramPollConnectionStatusResponseAccountPlatformTiktok ConnectTelegramPollConnectionStatusResponseAccountPlatform = "tiktok" ConnectTelegramPollConnectionStatusResponseAccountPlatformYoutube ConnectTelegramPollConnectionStatusResponseAccountPlatform = "youtube" ConnectTelegramPollConnectionStatusResponseAccountPlatformPinterest ConnectTelegramPollConnectionStatusResponseAccountPlatform = "pinterest" ConnectTelegramPollConnectionStatusResponseAccountPlatformReddit ConnectTelegramPollConnectionStatusResponseAccountPlatform = "reddit" ConnectTelegramPollConnectionStatusResponseAccountPlatformBluesky ConnectTelegramPollConnectionStatusResponseAccountPlatform = "bluesky" ConnectTelegramPollConnectionStatusResponseAccountPlatformThreads ConnectTelegramPollConnectionStatusResponseAccountPlatform = "threads" ConnectTelegramPollConnectionStatusResponseAccountPlatformTelegram ConnectTelegramPollConnectionStatusResponseAccountPlatform = "telegram" ConnectTelegramPollConnectionStatusResponseAccountPlatformSnapchat ConnectTelegramPollConnectionStatusResponseAccountPlatform = "snapchat" ConnectTelegramPollConnectionStatusResponseAccountPlatformGooglebusiness ConnectTelegramPollConnectionStatusResponseAccountPlatform = "googlebusiness" ConnectTelegramPollConnectionStatusResponseAccountPlatformWhatsapp ConnectTelegramPollConnectionStatusResponseAccountPlatform = "whatsapp" ConnectTelegramPollConnectionStatusResponseAccountPlatformMastodon ConnectTelegramPollConnectionStatusResponseAccountPlatform = "mastodon" ConnectTelegramPollConnectionStatusResponseAccountPlatformDiscord ConnectTelegramPollConnectionStatusResponseAccountPlatform = "discord" ConnectTelegramPollConnectionStatusResponseAccountPlatformSMS ConnectTelegramPollConnectionStatusResponseAccountPlatform = "sms" )
func (ConnectTelegramPollConnectionStatusResponseAccountPlatform) IsKnown ¶
func (r ConnectTelegramPollConnectionStatusResponseAccountPlatform) IsKnown() bool
type ConnectTelegramPollConnectionStatusResponseStatus ¶
type ConnectTelegramPollConnectionStatusResponseStatus string
Current connection status
const ( ConnectTelegramPollConnectionStatusResponseStatusPending ConnectTelegramPollConnectionStatusResponseStatus = "pending" ConnectTelegramPollConnectionStatusResponseStatusConnected ConnectTelegramPollConnectionStatusResponseStatus = "connected" ConnectTelegramPollConnectionStatusResponseStatusExpired ConnectTelegramPollConnectionStatusResponseStatus = "expired" )
func (ConnectTelegramPollConnectionStatusResponseStatus) IsKnown ¶
func (r ConnectTelegramPollConnectionStatusResponseStatus) IsKnown() bool
type ConnectTelegramService ¶
type ConnectTelegramService struct {
Options []option.RequestOption
}
ConnectTelegramService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectTelegramService method instead.
func NewConnectTelegramService ¶
func NewConnectTelegramService(opts ...option.RequestOption) (r *ConnectTelegramService)
NewConnectTelegramService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectTelegramService) ConnectDirectly ¶
func (r *ConnectTelegramService) ConnectDirectly(ctx context.Context, body ConnectTelegramConnectDirectlyParams, opts ...option.RequestOption) (res *ConnectTelegramConnectDirectlyResponse, err error)
Connect Telegram directly with chat ID
func (*ConnectTelegramService) InitiateConnection ¶
func (r *ConnectTelegramService) InitiateConnection(ctx context.Context, opts ...option.RequestOption) (res *ConnectTelegramInitiateConnectionResponse, err error)
Generates a 6-character access code (valid 15 minutes).
func (*ConnectTelegramService) PollConnectionStatus ¶
func (r *ConnectTelegramService) PollConnectionStatus(ctx context.Context, query ConnectTelegramPollConnectionStatusParams, opts ...option.RequestOption) (res *ConnectTelegramPollConnectionStatusResponse, err error)
Poll Telegram connection status
type ConnectWhatsappCompleteEmbeddedSignupParams ¶
type ConnectWhatsappCompleteEmbeddedSignupParams struct {
// Code from WhatsApp embedded signup flow
Code param.Field[string] `json:"code" api:"required"`
}
func (ConnectWhatsappCompleteEmbeddedSignupParams) MarshalJSON ¶
func (r ConnectWhatsappCompleteEmbeddedSignupParams) MarshalJSON() (data []byte, err error)
type ConnectWhatsappCompleteEmbeddedSignupResponse ¶
type ConnectWhatsappCompleteEmbeddedSignupResponse struct {
Account ConnectWhatsappCompleteEmbeddedSignupResponseAccount `json:"account" api:"required"`
JSON connectWhatsappCompleteEmbeddedSignupResponseJSON `json:"-"`
}
func (*ConnectWhatsappCompleteEmbeddedSignupResponse) UnmarshalJSON ¶
func (r *ConnectWhatsappCompleteEmbeddedSignupResponse) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappCompleteEmbeddedSignupResponseAccount ¶
type ConnectWhatsappCompleteEmbeddedSignupResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectWhatsappCompleteEmbeddedSignupResponseAccountJSON `json:"-"`
}
func (*ConnectWhatsappCompleteEmbeddedSignupResponseAccount) UnmarshalJSON ¶
func (r *ConnectWhatsappCompleteEmbeddedSignupResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup ¶
type ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectWhatsappCompleteEmbeddedSignupResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectWhatsappCompleteEmbeddedSignupResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform ¶
type ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform string
const ( ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTwitter ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "twitter" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformInstagram ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "instagram" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformFacebook ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "facebook" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformLinkedin ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "linkedin" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTiktok ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "tiktok" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformYoutube ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "youtube" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformPinterest ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "pinterest" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformReddit ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "reddit" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformBluesky ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "bluesky" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformThreads ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "threads" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformTelegram ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "telegram" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformSnapchat ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "snapchat" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformGooglebusiness ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "googlebusiness" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformWhatsapp ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "whatsapp" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformMastodon ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "mastodon" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformDiscord ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "discord" ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatformSMS ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform = "sms" )
func (ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform) IsKnown ¶
func (r ConnectWhatsappCompleteEmbeddedSignupResponseAccountPlatform) IsKnown() bool
type ConnectWhatsappConnectViaCredentialsParams ¶
type ConnectWhatsappConnectViaCredentialsParams struct {
// WhatsApp Business API access token
AccessToken param.Field[string] `json:"access_token" api:"required"`
// WhatsApp phone number ID
PhoneNumberID param.Field[string] `json:"phone_number_id" api:"required"`
// WhatsApp Business Account ID
WabaID param.Field[string] `json:"waba_id" api:"required"`
}
func (ConnectWhatsappConnectViaCredentialsParams) MarshalJSON ¶
func (r ConnectWhatsappConnectViaCredentialsParams) MarshalJSON() (data []byte, err error)
type ConnectWhatsappConnectViaCredentialsResponse ¶
type ConnectWhatsappConnectViaCredentialsResponse struct {
Account ConnectWhatsappConnectViaCredentialsResponseAccount `json:"account" api:"required"`
JSON connectWhatsappConnectViaCredentialsResponseJSON `json:"-"`
}
func (*ConnectWhatsappConnectViaCredentialsResponse) UnmarshalJSON ¶
func (r *ConnectWhatsappConnectViaCredentialsResponse) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappConnectViaCredentialsResponseAccount ¶
type ConnectWhatsappConnectViaCredentialsResponseAccount struct {
// Account ID
ID string `json:"id" api:"required"`
AvatarURL string `json:"avatar_url" api:"required,nullable"`
ConnectedAt time.Time `json:"connected_at" api:"required" format:"date-time"`
DisplayName string `json:"display_name" api:"required,nullable"`
// Account group
Group ConnectWhatsappConnectViaCredentialsResponseAccountGroup `json:"group" api:"required,nullable"`
Metadata map[string]interface{} `json:"metadata" api:"required,nullable"`
Platform ConnectWhatsappConnectViaCredentialsResponseAccountPlatform `json:"platform" api:"required"`
PlatformAccountID string `json:"platform_account_id" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Username string `json:"username" api:"required,nullable"`
JSON connectWhatsappConnectViaCredentialsResponseAccountJSON `json:"-"`
}
func (*ConnectWhatsappConnectViaCredentialsResponseAccount) UnmarshalJSON ¶
func (r *ConnectWhatsappConnectViaCredentialsResponseAccount) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappConnectViaCredentialsResponseAccountGroup ¶
type ConnectWhatsappConnectViaCredentialsResponseAccountGroup struct {
ID string `json:"id" api:"required"`
Name string `json:"name" api:"required"`
JSON connectWhatsappConnectViaCredentialsResponseAccountGroupJSON `json:"-"`
}
Account group
func (*ConnectWhatsappConnectViaCredentialsResponseAccountGroup) UnmarshalJSON ¶
func (r *ConnectWhatsappConnectViaCredentialsResponseAccountGroup) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappConnectViaCredentialsResponseAccountPlatform ¶
type ConnectWhatsappConnectViaCredentialsResponseAccountPlatform string
const ( ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTwitter ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "twitter" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformInstagram ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "instagram" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformFacebook ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "facebook" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformLinkedin ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "linkedin" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTiktok ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "tiktok" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformYoutube ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "youtube" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformPinterest ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "pinterest" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformReddit ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "reddit" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformBluesky ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "bluesky" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformThreads ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "threads" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformTelegram ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "telegram" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformSnapchat ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "snapchat" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformGooglebusiness ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "googlebusiness" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformWhatsapp ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "whatsapp" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformMastodon ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "mastodon" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformDiscord ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "discord" ConnectWhatsappConnectViaCredentialsResponseAccountPlatformSMS ConnectWhatsappConnectViaCredentialsResponseAccountPlatform = "sms" )
func (ConnectWhatsappConnectViaCredentialsResponseAccountPlatform) IsKnown ¶
func (r ConnectWhatsappConnectViaCredentialsResponseAccountPlatform) IsKnown() bool
type ConnectWhatsappGetSDKConfigResponse ¶
type ConnectWhatsappGetSDKConfigResponse struct {
// Facebook App ID for WhatsApp embedded signup
AppID string `json:"app_id" api:"required"`
// WhatsApp configuration ID
ConfigID string `json:"config_id" api:"required"`
JSON connectWhatsappGetSDKConfigResponseJSON `json:"-"`
}
func (*ConnectWhatsappGetSDKConfigResponse) UnmarshalJSON ¶
func (r *ConnectWhatsappGetSDKConfigResponse) UnmarshalJSON(data []byte) (err error)
type ConnectWhatsappService ¶
type ConnectWhatsappService struct {
Options []option.RequestOption
}
ConnectWhatsappService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectWhatsappService method instead.
func NewConnectWhatsappService ¶
func NewConnectWhatsappService(opts ...option.RequestOption) (r *ConnectWhatsappService)
NewConnectWhatsappService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectWhatsappService) CompleteEmbeddedSignup ¶
func (r *ConnectWhatsappService) CompleteEmbeddedSignup(ctx context.Context, body ConnectWhatsappCompleteEmbeddedSignupParams, opts ...option.RequestOption) (res *ConnectWhatsappCompleteEmbeddedSignupResponse, err error)
Complete WhatsApp Embedded Signup
func (*ConnectWhatsappService) ConnectViaCredentials ¶
func (r *ConnectWhatsappService) ConnectViaCredentials(ctx context.Context, body ConnectWhatsappConnectViaCredentialsParams, opts ...option.RequestOption) (res *ConnectWhatsappConnectViaCredentialsResponse, err error)
Connect WhatsApp via System User credentials
func (*ConnectWhatsappService) GetSDKConfig ¶
func (r *ConnectWhatsappService) GetSDKConfig(ctx context.Context, opts ...option.RequestOption) (res *ConnectWhatsappGetSDKConfigResponse, err error)
Get WhatsApp Embedded Signup SDK config
type ConnectionListLogsParams ¶
type ConnectionListLogsParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (ConnectionListLogsParams) URLQuery ¶
func (r ConnectionListLogsParams) URLQuery() (v url.Values)
URLQuery serializes ConnectionListLogsParams's query parameters as `url.Values`.
type ConnectionListLogsResponse ¶
type ConnectionListLogsResponse struct {
Data []ConnectionListLogsResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON connectionListLogsResponseJSON `json:"-"`
}
func (*ConnectionListLogsResponse) UnmarshalJSON ¶
func (r *ConnectionListLogsResponse) UnmarshalJSON(data []byte) (err error)
type ConnectionListLogsResponseData ¶
type ConnectionListLogsResponseData struct {
// Log entry ID
ID string `json:"id" api:"required"`
// Social account ID
AccountID string `json:"account_id" api:"required,nullable"`
// Timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Event type
Event ConnectionListLogsResponseDataEvent `json:"event" api:"required"`
// Event details
Message string `json:"message" api:"required,nullable"`
// Platform name
Platform string `json:"platform" api:"required"`
JSON connectionListLogsResponseDataJSON `json:"-"`
}
func (*ConnectionListLogsResponseData) UnmarshalJSON ¶
func (r *ConnectionListLogsResponseData) UnmarshalJSON(data []byte) (err error)
type ConnectionListLogsResponseDataEvent ¶
type ConnectionListLogsResponseDataEvent string
Event type
const ( ConnectionListLogsResponseDataEventConnected ConnectionListLogsResponseDataEvent = "connected" ConnectionListLogsResponseDataEventDisconnected ConnectionListLogsResponseDataEvent = "disconnected" ConnectionListLogsResponseDataEventTokenRefreshed ConnectionListLogsResponseDataEvent = "token_refreshed" ConnectionListLogsResponseDataEventError ConnectionListLogsResponseDataEvent = "error" )
func (ConnectionListLogsResponseDataEvent) IsKnown ¶
func (r ConnectionListLogsResponseDataEvent) IsKnown() bool
type ConnectionService ¶
type ConnectionService struct {
Options []option.RequestOption
}
ConnectionService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectionService method instead.
func NewConnectionService ¶
func NewConnectionService(opts ...option.RequestOption) (r *ConnectionService)
NewConnectionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConnectionService) ListLogs ¶
func (r *ConnectionService) ListLogs(ctx context.Context, query ConnectionListLogsParams, opts ...option.RequestOption) (res *ConnectionListLogsResponse, err error)
Returns connection event history for the organization.
type InboxCommentDeleteResponse ¶
type InboxCommentDeleteResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentDeleteResponseJSON `json:"-"`
}
func (*InboxCommentDeleteResponse) UnmarshalJSON ¶
func (r *InboxCommentDeleteResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentGetParams ¶
type InboxCommentGetParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Number of items
Limit param.Field[int64] `query:"limit"`
// Filter by platform
Platform param.Field[InboxCommentGetParamsPlatform] `query:"platform"`
}
func (InboxCommentGetParams) URLQuery ¶
func (r InboxCommentGetParams) URLQuery() (v url.Values)
URLQuery serializes InboxCommentGetParams's query parameters as `url.Values`.
type InboxCommentGetParamsPlatform ¶
type InboxCommentGetParamsPlatform string
Filter by platform
const ( InboxCommentGetParamsPlatformTwitter InboxCommentGetParamsPlatform = "twitter" InboxCommentGetParamsPlatformInstagram InboxCommentGetParamsPlatform = "instagram" InboxCommentGetParamsPlatformFacebook InboxCommentGetParamsPlatform = "facebook" InboxCommentGetParamsPlatformLinkedin InboxCommentGetParamsPlatform = "linkedin" InboxCommentGetParamsPlatformTiktok InboxCommentGetParamsPlatform = "tiktok" InboxCommentGetParamsPlatformYoutube InboxCommentGetParamsPlatform = "youtube" InboxCommentGetParamsPlatformPinterest InboxCommentGetParamsPlatform = "pinterest" InboxCommentGetParamsPlatformReddit InboxCommentGetParamsPlatform = "reddit" InboxCommentGetParamsPlatformBluesky InboxCommentGetParamsPlatform = "bluesky" InboxCommentGetParamsPlatformThreads InboxCommentGetParamsPlatform = "threads" InboxCommentGetParamsPlatformTelegram InboxCommentGetParamsPlatform = "telegram" InboxCommentGetParamsPlatformSnapchat InboxCommentGetParamsPlatform = "snapchat" InboxCommentGetParamsPlatformGooglebusiness InboxCommentGetParamsPlatform = "googlebusiness" InboxCommentGetParamsPlatformWhatsapp InboxCommentGetParamsPlatform = "whatsapp" InboxCommentGetParamsPlatformMastodon InboxCommentGetParamsPlatform = "mastodon" InboxCommentGetParamsPlatformDiscord InboxCommentGetParamsPlatform = "discord" InboxCommentGetParamsPlatformSMS InboxCommentGetParamsPlatform = "sms" )
func (InboxCommentGetParamsPlatform) IsKnown ¶
func (r InboxCommentGetParamsPlatform) IsKnown() bool
type InboxCommentGetResponse ¶
type InboxCommentGetResponse struct {
Data []InboxCommentGetResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor" api:"nullable"`
Platform InboxCommentGetResponsePlatform `json:"platform"`
// Post ID if filtered by post
PostID string `json:"post_id"`
JSON inboxCommentGetResponseJSON `json:"-"`
}
func (*InboxCommentGetResponse) UnmarshalJSON ¶
func (r *InboxCommentGetResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentGetResponseData ¶
type InboxCommentGetResponseData struct {
// Comment ID
ID string `json:"id" api:"required"`
// Comment author name
AuthorName string `json:"author_name" api:"required"`
// Comment timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Platform InboxCommentGetResponseDataPlatform `json:"platform" api:"required"`
// Comment text
Text string `json:"text" api:"required"`
// Social account ID
AccountID string `json:"account_id"`
// Author avatar URL
AuthorAvatar string `json:"author_avatar" api:"nullable"`
// Whether comment is hidden
Hidden bool `json:"hidden"`
// Like count
Likes float64 `json:"likes"`
// Platform post/media/video ID
PostID string `json:"post_id"`
// URL to the post on the platform
PostPlatformURL string `json:"post_platform_url" api:"nullable"`
// Post caption snippet
PostText string `json:"post_text" api:"nullable"`
// Post thumbnail URL
PostThumbnailURL string `json:"post_thumbnail_url" api:"nullable"`
// Reply count
RepliesCount float64 `json:"replies_count"`
JSON inboxCommentGetResponseDataJSON `json:"-"`
}
func (*InboxCommentGetResponseData) UnmarshalJSON ¶
func (r *InboxCommentGetResponseData) UnmarshalJSON(data []byte) (err error)
type InboxCommentGetResponseDataPlatform ¶
type InboxCommentGetResponseDataPlatform string
const ( InboxCommentGetResponseDataPlatformTwitter InboxCommentGetResponseDataPlatform = "twitter" InboxCommentGetResponseDataPlatformInstagram InboxCommentGetResponseDataPlatform = "instagram" InboxCommentGetResponseDataPlatformFacebook InboxCommentGetResponseDataPlatform = "facebook" InboxCommentGetResponseDataPlatformLinkedin InboxCommentGetResponseDataPlatform = "linkedin" InboxCommentGetResponseDataPlatformTiktok InboxCommentGetResponseDataPlatform = "tiktok" InboxCommentGetResponseDataPlatformYoutube InboxCommentGetResponseDataPlatform = "youtube" InboxCommentGetResponseDataPlatformPinterest InboxCommentGetResponseDataPlatform = "pinterest" InboxCommentGetResponseDataPlatformReddit InboxCommentGetResponseDataPlatform = "reddit" InboxCommentGetResponseDataPlatformBluesky InboxCommentGetResponseDataPlatform = "bluesky" InboxCommentGetResponseDataPlatformThreads InboxCommentGetResponseDataPlatform = "threads" InboxCommentGetResponseDataPlatformTelegram InboxCommentGetResponseDataPlatform = "telegram" InboxCommentGetResponseDataPlatformSnapchat InboxCommentGetResponseDataPlatform = "snapchat" InboxCommentGetResponseDataPlatformGooglebusiness InboxCommentGetResponseDataPlatform = "googlebusiness" InboxCommentGetResponseDataPlatformWhatsapp InboxCommentGetResponseDataPlatform = "whatsapp" InboxCommentGetResponseDataPlatformMastodon InboxCommentGetResponseDataPlatform = "mastodon" InboxCommentGetResponseDataPlatformDiscord InboxCommentGetResponseDataPlatform = "discord" InboxCommentGetResponseDataPlatformSMS InboxCommentGetResponseDataPlatform = "sms" )
func (InboxCommentGetResponseDataPlatform) IsKnown ¶
func (r InboxCommentGetResponseDataPlatform) IsKnown() bool
type InboxCommentGetResponsePlatform ¶
type InboxCommentGetResponsePlatform string
const ( InboxCommentGetResponsePlatformTwitter InboxCommentGetResponsePlatform = "twitter" InboxCommentGetResponsePlatformInstagram InboxCommentGetResponsePlatform = "instagram" InboxCommentGetResponsePlatformFacebook InboxCommentGetResponsePlatform = "facebook" InboxCommentGetResponsePlatformLinkedin InboxCommentGetResponsePlatform = "linkedin" InboxCommentGetResponsePlatformTiktok InboxCommentGetResponsePlatform = "tiktok" InboxCommentGetResponsePlatformYoutube InboxCommentGetResponsePlatform = "youtube" InboxCommentGetResponsePlatformPinterest InboxCommentGetResponsePlatform = "pinterest" InboxCommentGetResponsePlatformReddit InboxCommentGetResponsePlatform = "reddit" InboxCommentGetResponsePlatformBluesky InboxCommentGetResponsePlatform = "bluesky" InboxCommentGetResponsePlatformThreads InboxCommentGetResponsePlatform = "threads" InboxCommentGetResponsePlatformTelegram InboxCommentGetResponsePlatform = "telegram" InboxCommentGetResponsePlatformSnapchat InboxCommentGetResponsePlatform = "snapchat" InboxCommentGetResponsePlatformGooglebusiness InboxCommentGetResponsePlatform = "googlebusiness" InboxCommentGetResponsePlatformWhatsapp InboxCommentGetResponsePlatform = "whatsapp" InboxCommentGetResponsePlatformMastodon InboxCommentGetResponsePlatform = "mastodon" InboxCommentGetResponsePlatformDiscord InboxCommentGetResponsePlatform = "discord" InboxCommentGetResponsePlatformSMS InboxCommentGetResponsePlatform = "sms" )
func (InboxCommentGetResponsePlatform) IsKnown ¶
func (r InboxCommentGetResponsePlatform) IsKnown() bool
type InboxCommentHideDeleteResponse ¶
type InboxCommentHideDeleteResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentHideDeleteResponseJSON `json:"-"`
}
func (*InboxCommentHideDeleteResponse) UnmarshalJSON ¶
func (r *InboxCommentHideDeleteResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentHideNewResponse ¶
type InboxCommentHideNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentHideNewResponseJSON `json:"-"`
}
func (*InboxCommentHideNewResponse) UnmarshalJSON ¶
func (r *InboxCommentHideNewResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentHideService ¶
type InboxCommentHideService struct {
Options []option.RequestOption
}
InboxCommentHideService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxCommentHideService method instead.
func NewInboxCommentHideService ¶
func NewInboxCommentHideService(opts ...option.RequestOption) (r *InboxCommentHideService)
NewInboxCommentHideService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxCommentHideService) Delete ¶
func (r *InboxCommentHideService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentHideDeleteResponse, err error)
Unhide a comment
func (*InboxCommentHideService) New ¶
func (r *InboxCommentHideService) New(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentHideNewResponse, err error)
Hide a comment
type InboxCommentLikeDeleteResponse ¶
type InboxCommentLikeDeleteResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentLikeDeleteResponseJSON `json:"-"`
}
func (*InboxCommentLikeDeleteResponse) UnmarshalJSON ¶
func (r *InboxCommentLikeDeleteResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentLikeNewResponse ¶
type InboxCommentLikeNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentLikeNewResponseJSON `json:"-"`
}
func (*InboxCommentLikeNewResponse) UnmarshalJSON ¶
func (r *InboxCommentLikeNewResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentLikeService ¶
type InboxCommentLikeService struct {
Options []option.RequestOption
}
InboxCommentLikeService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxCommentLikeService method instead.
func NewInboxCommentLikeService ¶
func NewInboxCommentLikeService(opts ...option.RequestOption) (r *InboxCommentLikeService)
NewInboxCommentLikeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxCommentLikeService) Delete ¶
func (r *InboxCommentLikeService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentLikeDeleteResponse, err error)
Unlike a comment
func (*InboxCommentLikeService) New ¶
func (r *InboxCommentLikeService) New(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentLikeNewResponse, err error)
Like a comment
type InboxCommentListParams ¶
type InboxCommentListParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Number of items
Limit param.Field[int64] `query:"limit"`
// Filter by platform
Platform param.Field[InboxCommentListParamsPlatform] `query:"platform"`
}
func (InboxCommentListParams) URLQuery ¶
func (r InboxCommentListParams) URLQuery() (v url.Values)
URLQuery serializes InboxCommentListParams's query parameters as `url.Values`.
type InboxCommentListParamsPlatform ¶
type InboxCommentListParamsPlatform string
Filter by platform
const ( InboxCommentListParamsPlatformTwitter InboxCommentListParamsPlatform = "twitter" InboxCommentListParamsPlatformInstagram InboxCommentListParamsPlatform = "instagram" InboxCommentListParamsPlatformFacebook InboxCommentListParamsPlatform = "facebook" InboxCommentListParamsPlatformLinkedin InboxCommentListParamsPlatform = "linkedin" InboxCommentListParamsPlatformTiktok InboxCommentListParamsPlatform = "tiktok" InboxCommentListParamsPlatformYoutube InboxCommentListParamsPlatform = "youtube" InboxCommentListParamsPlatformPinterest InboxCommentListParamsPlatform = "pinterest" InboxCommentListParamsPlatformReddit InboxCommentListParamsPlatform = "reddit" InboxCommentListParamsPlatformBluesky InboxCommentListParamsPlatform = "bluesky" InboxCommentListParamsPlatformThreads InboxCommentListParamsPlatform = "threads" InboxCommentListParamsPlatformTelegram InboxCommentListParamsPlatform = "telegram" InboxCommentListParamsPlatformSnapchat InboxCommentListParamsPlatform = "snapchat" InboxCommentListParamsPlatformGooglebusiness InboxCommentListParamsPlatform = "googlebusiness" InboxCommentListParamsPlatformWhatsapp InboxCommentListParamsPlatform = "whatsapp" InboxCommentListParamsPlatformMastodon InboxCommentListParamsPlatform = "mastodon" InboxCommentListParamsPlatformDiscord InboxCommentListParamsPlatform = "discord" InboxCommentListParamsPlatformSMS InboxCommentListParamsPlatform = "sms" )
func (InboxCommentListParamsPlatform) IsKnown ¶
func (r InboxCommentListParamsPlatform) IsKnown() bool
type InboxCommentListResponse ¶
type InboxCommentListResponse struct {
Data []InboxCommentListResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor" api:"nullable"`
Platform InboxCommentListResponsePlatform `json:"platform"`
// Post ID if filtered by post
PostID string `json:"post_id"`
JSON inboxCommentListResponseJSON `json:"-"`
}
func (*InboxCommentListResponse) UnmarshalJSON ¶
func (r *InboxCommentListResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentListResponseData ¶
type InboxCommentListResponseData struct {
// Comment ID
ID string `json:"id" api:"required"`
// Comment author name
AuthorName string `json:"author_name" api:"required"`
// Comment timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Platform InboxCommentListResponseDataPlatform `json:"platform" api:"required"`
// Comment text
Text string `json:"text" api:"required"`
// Social account ID
AccountID string `json:"account_id"`
// Author avatar URL
AuthorAvatar string `json:"author_avatar" api:"nullable"`
// Whether comment is hidden
Hidden bool `json:"hidden"`
// Like count
Likes float64 `json:"likes"`
// Platform post/media/video ID
PostID string `json:"post_id"`
// URL to the post on the platform
PostPlatformURL string `json:"post_platform_url" api:"nullable"`
// Post caption snippet
PostText string `json:"post_text" api:"nullable"`
// Post thumbnail URL
PostThumbnailURL string `json:"post_thumbnail_url" api:"nullable"`
// Reply count
RepliesCount float64 `json:"replies_count"`
JSON inboxCommentListResponseDataJSON `json:"-"`
}
func (*InboxCommentListResponseData) UnmarshalJSON ¶
func (r *InboxCommentListResponseData) UnmarshalJSON(data []byte) (err error)
type InboxCommentListResponseDataPlatform ¶
type InboxCommentListResponseDataPlatform string
const ( InboxCommentListResponseDataPlatformTwitter InboxCommentListResponseDataPlatform = "twitter" InboxCommentListResponseDataPlatformInstagram InboxCommentListResponseDataPlatform = "instagram" InboxCommentListResponseDataPlatformFacebook InboxCommentListResponseDataPlatform = "facebook" InboxCommentListResponseDataPlatformLinkedin InboxCommentListResponseDataPlatform = "linkedin" InboxCommentListResponseDataPlatformTiktok InboxCommentListResponseDataPlatform = "tiktok" InboxCommentListResponseDataPlatformYoutube InboxCommentListResponseDataPlatform = "youtube" InboxCommentListResponseDataPlatformPinterest InboxCommentListResponseDataPlatform = "pinterest" InboxCommentListResponseDataPlatformReddit InboxCommentListResponseDataPlatform = "reddit" InboxCommentListResponseDataPlatformBluesky InboxCommentListResponseDataPlatform = "bluesky" InboxCommentListResponseDataPlatformThreads InboxCommentListResponseDataPlatform = "threads" InboxCommentListResponseDataPlatformTelegram InboxCommentListResponseDataPlatform = "telegram" InboxCommentListResponseDataPlatformSnapchat InboxCommentListResponseDataPlatform = "snapchat" InboxCommentListResponseDataPlatformGooglebusiness InboxCommentListResponseDataPlatform = "googlebusiness" InboxCommentListResponseDataPlatformWhatsapp InboxCommentListResponseDataPlatform = "whatsapp" InboxCommentListResponseDataPlatformMastodon InboxCommentListResponseDataPlatform = "mastodon" InboxCommentListResponseDataPlatformDiscord InboxCommentListResponseDataPlatform = "discord" InboxCommentListResponseDataPlatformSMS InboxCommentListResponseDataPlatform = "sms" )
func (InboxCommentListResponseDataPlatform) IsKnown ¶
func (r InboxCommentListResponseDataPlatform) IsKnown() bool
type InboxCommentListResponsePlatform ¶
type InboxCommentListResponsePlatform string
const ( InboxCommentListResponsePlatformTwitter InboxCommentListResponsePlatform = "twitter" InboxCommentListResponsePlatformInstagram InboxCommentListResponsePlatform = "instagram" InboxCommentListResponsePlatformFacebook InboxCommentListResponsePlatform = "facebook" InboxCommentListResponsePlatformLinkedin InboxCommentListResponsePlatform = "linkedin" InboxCommentListResponsePlatformTiktok InboxCommentListResponsePlatform = "tiktok" InboxCommentListResponsePlatformYoutube InboxCommentListResponsePlatform = "youtube" InboxCommentListResponsePlatformPinterest InboxCommentListResponsePlatform = "pinterest" InboxCommentListResponsePlatformReddit InboxCommentListResponsePlatform = "reddit" InboxCommentListResponsePlatformBluesky InboxCommentListResponsePlatform = "bluesky" InboxCommentListResponsePlatformThreads InboxCommentListResponsePlatform = "threads" InboxCommentListResponsePlatformTelegram InboxCommentListResponsePlatform = "telegram" InboxCommentListResponsePlatformSnapchat InboxCommentListResponsePlatform = "snapchat" InboxCommentListResponsePlatformGooglebusiness InboxCommentListResponsePlatform = "googlebusiness" InboxCommentListResponsePlatformWhatsapp InboxCommentListResponsePlatform = "whatsapp" InboxCommentListResponsePlatformMastodon InboxCommentListResponsePlatform = "mastodon" InboxCommentListResponsePlatformDiscord InboxCommentListResponsePlatform = "discord" InboxCommentListResponsePlatformSMS InboxCommentListResponsePlatform = "sms" )
func (InboxCommentListResponsePlatform) IsKnown ¶
func (r InboxCommentListResponsePlatform) IsKnown() bool
type InboxCommentPrivateReplyParams ¶
type InboxCommentPrivateReplyParams struct {
// Account ID to reply from
AccountID param.Field[string] `json:"account_id" api:"required"`
// Private reply text
Text param.Field[string] `json:"text" api:"required"`
}
func (InboxCommentPrivateReplyParams) MarshalJSON ¶
func (r InboxCommentPrivateReplyParams) MarshalJSON() (data []byte, err error)
type InboxCommentPrivateReplyResponse ¶
type InboxCommentPrivateReplyResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentPrivateReplyResponseJSON `json:"-"`
}
func (*InboxCommentPrivateReplyResponse) UnmarshalJSON ¶
func (r *InboxCommentPrivateReplyResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentReplyParams ¶
type InboxCommentReplyParams struct {
// Account ID to reply from
AccountID param.Field[string] `json:"account_id" api:"required"`
// Reply text
Text param.Field[string] `json:"text" api:"required"`
// Parent comment ID for threaded replies
CommentID param.Field[string] `json:"comment_id"`
}
func (InboxCommentReplyParams) MarshalJSON ¶
func (r InboxCommentReplyParams) MarshalJSON() (data []byte, err error)
type InboxCommentReplyResponse ¶
type InboxCommentReplyResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Comment ID
CommentID string `json:"comment_id"`
JSON inboxCommentReplyResponseJSON `json:"-"`
}
func (*InboxCommentReplyResponse) UnmarshalJSON ¶
func (r *InboxCommentReplyResponse) UnmarshalJSON(data []byte) (err error)
type InboxCommentService ¶
type InboxCommentService struct {
Options []option.RequestOption
Hide *InboxCommentHideService
Like *InboxCommentLikeService
}
InboxCommentService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxCommentService method instead.
func NewInboxCommentService ¶
func NewInboxCommentService(opts ...option.RequestOption) (r *InboxCommentService)
NewInboxCommentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxCommentService) Delete ¶
func (r *InboxCommentService) Delete(ctx context.Context, commentID string, opts ...option.RequestOption) (res *InboxCommentDeleteResponse, err error)
Delete a comment
func (*InboxCommentService) Get ¶
func (r *InboxCommentService) Get(ctx context.Context, postID string, query InboxCommentGetParams, opts ...option.RequestOption) (res *InboxCommentGetResponse, err error)
Get comments for a specific post
func (*InboxCommentService) List ¶
func (r *InboxCommentService) List(ctx context.Context, query InboxCommentListParams, opts ...option.RequestOption) (res *InboxCommentListResponse, err error)
List comments across platforms
func (*InboxCommentService) PrivateReply ¶
func (r *InboxCommentService) PrivateReply(ctx context.Context, commentID string, body InboxCommentPrivateReplyParams, opts ...option.RequestOption) (res *InboxCommentPrivateReplyResponse, err error)
Send a private reply to a commenter
func (*InboxCommentService) Reply ¶
func (r *InboxCommentService) Reply(ctx context.Context, postID string, body InboxCommentReplyParams, opts ...option.RequestOption) (res *InboxCommentReplyResponse, err error)
Reply to a comment
type InboxMessageArchiveResponse ¶
type InboxMessageArchiveResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Message ID
MessageID string `json:"message_id"`
JSON inboxMessageArchiveResponseJSON `json:"-"`
}
func (*InboxMessageArchiveResponse) UnmarshalJSON ¶
func (r *InboxMessageArchiveResponse) UnmarshalJSON(data []byte) (err error)
type InboxMessageEditParams ¶
type InboxMessageEditParams struct {
// Updated message text
Text param.Field[string] `json:"text" api:"required"`
}
func (InboxMessageEditParams) MarshalJSON ¶
func (r InboxMessageEditParams) MarshalJSON() (data []byte, err error)
type InboxMessageEditResponse ¶
type InboxMessageEditResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Message ID
MessageID string `json:"message_id"`
JSON inboxMessageEditResponseJSON `json:"-"`
}
func (*InboxMessageEditResponse) UnmarshalJSON ¶
func (r *InboxMessageEditResponse) UnmarshalJSON(data []byte) (err error)
type InboxMessageGetResponse ¶
type InboxMessageGetResponse struct {
Data []InboxMessageGetResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more"`
NextCursor string `json:"next_cursor" api:"nullable"`
JSON inboxMessageGetResponseJSON `json:"-"`
}
func (*InboxMessageGetResponse) UnmarshalJSON ¶
func (r *InboxMessageGetResponse) UnmarshalJSON(data []byte) (err error)
type InboxMessageGetResponseData ¶
type InboxMessageGetResponseData struct {
// Message ID
ID string `json:"id" api:"required"`
// Message timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Message sender
Sender InboxMessageGetResponseDataSender `json:"sender" api:"required"`
// Message text
Text string `json:"text" api:"required"`
// Message attachments
Attachments []InboxMessageGetResponseDataAttachment `json:"attachments"`
JSON inboxMessageGetResponseDataJSON `json:"-"`
}
func (*InboxMessageGetResponseData) UnmarshalJSON ¶
func (r *InboxMessageGetResponseData) UnmarshalJSON(data []byte) (err error)
type InboxMessageGetResponseDataAttachment ¶
type InboxMessageGetResponseDataAttachment struct {
// Attachment MIME type
Type string `json:"type" api:"required"`
// Attachment URL
URL string `json:"url" api:"required"`
JSON inboxMessageGetResponseDataAttachmentJSON `json:"-"`
}
func (*InboxMessageGetResponseDataAttachment) UnmarshalJSON ¶
func (r *InboxMessageGetResponseDataAttachment) UnmarshalJSON(data []byte) (err error)
type InboxMessageGetResponseDataSender ¶
type InboxMessageGetResponseDataSender string
Message sender
const ( InboxMessageGetResponseDataSenderUser InboxMessageGetResponseDataSender = "user" InboxMessageGetResponseDataSenderParticipant InboxMessageGetResponseDataSender = "participant" )
func (InboxMessageGetResponseDataSender) IsKnown ¶
func (r InboxMessageGetResponseDataSender) IsKnown() bool
type InboxMessageListParams ¶
type InboxMessageListParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Number of items
Limit param.Field[int64] `query:"limit"`
// Filter by platform
Platform param.Field[InboxMessageListParamsPlatform] `query:"platform"`
}
func (InboxMessageListParams) URLQuery ¶
func (r InboxMessageListParams) URLQuery() (v url.Values)
URLQuery serializes InboxMessageListParams's query parameters as `url.Values`.
type InboxMessageListParamsPlatform ¶
type InboxMessageListParamsPlatform string
Filter by platform
const ( InboxMessageListParamsPlatformTwitter InboxMessageListParamsPlatform = "twitter" InboxMessageListParamsPlatformInstagram InboxMessageListParamsPlatform = "instagram" InboxMessageListParamsPlatformFacebook InboxMessageListParamsPlatform = "facebook" InboxMessageListParamsPlatformLinkedin InboxMessageListParamsPlatform = "linkedin" InboxMessageListParamsPlatformTiktok InboxMessageListParamsPlatform = "tiktok" InboxMessageListParamsPlatformYoutube InboxMessageListParamsPlatform = "youtube" InboxMessageListParamsPlatformPinterest InboxMessageListParamsPlatform = "pinterest" InboxMessageListParamsPlatformReddit InboxMessageListParamsPlatform = "reddit" InboxMessageListParamsPlatformBluesky InboxMessageListParamsPlatform = "bluesky" InboxMessageListParamsPlatformThreads InboxMessageListParamsPlatform = "threads" InboxMessageListParamsPlatformTelegram InboxMessageListParamsPlatform = "telegram" InboxMessageListParamsPlatformSnapchat InboxMessageListParamsPlatform = "snapchat" InboxMessageListParamsPlatformGooglebusiness InboxMessageListParamsPlatform = "googlebusiness" InboxMessageListParamsPlatformWhatsapp InboxMessageListParamsPlatform = "whatsapp" InboxMessageListParamsPlatformMastodon InboxMessageListParamsPlatform = "mastodon" InboxMessageListParamsPlatformDiscord InboxMessageListParamsPlatform = "discord" InboxMessageListParamsPlatformSMS InboxMessageListParamsPlatform = "sms" )
func (InboxMessageListParamsPlatform) IsKnown ¶
func (r InboxMessageListParamsPlatform) IsKnown() bool
type InboxMessageListResponse ¶
type InboxMessageListResponse struct {
Data []InboxMessageListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON inboxMessageListResponseJSON `json:"-"`
}
func (*InboxMessageListResponse) UnmarshalJSON ¶
func (r *InboxMessageListResponse) UnmarshalJSON(data []byte) (err error)
type InboxMessageListResponseData ¶
type InboxMessageListResponseData struct {
// Conversation ID
ID string `json:"id" api:"required"`
// Account ID
AccountID string `json:"account_id" api:"required"`
// Participant display name
ParticipantName string `json:"participant_name" api:"required"`
Platform InboxMessageListResponseDataPlatform `json:"platform" api:"required"`
// Last updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Last message text
LastMessage string `json:"last_message" api:"nullable"`
// Participant avatar URL
ParticipantAvatar string `json:"participant_avatar" api:"nullable"`
// Unread message count
UnreadCount float64 `json:"unread_count"`
JSON inboxMessageListResponseDataJSON `json:"-"`
}
func (*InboxMessageListResponseData) UnmarshalJSON ¶
func (r *InboxMessageListResponseData) UnmarshalJSON(data []byte) (err error)
type InboxMessageListResponseDataPlatform ¶
type InboxMessageListResponseDataPlatform string
const ( InboxMessageListResponseDataPlatformTwitter InboxMessageListResponseDataPlatform = "twitter" InboxMessageListResponseDataPlatformInstagram InboxMessageListResponseDataPlatform = "instagram" InboxMessageListResponseDataPlatformFacebook InboxMessageListResponseDataPlatform = "facebook" InboxMessageListResponseDataPlatformLinkedin InboxMessageListResponseDataPlatform = "linkedin" InboxMessageListResponseDataPlatformTiktok InboxMessageListResponseDataPlatform = "tiktok" InboxMessageListResponseDataPlatformYoutube InboxMessageListResponseDataPlatform = "youtube" InboxMessageListResponseDataPlatformPinterest InboxMessageListResponseDataPlatform = "pinterest" InboxMessageListResponseDataPlatformReddit InboxMessageListResponseDataPlatform = "reddit" InboxMessageListResponseDataPlatformBluesky InboxMessageListResponseDataPlatform = "bluesky" InboxMessageListResponseDataPlatformThreads InboxMessageListResponseDataPlatform = "threads" InboxMessageListResponseDataPlatformTelegram InboxMessageListResponseDataPlatform = "telegram" InboxMessageListResponseDataPlatformSnapchat InboxMessageListResponseDataPlatform = "snapchat" InboxMessageListResponseDataPlatformGooglebusiness InboxMessageListResponseDataPlatform = "googlebusiness" InboxMessageListResponseDataPlatformWhatsapp InboxMessageListResponseDataPlatform = "whatsapp" InboxMessageListResponseDataPlatformMastodon InboxMessageListResponseDataPlatform = "mastodon" InboxMessageListResponseDataPlatformDiscord InboxMessageListResponseDataPlatform = "discord" InboxMessageListResponseDataPlatformSMS InboxMessageListResponseDataPlatform = "sms" )
func (InboxMessageListResponseDataPlatform) IsKnown ¶
func (r InboxMessageListResponseDataPlatform) IsKnown() bool
type InboxMessageSendParams ¶
type InboxMessageSendParams struct {
// Account ID to send from
AccountID param.Field[string] `json:"account_id" api:"required"`
// Message text
Text param.Field[string] `json:"text" api:"required"`
// Attachments
Attachments param.Field[[]InboxMessageSendParamsAttachment] `json:"attachments"`
// Message tag (e.g. for Facebook outside 24h window)
MessageTag param.Field[string] `json:"message_tag"`
// Message ID to reply to
ReplyTo param.Field[string] `json:"reply_to"`
}
func (InboxMessageSendParams) MarshalJSON ¶
func (r InboxMessageSendParams) MarshalJSON() (data []byte, err error)
type InboxMessageSendParamsAttachment ¶
type InboxMessageSendParamsAttachment struct {
// Attachment MIME type
Type param.Field[string] `json:"type" api:"required"`
// Attachment URL
URL param.Field[string] `json:"url" api:"required" format:"uri"`
}
func (InboxMessageSendParamsAttachment) MarshalJSON ¶
func (r InboxMessageSendParamsAttachment) MarshalJSON() (data []byte, err error)
type InboxMessageSendResponse ¶
type InboxMessageSendResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
// Message ID
MessageID string `json:"message_id"`
JSON inboxMessageSendResponseJSON `json:"-"`
}
func (*InboxMessageSendResponse) UnmarshalJSON ¶
func (r *InboxMessageSendResponse) UnmarshalJSON(data []byte) (err error)
type InboxMessageService ¶
type InboxMessageService struct {
Options []option.RequestOption
}
InboxMessageService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxMessageService method instead.
func NewInboxMessageService ¶
func NewInboxMessageService(opts ...option.RequestOption) (r *InboxMessageService)
NewInboxMessageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxMessageService) Archive ¶
func (r *InboxMessageService) Archive(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageArchiveResponse, err error)
Archive a conversation
func (*InboxMessageService) Edit ¶
func (r *InboxMessageService) Edit(ctx context.Context, conversationID string, messageID string, body InboxMessageEditParams, opts ...option.RequestOption) (res *InboxMessageEditResponse, err error)
Edit a sent message
func (*InboxMessageService) Get ¶
func (r *InboxMessageService) Get(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *InboxMessageGetResponse, err error)
Get messages in a conversation
func (*InboxMessageService) List ¶
func (r *InboxMessageService) List(ctx context.Context, query InboxMessageListParams, opts ...option.RequestOption) (res *InboxMessageListResponse, err error)
List message conversations
func (*InboxMessageService) Send ¶
func (r *InboxMessageService) Send(ctx context.Context, conversationID string, body InboxMessageSendParams, opts ...option.RequestOption) (res *InboxMessageSendResponse, err error)
Send a message in a conversation
type InboxReviewListParams ¶
type InboxReviewListParams struct {
// Filter by account ID
AccountID param.Field[string] `query:"account_id"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Number of items
Limit param.Field[int64] `query:"limit"`
MaxRating param.Field[int64] `query:"max_rating"`
MinRating param.Field[int64] `query:"min_rating"`
// Filter by platform
Platform param.Field[InboxReviewListParamsPlatform] `query:"platform"`
}
func (InboxReviewListParams) URLQuery ¶
func (r InboxReviewListParams) URLQuery() (v url.Values)
URLQuery serializes InboxReviewListParams's query parameters as `url.Values`.
type InboxReviewListParamsPlatform ¶
type InboxReviewListParamsPlatform string
Filter by platform
const ( InboxReviewListParamsPlatformTwitter InboxReviewListParamsPlatform = "twitter" InboxReviewListParamsPlatformInstagram InboxReviewListParamsPlatform = "instagram" InboxReviewListParamsPlatformFacebook InboxReviewListParamsPlatform = "facebook" InboxReviewListParamsPlatformLinkedin InboxReviewListParamsPlatform = "linkedin" InboxReviewListParamsPlatformTiktok InboxReviewListParamsPlatform = "tiktok" InboxReviewListParamsPlatformYoutube InboxReviewListParamsPlatform = "youtube" InboxReviewListParamsPlatformPinterest InboxReviewListParamsPlatform = "pinterest" InboxReviewListParamsPlatformReddit InboxReviewListParamsPlatform = "reddit" InboxReviewListParamsPlatformBluesky InboxReviewListParamsPlatform = "bluesky" InboxReviewListParamsPlatformThreads InboxReviewListParamsPlatform = "threads" InboxReviewListParamsPlatformTelegram InboxReviewListParamsPlatform = "telegram" InboxReviewListParamsPlatformSnapchat InboxReviewListParamsPlatform = "snapchat" InboxReviewListParamsPlatformGooglebusiness InboxReviewListParamsPlatform = "googlebusiness" InboxReviewListParamsPlatformWhatsapp InboxReviewListParamsPlatform = "whatsapp" InboxReviewListParamsPlatformMastodon InboxReviewListParamsPlatform = "mastodon" InboxReviewListParamsPlatformDiscord InboxReviewListParamsPlatform = "discord" InboxReviewListParamsPlatformSMS InboxReviewListParamsPlatform = "sms" )
func (InboxReviewListParamsPlatform) IsKnown ¶
func (r InboxReviewListParamsPlatform) IsKnown() bool
type InboxReviewListResponse ¶
type InboxReviewListResponse struct {
Data []InboxReviewListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON inboxReviewListResponseJSON `json:"-"`
}
func (*InboxReviewListResponse) UnmarshalJSON ¶
func (r *InboxReviewListResponse) UnmarshalJSON(data []byte) (err error)
type InboxReviewListResponseData ¶
type InboxReviewListResponseData struct {
// Review ID
ID string `json:"id" api:"required"`
// Review author name
AuthorName string `json:"author_name" api:"required"`
// Review timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Platform InboxReviewListResponseDataPlatform `json:"platform" api:"required"`
// Rating (1-5)
Rating float64 `json:"rating" api:"required"`
// Business reply text
Reply string `json:"reply" api:"nullable"`
// Review text
Text string `json:"text" api:"nullable"`
JSON inboxReviewListResponseDataJSON `json:"-"`
}
func (*InboxReviewListResponseData) UnmarshalJSON ¶
func (r *InboxReviewListResponseData) UnmarshalJSON(data []byte) (err error)
type InboxReviewListResponseDataPlatform ¶
type InboxReviewListResponseDataPlatform string
const ( InboxReviewListResponseDataPlatformTwitter InboxReviewListResponseDataPlatform = "twitter" InboxReviewListResponseDataPlatformInstagram InboxReviewListResponseDataPlatform = "instagram" InboxReviewListResponseDataPlatformFacebook InboxReviewListResponseDataPlatform = "facebook" InboxReviewListResponseDataPlatformLinkedin InboxReviewListResponseDataPlatform = "linkedin" InboxReviewListResponseDataPlatformTiktok InboxReviewListResponseDataPlatform = "tiktok" InboxReviewListResponseDataPlatformYoutube InboxReviewListResponseDataPlatform = "youtube" InboxReviewListResponseDataPlatformPinterest InboxReviewListResponseDataPlatform = "pinterest" InboxReviewListResponseDataPlatformReddit InboxReviewListResponseDataPlatform = "reddit" InboxReviewListResponseDataPlatformBluesky InboxReviewListResponseDataPlatform = "bluesky" InboxReviewListResponseDataPlatformThreads InboxReviewListResponseDataPlatform = "threads" InboxReviewListResponseDataPlatformTelegram InboxReviewListResponseDataPlatform = "telegram" InboxReviewListResponseDataPlatformSnapchat InboxReviewListResponseDataPlatform = "snapchat" InboxReviewListResponseDataPlatformGooglebusiness InboxReviewListResponseDataPlatform = "googlebusiness" InboxReviewListResponseDataPlatformWhatsapp InboxReviewListResponseDataPlatform = "whatsapp" InboxReviewListResponseDataPlatformMastodon InboxReviewListResponseDataPlatform = "mastodon" InboxReviewListResponseDataPlatformDiscord InboxReviewListResponseDataPlatform = "discord" InboxReviewListResponseDataPlatformSMS InboxReviewListResponseDataPlatform = "sms" )
func (InboxReviewListResponseDataPlatform) IsKnown ¶
func (r InboxReviewListResponseDataPlatform) IsKnown() bool
type InboxReviewReplyDeleteResponse ¶
type InboxReviewReplyDeleteResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON inboxReviewReplyDeleteResponseJSON `json:"-"`
}
func (*InboxReviewReplyDeleteResponse) UnmarshalJSON ¶
func (r *InboxReviewReplyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type InboxReviewReplyNewParams ¶
type InboxReviewReplyNewParams struct {
// Account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Reply text
Text param.Field[string] `json:"text" api:"required"`
}
func (InboxReviewReplyNewParams) MarshalJSON ¶
func (r InboxReviewReplyNewParams) MarshalJSON() (data []byte, err error)
type InboxReviewReplyNewResponse ¶
type InboxReviewReplyNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON inboxReviewReplyNewResponseJSON `json:"-"`
}
func (*InboxReviewReplyNewResponse) UnmarshalJSON ¶
func (r *InboxReviewReplyNewResponse) UnmarshalJSON(data []byte) (err error)
type InboxReviewReplyService ¶
type InboxReviewReplyService struct {
Options []option.RequestOption
}
InboxReviewReplyService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxReviewReplyService method instead.
func NewInboxReviewReplyService ¶
func NewInboxReviewReplyService(opts ...option.RequestOption) (r *InboxReviewReplyService)
NewInboxReviewReplyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxReviewReplyService) Delete ¶
func (r *InboxReviewReplyService) Delete(ctx context.Context, reviewID string, opts ...option.RequestOption) (res *InboxReviewReplyDeleteResponse, err error)
Delete a review reply
func (*InboxReviewReplyService) New ¶
func (r *InboxReviewReplyService) New(ctx context.Context, reviewID string, body InboxReviewReplyNewParams, opts ...option.RequestOption) (res *InboxReviewReplyNewResponse, err error)
Reply to a review
type InboxReviewService ¶
type InboxReviewService struct {
Options []option.RequestOption
Reply *InboxReviewReplyService
}
InboxReviewService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxReviewService method instead.
func NewInboxReviewService ¶
func NewInboxReviewService(opts ...option.RequestOption) (r *InboxReviewService)
NewInboxReviewService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InboxReviewService) List ¶
func (r *InboxReviewService) List(ctx context.Context, query InboxReviewListParams, opts ...option.RequestOption) (res *InboxReviewListResponse, err error)
List reviews across platforms
type InboxService ¶
type InboxService struct {
Options []option.RequestOption
Comments *InboxCommentService
Messages *InboxMessageService
Reviews *InboxReviewService
}
InboxService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInboxService method instead.
func NewInboxService ¶
func NewInboxService(opts ...option.RequestOption) (r *InboxService)
NewInboxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type MediaGetPresignURLParams ¶
type MediaGetPresignURLParams struct {
// MIME type of the file to upload
ContentType param.Field[string] `json:"content_type" api:"required"`
// Desired filename
Filename param.Field[string] `json:"filename" api:"required"`
}
func (MediaGetPresignURLParams) MarshalJSON ¶
func (r MediaGetPresignURLParams) MarshalJSON() (data []byte, err error)
type MediaGetPresignURLResponse ¶
type MediaGetPresignURLResponse struct {
// Seconds until the upload URL expires
ExpiresIn int64 `json:"expires_in" api:"required"`
// Pre-signed PUT URL for uploading
UploadURL string `json:"upload_url" api:"required" format:"uri"`
// Public URL after upload completes
URL string `json:"url" api:"required" format:"uri"`
JSON mediaGetPresignURLResponseJSON `json:"-"`
}
func (*MediaGetPresignURLResponse) UnmarshalJSON ¶
func (r *MediaGetPresignURLResponse) UnmarshalJSON(data []byte) (err error)
type MediaGetResponse ¶
type MediaGetResponse struct {
// Media ID
ID string `json:"id" api:"required"`
// Upload timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Original filename
Filename string `json:"filename" api:"required"`
// MIME type
MimeType string `json:"mime_type" api:"required"`
// File size in bytes
Size int64 `json:"size" api:"required"`
// Public URL
URL string `json:"url" api:"required,nullable" format:"uri"`
// Duration in seconds (video/audio)
Duration int64 `json:"duration" api:"nullable"`
// Height in pixels
Height int64 `json:"height" api:"nullable"`
// Width in pixels
Width int64 `json:"width" api:"nullable"`
JSON mediaGetResponseJSON `json:"-"`
}
func (*MediaGetResponse) UnmarshalJSON ¶
func (r *MediaGetResponse) UnmarshalJSON(data []byte) (err error)
type MediaService ¶
type MediaService struct {
Options []option.RequestOption
}
MediaService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMediaService method instead.
func NewMediaService ¶
func NewMediaService(opts ...option.RequestOption) (r *MediaService)
NewMediaService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MediaService) Delete ¶
func (r *MediaService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete media
func (*MediaService) Get ¶
func (r *MediaService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MediaGetResponse, err error)
Get media details
func (*MediaService) GetPresignURL ¶
func (r *MediaService) GetPresignURL(ctx context.Context, body MediaGetPresignURLParams, opts ...option.RequestOption) (res *MediaGetPresignURLResponse, err error)
Generate a pre-signed URL for direct upload to R2. The client can PUT the file to the returned URL.
func (*MediaService) Upload ¶
func (r *MediaService) Upload(ctx context.Context, body io.Reader, params MediaUploadParams, opts ...option.RequestOption) (res *MediaUploadResponse, err error)
Upload a raw file body. Pass the filename as a query parameter and set the Content-Type header.
type MediaUploadParams ¶
type MediaUploadParams struct {
// Original filename
Filename param.Field[string] `query:"filename" api:"required"`
}
func (MediaUploadParams) MarshalMultipart ¶
func (r MediaUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
func (MediaUploadParams) URLQuery ¶
func (r MediaUploadParams) URLQuery() (v url.Values)
URLQuery serializes MediaUploadParams's query parameters as `url.Values`.
type MediaUploadResponse ¶
type MediaUploadResponse struct {
// Original filename
Filename string `json:"filename" api:"required"`
// File size in bytes
Size int64 `json:"size" api:"required"`
// MIME type of the uploaded file
Type string `json:"type" api:"required"`
// Public URL of the uploaded file
URL string `json:"url" api:"required" format:"uri"`
JSON mediaUploadResponseJSON `json:"-"`
}
func (*MediaUploadResponse) UnmarshalJSON ¶
func (r *MediaUploadResponse) UnmarshalJSON(data []byte) (err error)
type PostBulkNewParams ¶
type PostBulkNewParams struct {
// Array of posts to create (max 50)
Posts param.Field[[]PostBulkNewParamsPost] `json:"posts" api:"required"`
}
func (PostBulkNewParams) MarshalJSON ¶
func (r PostBulkNewParams) MarshalJSON() (data []byte, err error)
type PostBulkNewParamsPost ¶
type PostBulkNewParamsPost struct {
// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
// an ISO 8601 timestamp to schedule.
ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
// Account IDs, platform names, or group IDs to publish to
Targets param.Field[[]string] `json:"targets" api:"required"`
// Post text. Optional if target_options provide per-target content.
Content param.Field[string] `json:"content"`
// Media attachments
Media param.Field[[]PostBulkNewParamsPostsMedia] `json:"media"`
// Per-target customizations keyed by target value (account ID or platform name)
TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
// IANA timezone for scheduling
Timezone param.Field[string] `json:"timezone"`
}
func (PostBulkNewParamsPost) MarshalJSON ¶
func (r PostBulkNewParamsPost) MarshalJSON() (data []byte, err error)
type PostBulkNewParamsPostsMedia ¶
type PostBulkNewParamsPostsMedia struct {
// Public URL of the media file
URL param.Field[string] `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type param.Field[PostBulkNewParamsPostsMediaType] `json:"type"`
}
func (PostBulkNewParamsPostsMedia) MarshalJSON ¶
func (r PostBulkNewParamsPostsMedia) MarshalJSON() (data []byte, err error)
type PostBulkNewParamsPostsMediaType ¶
type PostBulkNewParamsPostsMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostBulkNewParamsPostsMediaTypeImage PostBulkNewParamsPostsMediaType = "image" PostBulkNewParamsPostsMediaTypeVideo PostBulkNewParamsPostsMediaType = "video" PostBulkNewParamsPostsMediaTypeGif PostBulkNewParamsPostsMediaType = "gif" PostBulkNewParamsPostsMediaTypeDocument PostBulkNewParamsPostsMediaType = "document" )
func (PostBulkNewParamsPostsMediaType) IsKnown ¶
func (r PostBulkNewParamsPostsMediaType) IsKnown() bool
type PostBulkNewResponse ¶
type PostBulkNewResponse struct {
Data []PostBulkNewResponseData `json:"data" api:"required"`
Summary PostBulkNewResponseSummary `json:"summary" api:"required"`
JSON postBulkNewResponseJSON `json:"-"`
}
func (*PostBulkNewResponse) UnmarshalJSON ¶
func (r *PostBulkNewResponse) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseData ¶
type PostBulkNewResponseData struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostBulkNewResponseDataMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostBulkNewResponseDataStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostBulkNewResponseDataTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postBulkNewResponseDataJSON `json:"-"`
}
func (*PostBulkNewResponseData) UnmarshalJSON ¶
func (r *PostBulkNewResponseData) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseDataMedia ¶
type PostBulkNewResponseDataMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostBulkNewResponseDataMediaType `json:"type"`
JSON postBulkNewResponseDataMediaJSON `json:"-"`
}
func (*PostBulkNewResponseDataMedia) UnmarshalJSON ¶
func (r *PostBulkNewResponseDataMedia) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseDataMediaType ¶
type PostBulkNewResponseDataMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostBulkNewResponseDataMediaTypeImage PostBulkNewResponseDataMediaType = "image" PostBulkNewResponseDataMediaTypeVideo PostBulkNewResponseDataMediaType = "video" PostBulkNewResponseDataMediaTypeGif PostBulkNewResponseDataMediaType = "gif" PostBulkNewResponseDataMediaTypeDocument PostBulkNewResponseDataMediaType = "document" )
func (PostBulkNewResponseDataMediaType) IsKnown ¶
func (r PostBulkNewResponseDataMediaType) IsKnown() bool
type PostBulkNewResponseDataStatus ¶
type PostBulkNewResponseDataStatus string
const ( PostBulkNewResponseDataStatusDraft PostBulkNewResponseDataStatus = "draft" PostBulkNewResponseDataStatusScheduled PostBulkNewResponseDataStatus = "scheduled" PostBulkNewResponseDataStatusPublishing PostBulkNewResponseDataStatus = "publishing" PostBulkNewResponseDataStatusPublished PostBulkNewResponseDataStatus = "published" PostBulkNewResponseDataStatusFailed PostBulkNewResponseDataStatus = "failed" PostBulkNewResponseDataStatusPartial PostBulkNewResponseDataStatus = "partial" )
func (PostBulkNewResponseDataStatus) IsKnown ¶
func (r PostBulkNewResponseDataStatus) IsKnown() bool
type PostBulkNewResponseDataTarget ¶
type PostBulkNewResponseDataTarget struct {
Platform PostBulkNewResponseDataTargetsPlatform `json:"platform" api:"required"`
Status PostBulkNewResponseDataTargetsStatus `json:"status" api:"required"`
Accounts []PostBulkNewResponseDataTargetsAccount `json:"accounts"`
Error PostBulkNewResponseDataTargetsError `json:"error"`
JSON postBulkNewResponseDataTargetJSON `json:"-"`
}
func (*PostBulkNewResponseDataTarget) UnmarshalJSON ¶
func (r *PostBulkNewResponseDataTarget) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseDataTargetsAccount ¶
type PostBulkNewResponseDataTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postBulkNewResponseDataTargetsAccountJSON `json:"-"`
}
func (*PostBulkNewResponseDataTargetsAccount) UnmarshalJSON ¶
func (r *PostBulkNewResponseDataTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseDataTargetsError ¶
type PostBulkNewResponseDataTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postBulkNewResponseDataTargetsErrorJSON `json:"-"`
}
func (*PostBulkNewResponseDataTargetsError) UnmarshalJSON ¶
func (r *PostBulkNewResponseDataTargetsError) UnmarshalJSON(data []byte) (err error)
type PostBulkNewResponseDataTargetsPlatform ¶
type PostBulkNewResponseDataTargetsPlatform string
const ( PostBulkNewResponseDataTargetsPlatformTwitter PostBulkNewResponseDataTargetsPlatform = "twitter" PostBulkNewResponseDataTargetsPlatformInstagram PostBulkNewResponseDataTargetsPlatform = "instagram" PostBulkNewResponseDataTargetsPlatformFacebook PostBulkNewResponseDataTargetsPlatform = "facebook" PostBulkNewResponseDataTargetsPlatformLinkedin PostBulkNewResponseDataTargetsPlatform = "linkedin" PostBulkNewResponseDataTargetsPlatformTiktok PostBulkNewResponseDataTargetsPlatform = "tiktok" PostBulkNewResponseDataTargetsPlatformYoutube PostBulkNewResponseDataTargetsPlatform = "youtube" PostBulkNewResponseDataTargetsPlatformPinterest PostBulkNewResponseDataTargetsPlatform = "pinterest" PostBulkNewResponseDataTargetsPlatformReddit PostBulkNewResponseDataTargetsPlatform = "reddit" PostBulkNewResponseDataTargetsPlatformBluesky PostBulkNewResponseDataTargetsPlatform = "bluesky" PostBulkNewResponseDataTargetsPlatformThreads PostBulkNewResponseDataTargetsPlatform = "threads" PostBulkNewResponseDataTargetsPlatformTelegram PostBulkNewResponseDataTargetsPlatform = "telegram" PostBulkNewResponseDataTargetsPlatformSnapchat PostBulkNewResponseDataTargetsPlatform = "snapchat" PostBulkNewResponseDataTargetsPlatformGooglebusiness PostBulkNewResponseDataTargetsPlatform = "googlebusiness" PostBulkNewResponseDataTargetsPlatformWhatsapp PostBulkNewResponseDataTargetsPlatform = "whatsapp" PostBulkNewResponseDataTargetsPlatformMastodon PostBulkNewResponseDataTargetsPlatform = "mastodon" PostBulkNewResponseDataTargetsPlatformDiscord PostBulkNewResponseDataTargetsPlatform = "discord" PostBulkNewResponseDataTargetsPlatformSMS PostBulkNewResponseDataTargetsPlatform = "sms" )
func (PostBulkNewResponseDataTargetsPlatform) IsKnown ¶
func (r PostBulkNewResponseDataTargetsPlatform) IsKnown() bool
type PostBulkNewResponseDataTargetsStatus ¶
type PostBulkNewResponseDataTargetsStatus string
const ( PostBulkNewResponseDataTargetsStatusDraft PostBulkNewResponseDataTargetsStatus = "draft" PostBulkNewResponseDataTargetsStatusScheduled PostBulkNewResponseDataTargetsStatus = "scheduled" PostBulkNewResponseDataTargetsStatusPublishing PostBulkNewResponseDataTargetsStatus = "publishing" PostBulkNewResponseDataTargetsStatusPublished PostBulkNewResponseDataTargetsStatus = "published" PostBulkNewResponseDataTargetsStatusFailed PostBulkNewResponseDataTargetsStatus = "failed" )
func (PostBulkNewResponseDataTargetsStatus) IsKnown ¶
func (r PostBulkNewResponseDataTargetsStatus) IsKnown() bool
type PostBulkNewResponseSummary ¶
type PostBulkNewResponseSummary struct {
Failed float64 `json:"failed" api:"required"`
Succeeded float64 `json:"succeeded" api:"required"`
Total float64 `json:"total" api:"required"`
JSON postBulkNewResponseSummaryJSON `json:"-"`
}
func (*PostBulkNewResponseSummary) UnmarshalJSON ¶
func (r *PostBulkNewResponseSummary) UnmarshalJSON(data []byte) (err error)
type PostGetResponse ¶
type PostGetResponse struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostGetResponseMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostGetResponseStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostGetResponseTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postGetResponseJSON `json:"-"`
}
func (*PostGetResponse) UnmarshalJSON ¶
func (r *PostGetResponse) UnmarshalJSON(data []byte) (err error)
type PostGetResponseMedia ¶
type PostGetResponseMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostGetResponseMediaType `json:"type"`
JSON postGetResponseMediaJSON `json:"-"`
}
func (*PostGetResponseMedia) UnmarshalJSON ¶
func (r *PostGetResponseMedia) UnmarshalJSON(data []byte) (err error)
type PostGetResponseMediaType ¶
type PostGetResponseMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostGetResponseMediaTypeImage PostGetResponseMediaType = "image" PostGetResponseMediaTypeVideo PostGetResponseMediaType = "video" PostGetResponseMediaTypeGif PostGetResponseMediaType = "gif" PostGetResponseMediaTypeDocument PostGetResponseMediaType = "document" )
func (PostGetResponseMediaType) IsKnown ¶
func (r PostGetResponseMediaType) IsKnown() bool
type PostGetResponseStatus ¶
type PostGetResponseStatus string
const ( PostGetResponseStatusDraft PostGetResponseStatus = "draft" PostGetResponseStatusScheduled PostGetResponseStatus = "scheduled" PostGetResponseStatusPublishing PostGetResponseStatus = "publishing" PostGetResponseStatusPublished PostGetResponseStatus = "published" PostGetResponseStatusFailed PostGetResponseStatus = "failed" PostGetResponseStatusPartial PostGetResponseStatus = "partial" )
func (PostGetResponseStatus) IsKnown ¶
func (r PostGetResponseStatus) IsKnown() bool
type PostGetResponseTarget ¶
type PostGetResponseTarget struct {
Platform PostGetResponseTargetsPlatform `json:"platform" api:"required"`
Status PostGetResponseTargetsStatus `json:"status" api:"required"`
Accounts []PostGetResponseTargetsAccount `json:"accounts"`
Error PostGetResponseTargetsError `json:"error"`
JSON postGetResponseTargetJSON `json:"-"`
}
func (*PostGetResponseTarget) UnmarshalJSON ¶
func (r *PostGetResponseTarget) UnmarshalJSON(data []byte) (err error)
type PostGetResponseTargetsAccount ¶
type PostGetResponseTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postGetResponseTargetsAccountJSON `json:"-"`
}
func (*PostGetResponseTargetsAccount) UnmarshalJSON ¶
func (r *PostGetResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostGetResponseTargetsError ¶
type PostGetResponseTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postGetResponseTargetsErrorJSON `json:"-"`
}
func (*PostGetResponseTargetsError) UnmarshalJSON ¶
func (r *PostGetResponseTargetsError) UnmarshalJSON(data []byte) (err error)
type PostGetResponseTargetsPlatform ¶
type PostGetResponseTargetsPlatform string
const ( PostGetResponseTargetsPlatformTwitter PostGetResponseTargetsPlatform = "twitter" PostGetResponseTargetsPlatformInstagram PostGetResponseTargetsPlatform = "instagram" PostGetResponseTargetsPlatformFacebook PostGetResponseTargetsPlatform = "facebook" PostGetResponseTargetsPlatformLinkedin PostGetResponseTargetsPlatform = "linkedin" PostGetResponseTargetsPlatformTiktok PostGetResponseTargetsPlatform = "tiktok" PostGetResponseTargetsPlatformYoutube PostGetResponseTargetsPlatform = "youtube" PostGetResponseTargetsPlatformPinterest PostGetResponseTargetsPlatform = "pinterest" PostGetResponseTargetsPlatformReddit PostGetResponseTargetsPlatform = "reddit" PostGetResponseTargetsPlatformBluesky PostGetResponseTargetsPlatform = "bluesky" PostGetResponseTargetsPlatformThreads PostGetResponseTargetsPlatform = "threads" PostGetResponseTargetsPlatformTelegram PostGetResponseTargetsPlatform = "telegram" PostGetResponseTargetsPlatformSnapchat PostGetResponseTargetsPlatform = "snapchat" PostGetResponseTargetsPlatformGooglebusiness PostGetResponseTargetsPlatform = "googlebusiness" PostGetResponseTargetsPlatformWhatsapp PostGetResponseTargetsPlatform = "whatsapp" PostGetResponseTargetsPlatformMastodon PostGetResponseTargetsPlatform = "mastodon" PostGetResponseTargetsPlatformDiscord PostGetResponseTargetsPlatform = "discord" PostGetResponseTargetsPlatformSMS PostGetResponseTargetsPlatform = "sms" )
func (PostGetResponseTargetsPlatform) IsKnown ¶
func (r PostGetResponseTargetsPlatform) IsKnown() bool
type PostGetResponseTargetsStatus ¶
type PostGetResponseTargetsStatus string
const ( PostGetResponseTargetsStatusDraft PostGetResponseTargetsStatus = "draft" PostGetResponseTargetsStatusScheduled PostGetResponseTargetsStatus = "scheduled" PostGetResponseTargetsStatusPublishing PostGetResponseTargetsStatus = "publishing" PostGetResponseTargetsStatusPublished PostGetResponseTargetsStatus = "published" PostGetResponseTargetsStatusFailed PostGetResponseTargetsStatus = "failed" )
func (PostGetResponseTargetsStatus) IsKnown ¶
func (r PostGetResponseTargetsStatus) IsKnown() bool
type PostListParams ¶
type PostListParams struct {
// Filter by specific account ID
AccountID param.Field[string] `query:"account_id"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Filter by account group ID
GroupID param.Field[string] `query:"group_id"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter by post status
Status param.Field[PostListParamsStatus] `query:"status"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (PostListParams) URLQuery ¶
func (r PostListParams) URLQuery() (v url.Values)
URLQuery serializes PostListParams's query parameters as `url.Values`.
type PostListParamsStatus ¶
type PostListParamsStatus string
Filter by post status
const ( PostListParamsStatusDraft PostListParamsStatus = "draft" PostListParamsStatusScheduled PostListParamsStatus = "scheduled" PostListParamsStatusPublishing PostListParamsStatus = "publishing" PostListParamsStatusPublished PostListParamsStatus = "published" PostListParamsStatusFailed PostListParamsStatus = "failed" )
func (PostListParamsStatus) IsKnown ¶
func (r PostListParamsStatus) IsKnown() bool
type PostListResponse ¶
type PostListResponse struct {
Data []PostListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON postListResponseJSON `json:"-"`
}
func (*PostListResponse) UnmarshalJSON ¶
func (r *PostListResponse) UnmarshalJSON(data []byte) (err error)
type PostListResponseData ¶
type PostListResponseData struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostListResponseDataMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostListResponseDataStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostListResponseDataTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postListResponseDataJSON `json:"-"`
}
func (*PostListResponseData) UnmarshalJSON ¶
func (r *PostListResponseData) UnmarshalJSON(data []byte) (err error)
type PostListResponseDataMedia ¶
type PostListResponseDataMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostListResponseDataMediaType `json:"type"`
JSON postListResponseDataMediaJSON `json:"-"`
}
func (*PostListResponseDataMedia) UnmarshalJSON ¶
func (r *PostListResponseDataMedia) UnmarshalJSON(data []byte) (err error)
type PostListResponseDataMediaType ¶
type PostListResponseDataMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostListResponseDataMediaTypeImage PostListResponseDataMediaType = "image" PostListResponseDataMediaTypeVideo PostListResponseDataMediaType = "video" PostListResponseDataMediaTypeGif PostListResponseDataMediaType = "gif" PostListResponseDataMediaTypeDocument PostListResponseDataMediaType = "document" )
func (PostListResponseDataMediaType) IsKnown ¶
func (r PostListResponseDataMediaType) IsKnown() bool
type PostListResponseDataStatus ¶
type PostListResponseDataStatus string
const ( PostListResponseDataStatusDraft PostListResponseDataStatus = "draft" PostListResponseDataStatusScheduled PostListResponseDataStatus = "scheduled" PostListResponseDataStatusPublishing PostListResponseDataStatus = "publishing" PostListResponseDataStatusPublished PostListResponseDataStatus = "published" PostListResponseDataStatusFailed PostListResponseDataStatus = "failed" PostListResponseDataStatusPartial PostListResponseDataStatus = "partial" )
func (PostListResponseDataStatus) IsKnown ¶
func (r PostListResponseDataStatus) IsKnown() bool
type PostListResponseDataTarget ¶
type PostListResponseDataTarget struct {
Platform PostListResponseDataTargetsPlatform `json:"platform" api:"required"`
Status PostListResponseDataTargetsStatus `json:"status" api:"required"`
Accounts []PostListResponseDataTargetsAccount `json:"accounts"`
Error PostListResponseDataTargetsError `json:"error"`
JSON postListResponseDataTargetJSON `json:"-"`
}
func (*PostListResponseDataTarget) UnmarshalJSON ¶
func (r *PostListResponseDataTarget) UnmarshalJSON(data []byte) (err error)
type PostListResponseDataTargetsAccount ¶
type PostListResponseDataTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postListResponseDataTargetsAccountJSON `json:"-"`
}
func (*PostListResponseDataTargetsAccount) UnmarshalJSON ¶
func (r *PostListResponseDataTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostListResponseDataTargetsError ¶
type PostListResponseDataTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postListResponseDataTargetsErrorJSON `json:"-"`
}
func (*PostListResponseDataTargetsError) UnmarshalJSON ¶
func (r *PostListResponseDataTargetsError) UnmarshalJSON(data []byte) (err error)
type PostListResponseDataTargetsPlatform ¶
type PostListResponseDataTargetsPlatform string
const ( PostListResponseDataTargetsPlatformTwitter PostListResponseDataTargetsPlatform = "twitter" PostListResponseDataTargetsPlatformInstagram PostListResponseDataTargetsPlatform = "instagram" PostListResponseDataTargetsPlatformFacebook PostListResponseDataTargetsPlatform = "facebook" PostListResponseDataTargetsPlatformLinkedin PostListResponseDataTargetsPlatform = "linkedin" PostListResponseDataTargetsPlatformTiktok PostListResponseDataTargetsPlatform = "tiktok" PostListResponseDataTargetsPlatformYoutube PostListResponseDataTargetsPlatform = "youtube" PostListResponseDataTargetsPlatformPinterest PostListResponseDataTargetsPlatform = "pinterest" PostListResponseDataTargetsPlatformReddit PostListResponseDataTargetsPlatform = "reddit" PostListResponseDataTargetsPlatformBluesky PostListResponseDataTargetsPlatform = "bluesky" PostListResponseDataTargetsPlatformThreads PostListResponseDataTargetsPlatform = "threads" PostListResponseDataTargetsPlatformTelegram PostListResponseDataTargetsPlatform = "telegram" PostListResponseDataTargetsPlatformSnapchat PostListResponseDataTargetsPlatform = "snapchat" PostListResponseDataTargetsPlatformGooglebusiness PostListResponseDataTargetsPlatform = "googlebusiness" PostListResponseDataTargetsPlatformWhatsapp PostListResponseDataTargetsPlatform = "whatsapp" PostListResponseDataTargetsPlatformMastodon PostListResponseDataTargetsPlatform = "mastodon" PostListResponseDataTargetsPlatformDiscord PostListResponseDataTargetsPlatform = "discord" PostListResponseDataTargetsPlatformSMS PostListResponseDataTargetsPlatform = "sms" )
func (PostListResponseDataTargetsPlatform) IsKnown ¶
func (r PostListResponseDataTargetsPlatform) IsKnown() bool
type PostListResponseDataTargetsStatus ¶
type PostListResponseDataTargetsStatus string
const ( PostListResponseDataTargetsStatusDraft PostListResponseDataTargetsStatus = "draft" PostListResponseDataTargetsStatusScheduled PostListResponseDataTargetsStatus = "scheduled" PostListResponseDataTargetsStatusPublishing PostListResponseDataTargetsStatus = "publishing" PostListResponseDataTargetsStatusPublished PostListResponseDataTargetsStatus = "published" PostListResponseDataTargetsStatusFailed PostListResponseDataTargetsStatus = "failed" )
func (PostListResponseDataTargetsStatus) IsKnown ¶
func (r PostListResponseDataTargetsStatus) IsKnown() bool
type PostLogGetResponse ¶
type PostLogGetResponse struct {
Data []PostLogGetResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON postLogGetResponseJSON `json:"-"`
}
func (*PostLogGetResponse) UnmarshalJSON ¶
func (r *PostLogGetResponse) UnmarshalJSON(data []byte) (err error)
type PostLogGetResponseData ¶
type PostLogGetResponseData struct {
// Log entry ID (post target ID)
ID string `json:"id" api:"required"`
// Error message if failed
Error string `json:"error" api:"required,nullable"`
// Platform name
Platform string `json:"platform" api:"required"`
// Platform post ID
PlatformPostID string `json:"platform_post_id" api:"required,nullable"`
// Published URL
PlatformURL string `json:"platform_url" api:"required,nullable"`
// Post ID
PostID string `json:"post_id" api:"required"`
// Published timestamp
PublishedAt time.Time `json:"published_at" api:"required,nullable" format:"date-time"`
// Social account ID
SocialAccountID string `json:"social_account_id" api:"required"`
// Target status
Status string `json:"status" api:"required"`
// Last updated
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postLogGetResponseDataJSON `json:"-"`
}
func (*PostLogGetResponseData) UnmarshalJSON ¶
func (r *PostLogGetResponseData) UnmarshalJSON(data []byte) (err error)
type PostLogListParams ¶
type PostLogListParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (PostLogListParams) URLQuery ¶
func (r PostLogListParams) URLQuery() (v url.Values)
URLQuery serializes PostLogListParams's query parameters as `url.Values`.
type PostLogListResponse ¶
type PostLogListResponse struct {
Data []PostLogListResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON postLogListResponseJSON `json:"-"`
}
func (*PostLogListResponse) UnmarshalJSON ¶
func (r *PostLogListResponse) UnmarshalJSON(data []byte) (err error)
type PostLogListResponseData ¶
type PostLogListResponseData struct {
// Log entry ID (post target ID)
ID string `json:"id" api:"required"`
// Error message if failed
Error string `json:"error" api:"required,nullable"`
// Platform name
Platform string `json:"platform" api:"required"`
// Platform post ID
PlatformPostID string `json:"platform_post_id" api:"required,nullable"`
// Published URL
PlatformURL string `json:"platform_url" api:"required,nullable"`
// Post ID
PostID string `json:"post_id" api:"required"`
// Published timestamp
PublishedAt time.Time `json:"published_at" api:"required,nullable" format:"date-time"`
// Social account ID
SocialAccountID string `json:"social_account_id" api:"required"`
// Target status
Status string `json:"status" api:"required"`
// Last updated
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postLogListResponseDataJSON `json:"-"`
}
func (*PostLogListResponseData) UnmarshalJSON ¶
func (r *PostLogListResponseData) UnmarshalJSON(data []byte) (err error)
type PostLogService ¶
type PostLogService struct {
Options []option.RequestOption
}
PostLogService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPostLogService method instead.
func NewPostLogService ¶
func NewPostLogService(opts ...option.RequestOption) (r *PostLogService)
NewPostLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PostLogService) Get ¶
func (r *PostLogService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PostLogGetResponse, err error)
Get publishing logs for a post
func (*PostLogService) List ¶
func (r *PostLogService) List(ctx context.Context, query PostLogListParams, opts ...option.RequestOption) (res *PostLogListResponse, err error)
Query publishing logs across all posts with pagination.
type PostNewParams ¶
type PostNewParams struct {
// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
// an ISO 8601 timestamp to schedule.
ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
// Account IDs, platform names, or group IDs to publish to
Targets param.Field[[]string] `json:"targets" api:"required"`
// Post text. Optional if target_options provide per-target content.
Content param.Field[string] `json:"content"`
// Media attachments
Media param.Field[[]PostNewParamsMedia] `json:"media"`
// Per-target customizations keyed by target value (account ID or platform name)
TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
// IANA timezone for scheduling
Timezone param.Field[string] `json:"timezone"`
}
func (PostNewParams) MarshalJSON ¶
func (r PostNewParams) MarshalJSON() (data []byte, err error)
type PostNewParamsMedia ¶
type PostNewParamsMedia struct {
// Public URL of the media file
URL param.Field[string] `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type param.Field[PostNewParamsMediaType] `json:"type"`
}
func (PostNewParamsMedia) MarshalJSON ¶
func (r PostNewParamsMedia) MarshalJSON() (data []byte, err error)
type PostNewParamsMediaType ¶
type PostNewParamsMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostNewParamsMediaTypeImage PostNewParamsMediaType = "image" PostNewParamsMediaTypeVideo PostNewParamsMediaType = "video" PostNewParamsMediaTypeGif PostNewParamsMediaType = "gif" PostNewParamsMediaTypeDocument PostNewParamsMediaType = "document" )
func (PostNewParamsMediaType) IsKnown ¶
func (r PostNewParamsMediaType) IsKnown() bool
type PostNewResponse ¶
type PostNewResponse struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostNewResponseMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostNewResponseStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostNewResponseTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postNewResponseJSON `json:"-"`
}
func (*PostNewResponse) UnmarshalJSON ¶
func (r *PostNewResponse) UnmarshalJSON(data []byte) (err error)
type PostNewResponseMedia ¶
type PostNewResponseMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostNewResponseMediaType `json:"type"`
JSON postNewResponseMediaJSON `json:"-"`
}
func (*PostNewResponseMedia) UnmarshalJSON ¶
func (r *PostNewResponseMedia) UnmarshalJSON(data []byte) (err error)
type PostNewResponseMediaType ¶
type PostNewResponseMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostNewResponseMediaTypeImage PostNewResponseMediaType = "image" PostNewResponseMediaTypeVideo PostNewResponseMediaType = "video" PostNewResponseMediaTypeGif PostNewResponseMediaType = "gif" PostNewResponseMediaTypeDocument PostNewResponseMediaType = "document" )
func (PostNewResponseMediaType) IsKnown ¶
func (r PostNewResponseMediaType) IsKnown() bool
type PostNewResponseStatus ¶
type PostNewResponseStatus string
const ( PostNewResponseStatusDraft PostNewResponseStatus = "draft" PostNewResponseStatusScheduled PostNewResponseStatus = "scheduled" PostNewResponseStatusPublishing PostNewResponseStatus = "publishing" PostNewResponseStatusPublished PostNewResponseStatus = "published" PostNewResponseStatusFailed PostNewResponseStatus = "failed" PostNewResponseStatusPartial PostNewResponseStatus = "partial" )
func (PostNewResponseStatus) IsKnown ¶
func (r PostNewResponseStatus) IsKnown() bool
type PostNewResponseTarget ¶
type PostNewResponseTarget struct {
Platform PostNewResponseTargetsPlatform `json:"platform" api:"required"`
Status PostNewResponseTargetsStatus `json:"status" api:"required"`
Accounts []PostNewResponseTargetsAccount `json:"accounts"`
Error PostNewResponseTargetsError `json:"error"`
JSON postNewResponseTargetJSON `json:"-"`
}
func (*PostNewResponseTarget) UnmarshalJSON ¶
func (r *PostNewResponseTarget) UnmarshalJSON(data []byte) (err error)
type PostNewResponseTargetsAccount ¶
type PostNewResponseTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postNewResponseTargetsAccountJSON `json:"-"`
}
func (*PostNewResponseTargetsAccount) UnmarshalJSON ¶
func (r *PostNewResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostNewResponseTargetsError ¶
type PostNewResponseTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postNewResponseTargetsErrorJSON `json:"-"`
}
func (*PostNewResponseTargetsError) UnmarshalJSON ¶
func (r *PostNewResponseTargetsError) UnmarshalJSON(data []byte) (err error)
type PostNewResponseTargetsPlatform ¶
type PostNewResponseTargetsPlatform string
const ( PostNewResponseTargetsPlatformTwitter PostNewResponseTargetsPlatform = "twitter" PostNewResponseTargetsPlatformInstagram PostNewResponseTargetsPlatform = "instagram" PostNewResponseTargetsPlatformFacebook PostNewResponseTargetsPlatform = "facebook" PostNewResponseTargetsPlatformLinkedin PostNewResponseTargetsPlatform = "linkedin" PostNewResponseTargetsPlatformTiktok PostNewResponseTargetsPlatform = "tiktok" PostNewResponseTargetsPlatformYoutube PostNewResponseTargetsPlatform = "youtube" PostNewResponseTargetsPlatformPinterest PostNewResponseTargetsPlatform = "pinterest" PostNewResponseTargetsPlatformReddit PostNewResponseTargetsPlatform = "reddit" PostNewResponseTargetsPlatformBluesky PostNewResponseTargetsPlatform = "bluesky" PostNewResponseTargetsPlatformThreads PostNewResponseTargetsPlatform = "threads" PostNewResponseTargetsPlatformTelegram PostNewResponseTargetsPlatform = "telegram" PostNewResponseTargetsPlatformSnapchat PostNewResponseTargetsPlatform = "snapchat" PostNewResponseTargetsPlatformGooglebusiness PostNewResponseTargetsPlatform = "googlebusiness" PostNewResponseTargetsPlatformWhatsapp PostNewResponseTargetsPlatform = "whatsapp" PostNewResponseTargetsPlatformMastodon PostNewResponseTargetsPlatform = "mastodon" PostNewResponseTargetsPlatformDiscord PostNewResponseTargetsPlatform = "discord" PostNewResponseTargetsPlatformSMS PostNewResponseTargetsPlatform = "sms" )
func (PostNewResponseTargetsPlatform) IsKnown ¶
func (r PostNewResponseTargetsPlatform) IsKnown() bool
type PostNewResponseTargetsStatus ¶
type PostNewResponseTargetsStatus string
const ( PostNewResponseTargetsStatusDraft PostNewResponseTargetsStatus = "draft" PostNewResponseTargetsStatusScheduled PostNewResponseTargetsStatus = "scheduled" PostNewResponseTargetsStatusPublishing PostNewResponseTargetsStatus = "publishing" PostNewResponseTargetsStatusPublished PostNewResponseTargetsStatus = "published" PostNewResponseTargetsStatusFailed PostNewResponseTargetsStatus = "failed" )
func (PostNewResponseTargetsStatus) IsKnown ¶
func (r PostNewResponseTargetsStatus) IsKnown() bool
type PostRetryResponse ¶
type PostRetryResponse struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostRetryResponseMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostRetryResponseStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostRetryResponseTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postRetryResponseJSON `json:"-"`
}
func (*PostRetryResponse) UnmarshalJSON ¶
func (r *PostRetryResponse) UnmarshalJSON(data []byte) (err error)
type PostRetryResponseMedia ¶
type PostRetryResponseMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostRetryResponseMediaType `json:"type"`
JSON postRetryResponseMediaJSON `json:"-"`
}
func (*PostRetryResponseMedia) UnmarshalJSON ¶
func (r *PostRetryResponseMedia) UnmarshalJSON(data []byte) (err error)
type PostRetryResponseMediaType ¶
type PostRetryResponseMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostRetryResponseMediaTypeImage PostRetryResponseMediaType = "image" PostRetryResponseMediaTypeVideo PostRetryResponseMediaType = "video" PostRetryResponseMediaTypeGif PostRetryResponseMediaType = "gif" PostRetryResponseMediaTypeDocument PostRetryResponseMediaType = "document" )
func (PostRetryResponseMediaType) IsKnown ¶
func (r PostRetryResponseMediaType) IsKnown() bool
type PostRetryResponseStatus ¶
type PostRetryResponseStatus string
const ( PostRetryResponseStatusDraft PostRetryResponseStatus = "draft" PostRetryResponseStatusScheduled PostRetryResponseStatus = "scheduled" PostRetryResponseStatusPublishing PostRetryResponseStatus = "publishing" PostRetryResponseStatusPublished PostRetryResponseStatus = "published" PostRetryResponseStatusFailed PostRetryResponseStatus = "failed" PostRetryResponseStatusPartial PostRetryResponseStatus = "partial" )
func (PostRetryResponseStatus) IsKnown ¶
func (r PostRetryResponseStatus) IsKnown() bool
type PostRetryResponseTarget ¶
type PostRetryResponseTarget struct {
Platform PostRetryResponseTargetsPlatform `json:"platform" api:"required"`
Status PostRetryResponseTargetsStatus `json:"status" api:"required"`
Accounts []PostRetryResponseTargetsAccount `json:"accounts"`
Error PostRetryResponseTargetsError `json:"error"`
JSON postRetryResponseTargetJSON `json:"-"`
}
func (*PostRetryResponseTarget) UnmarshalJSON ¶
func (r *PostRetryResponseTarget) UnmarshalJSON(data []byte) (err error)
type PostRetryResponseTargetsAccount ¶
type PostRetryResponseTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postRetryResponseTargetsAccountJSON `json:"-"`
}
func (*PostRetryResponseTargetsAccount) UnmarshalJSON ¶
func (r *PostRetryResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostRetryResponseTargetsError ¶
type PostRetryResponseTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postRetryResponseTargetsErrorJSON `json:"-"`
}
func (*PostRetryResponseTargetsError) UnmarshalJSON ¶
func (r *PostRetryResponseTargetsError) UnmarshalJSON(data []byte) (err error)
type PostRetryResponseTargetsPlatform ¶
type PostRetryResponseTargetsPlatform string
const ( PostRetryResponseTargetsPlatformTwitter PostRetryResponseTargetsPlatform = "twitter" PostRetryResponseTargetsPlatformInstagram PostRetryResponseTargetsPlatform = "instagram" PostRetryResponseTargetsPlatformFacebook PostRetryResponseTargetsPlatform = "facebook" PostRetryResponseTargetsPlatformLinkedin PostRetryResponseTargetsPlatform = "linkedin" PostRetryResponseTargetsPlatformTiktok PostRetryResponseTargetsPlatform = "tiktok" PostRetryResponseTargetsPlatformYoutube PostRetryResponseTargetsPlatform = "youtube" PostRetryResponseTargetsPlatformPinterest PostRetryResponseTargetsPlatform = "pinterest" PostRetryResponseTargetsPlatformReddit PostRetryResponseTargetsPlatform = "reddit" PostRetryResponseTargetsPlatformBluesky PostRetryResponseTargetsPlatform = "bluesky" PostRetryResponseTargetsPlatformThreads PostRetryResponseTargetsPlatform = "threads" PostRetryResponseTargetsPlatformTelegram PostRetryResponseTargetsPlatform = "telegram" PostRetryResponseTargetsPlatformSnapchat PostRetryResponseTargetsPlatform = "snapchat" PostRetryResponseTargetsPlatformGooglebusiness PostRetryResponseTargetsPlatform = "googlebusiness" PostRetryResponseTargetsPlatformWhatsapp PostRetryResponseTargetsPlatform = "whatsapp" PostRetryResponseTargetsPlatformMastodon PostRetryResponseTargetsPlatform = "mastodon" PostRetryResponseTargetsPlatformDiscord PostRetryResponseTargetsPlatform = "discord" PostRetryResponseTargetsPlatformSMS PostRetryResponseTargetsPlatform = "sms" )
func (PostRetryResponseTargetsPlatform) IsKnown ¶
func (r PostRetryResponseTargetsPlatform) IsKnown() bool
type PostRetryResponseTargetsStatus ¶
type PostRetryResponseTargetsStatus string
const ( PostRetryResponseTargetsStatusDraft PostRetryResponseTargetsStatus = "draft" PostRetryResponseTargetsStatusScheduled PostRetryResponseTargetsStatus = "scheduled" PostRetryResponseTargetsStatusPublishing PostRetryResponseTargetsStatus = "publishing" PostRetryResponseTargetsStatusPublished PostRetryResponseTargetsStatus = "published" PostRetryResponseTargetsStatusFailed PostRetryResponseTargetsStatus = "failed" )
func (PostRetryResponseTargetsStatus) IsKnown ¶
func (r PostRetryResponseTargetsStatus) IsKnown() bool
type PostService ¶
type PostService struct {
Options []option.RequestOption
Logs *PostLogService
}
PostService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPostService method instead.
func NewPostService ¶
func NewPostService(opts ...option.RequestOption) (r *PostService)
NewPostService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PostService) BulkNew ¶
func (r *PostService) BulkNew(ctx context.Context, body PostBulkNewParams, opts ...option.RequestOption) (res *PostBulkNewResponse, err error)
Create multiple posts in a single request. Each item follows the same schema as single post creation.
func (*PostService) Delete ¶
func (r *PostService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a post.
func (*PostService) Get ¶
func (r *PostService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PostGetResponse, err error)
Get a post
func (*PostService) List ¶
func (r *PostService) List(ctx context.Context, query PostListParams, opts ...option.RequestOption) (res *PostListResponse, err error)
List posts
func (*PostService) New ¶
func (r *PostService) New(ctx context.Context, body PostNewParams, opts ...option.RequestOption) (res *PostNewResponse, err error)
Create a post. Use scheduled_at: "now" to publish immediately, "draft" to save as draft, or an ISO timestamp to schedule.
func (*PostService) Retry ¶
func (r *PostService) Retry(ctx context.Context, id string, opts ...option.RequestOption) (res *PostRetryResponse, err error)
Retry publishing for failed targets on a post.
func (*PostService) Unpublish ¶
func (r *PostService) Unpublish(ctx context.Context, id string, body PostUnpublishParams, opts ...option.RequestOption) (res *PostUnpublishResponse, err error)
Attempt to delete the post from each platform and set the post status to cancelled.
func (*PostService) Update ¶
func (r *PostService) Update(ctx context.Context, id string, body PostUpdateParams, opts ...option.RequestOption) (res *PostUpdateResponse, err error)
Update a draft or scheduled post.
type PostUnpublishParams ¶
type PostUnpublishParams struct {
// Platforms to unpublish from. If omitted, unpublishes from all.
Platforms param.Field[[]string] `json:"platforms"`
}
func (PostUnpublishParams) MarshalJSON ¶
func (r PostUnpublishParams) MarshalJSON() (data []byte, err error)
type PostUnpublishResponse ¶
type PostUnpublishResponse struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostUnpublishResponseMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostUnpublishResponseStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostUnpublishResponseTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postUnpublishResponseJSON `json:"-"`
}
func (*PostUnpublishResponse) UnmarshalJSON ¶
func (r *PostUnpublishResponse) UnmarshalJSON(data []byte) (err error)
type PostUnpublishResponseMedia ¶
type PostUnpublishResponseMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostUnpublishResponseMediaType `json:"type"`
JSON postUnpublishResponseMediaJSON `json:"-"`
}
func (*PostUnpublishResponseMedia) UnmarshalJSON ¶
func (r *PostUnpublishResponseMedia) UnmarshalJSON(data []byte) (err error)
type PostUnpublishResponseMediaType ¶
type PostUnpublishResponseMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostUnpublishResponseMediaTypeImage PostUnpublishResponseMediaType = "image" PostUnpublishResponseMediaTypeVideo PostUnpublishResponseMediaType = "video" PostUnpublishResponseMediaTypeGif PostUnpublishResponseMediaType = "gif" PostUnpublishResponseMediaTypeDocument PostUnpublishResponseMediaType = "document" )
func (PostUnpublishResponseMediaType) IsKnown ¶
func (r PostUnpublishResponseMediaType) IsKnown() bool
type PostUnpublishResponseStatus ¶
type PostUnpublishResponseStatus string
const ( PostUnpublishResponseStatusDraft PostUnpublishResponseStatus = "draft" PostUnpublishResponseStatusScheduled PostUnpublishResponseStatus = "scheduled" PostUnpublishResponseStatusPublishing PostUnpublishResponseStatus = "publishing" PostUnpublishResponseStatusPublished PostUnpublishResponseStatus = "published" PostUnpublishResponseStatusFailed PostUnpublishResponseStatus = "failed" PostUnpublishResponseStatusPartial PostUnpublishResponseStatus = "partial" )
func (PostUnpublishResponseStatus) IsKnown ¶
func (r PostUnpublishResponseStatus) IsKnown() bool
type PostUnpublishResponseTarget ¶
type PostUnpublishResponseTarget struct {
Platform PostUnpublishResponseTargetsPlatform `json:"platform" api:"required"`
Status PostUnpublishResponseTargetsStatus `json:"status" api:"required"`
Accounts []PostUnpublishResponseTargetsAccount `json:"accounts"`
Error PostUnpublishResponseTargetsError `json:"error"`
JSON postUnpublishResponseTargetJSON `json:"-"`
}
func (*PostUnpublishResponseTarget) UnmarshalJSON ¶
func (r *PostUnpublishResponseTarget) UnmarshalJSON(data []byte) (err error)
type PostUnpublishResponseTargetsAccount ¶
type PostUnpublishResponseTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postUnpublishResponseTargetsAccountJSON `json:"-"`
}
func (*PostUnpublishResponseTargetsAccount) UnmarshalJSON ¶
func (r *PostUnpublishResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostUnpublishResponseTargetsError ¶
type PostUnpublishResponseTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postUnpublishResponseTargetsErrorJSON `json:"-"`
}
func (*PostUnpublishResponseTargetsError) UnmarshalJSON ¶
func (r *PostUnpublishResponseTargetsError) UnmarshalJSON(data []byte) (err error)
type PostUnpublishResponseTargetsPlatform ¶
type PostUnpublishResponseTargetsPlatform string
const ( PostUnpublishResponseTargetsPlatformTwitter PostUnpublishResponseTargetsPlatform = "twitter" PostUnpublishResponseTargetsPlatformInstagram PostUnpublishResponseTargetsPlatform = "instagram" PostUnpublishResponseTargetsPlatformFacebook PostUnpublishResponseTargetsPlatform = "facebook" PostUnpublishResponseTargetsPlatformLinkedin PostUnpublishResponseTargetsPlatform = "linkedin" PostUnpublishResponseTargetsPlatformTiktok PostUnpublishResponseTargetsPlatform = "tiktok" PostUnpublishResponseTargetsPlatformYoutube PostUnpublishResponseTargetsPlatform = "youtube" PostUnpublishResponseTargetsPlatformPinterest PostUnpublishResponseTargetsPlatform = "pinterest" PostUnpublishResponseTargetsPlatformReddit PostUnpublishResponseTargetsPlatform = "reddit" PostUnpublishResponseTargetsPlatformBluesky PostUnpublishResponseTargetsPlatform = "bluesky" PostUnpublishResponseTargetsPlatformThreads PostUnpublishResponseTargetsPlatform = "threads" PostUnpublishResponseTargetsPlatformTelegram PostUnpublishResponseTargetsPlatform = "telegram" PostUnpublishResponseTargetsPlatformSnapchat PostUnpublishResponseTargetsPlatform = "snapchat" PostUnpublishResponseTargetsPlatformGooglebusiness PostUnpublishResponseTargetsPlatform = "googlebusiness" PostUnpublishResponseTargetsPlatformWhatsapp PostUnpublishResponseTargetsPlatform = "whatsapp" PostUnpublishResponseTargetsPlatformMastodon PostUnpublishResponseTargetsPlatform = "mastodon" PostUnpublishResponseTargetsPlatformDiscord PostUnpublishResponseTargetsPlatform = "discord" PostUnpublishResponseTargetsPlatformSMS PostUnpublishResponseTargetsPlatform = "sms" )
func (PostUnpublishResponseTargetsPlatform) IsKnown ¶
func (r PostUnpublishResponseTargetsPlatform) IsKnown() bool
type PostUnpublishResponseTargetsStatus ¶
type PostUnpublishResponseTargetsStatus string
const ( PostUnpublishResponseTargetsStatusDraft PostUnpublishResponseTargetsStatus = "draft" PostUnpublishResponseTargetsStatusScheduled PostUnpublishResponseTargetsStatus = "scheduled" PostUnpublishResponseTargetsStatusPublishing PostUnpublishResponseTargetsStatus = "publishing" PostUnpublishResponseTargetsStatusPublished PostUnpublishResponseTargetsStatus = "published" PostUnpublishResponseTargetsStatusFailed PostUnpublishResponseTargetsStatus = "failed" )
func (PostUnpublishResponseTargetsStatus) IsKnown ¶
func (r PostUnpublishResponseTargetsStatus) IsKnown() bool
type PostUpdateParams ¶
type PostUpdateParams struct {
// Post text
Content param.Field[string] `json:"content"`
// Updated media
Media param.Field[[]PostUpdateParamsMedia] `json:"media"`
// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
// an ISO 8601 timestamp to schedule.
ScheduledAt param.Field[string] `json:"scheduled_at"`
TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
// Updated targets
Targets param.Field[[]string] `json:"targets"`
Timezone param.Field[string] `json:"timezone"`
}
func (PostUpdateParams) MarshalJSON ¶
func (r PostUpdateParams) MarshalJSON() (data []byte, err error)
type PostUpdateParamsMedia ¶
type PostUpdateParamsMedia struct {
// Public URL of the media file
URL param.Field[string] `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type param.Field[PostUpdateParamsMediaType] `json:"type"`
}
func (PostUpdateParamsMedia) MarshalJSON ¶
func (r PostUpdateParamsMedia) MarshalJSON() (data []byte, err error)
type PostUpdateParamsMediaType ¶
type PostUpdateParamsMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostUpdateParamsMediaTypeImage PostUpdateParamsMediaType = "image" PostUpdateParamsMediaTypeVideo PostUpdateParamsMediaType = "video" PostUpdateParamsMediaTypeGif PostUpdateParamsMediaType = "gif" PostUpdateParamsMediaTypeDocument PostUpdateParamsMediaType = "document" )
func (PostUpdateParamsMediaType) IsKnown ¶
func (r PostUpdateParamsMediaType) IsKnown() bool
type PostUpdateResponse ¶
type PostUpdateResponse struct {
// Post ID
ID string `json:"id" api:"required"`
Content string `json:"content" api:"required,nullable"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Media []PostUpdateResponseMedia `json:"media" api:"required,nullable"`
ScheduledAt string `json:"scheduled_at" api:"required,nullable"`
Status PostUpdateResponseStatus `json:"status" api:"required"`
// Per-target results
Targets map[string]PostUpdateResponseTarget `json:"targets" api:"required"`
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
JSON postUpdateResponseJSON `json:"-"`
}
func (*PostUpdateResponse) UnmarshalJSON ¶
func (r *PostUpdateResponse) UnmarshalJSON(data []byte) (err error)
type PostUpdateResponseMedia ¶
type PostUpdateResponseMedia struct {
// Public URL of the media file
URL string `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type PostUpdateResponseMediaType `json:"type"`
JSON postUpdateResponseMediaJSON `json:"-"`
}
func (*PostUpdateResponseMedia) UnmarshalJSON ¶
func (r *PostUpdateResponseMedia) UnmarshalJSON(data []byte) (err error)
type PostUpdateResponseMediaType ¶
type PostUpdateResponseMediaType string
Media type. Inferred from URL extension if omitted.
const ( PostUpdateResponseMediaTypeImage PostUpdateResponseMediaType = "image" PostUpdateResponseMediaTypeVideo PostUpdateResponseMediaType = "video" PostUpdateResponseMediaTypeGif PostUpdateResponseMediaType = "gif" PostUpdateResponseMediaTypeDocument PostUpdateResponseMediaType = "document" )
func (PostUpdateResponseMediaType) IsKnown ¶
func (r PostUpdateResponseMediaType) IsKnown() bool
type PostUpdateResponseStatus ¶
type PostUpdateResponseStatus string
const ( PostUpdateResponseStatusDraft PostUpdateResponseStatus = "draft" PostUpdateResponseStatusScheduled PostUpdateResponseStatus = "scheduled" PostUpdateResponseStatusPublishing PostUpdateResponseStatus = "publishing" PostUpdateResponseStatusPublished PostUpdateResponseStatus = "published" PostUpdateResponseStatusFailed PostUpdateResponseStatus = "failed" PostUpdateResponseStatusPartial PostUpdateResponseStatus = "partial" )
func (PostUpdateResponseStatus) IsKnown ¶
func (r PostUpdateResponseStatus) IsKnown() bool
type PostUpdateResponseTarget ¶
type PostUpdateResponseTarget struct {
Platform PostUpdateResponseTargetsPlatform `json:"platform" api:"required"`
Status PostUpdateResponseTargetsStatus `json:"status" api:"required"`
Accounts []PostUpdateResponseTargetsAccount `json:"accounts"`
Error PostUpdateResponseTargetsError `json:"error"`
JSON postUpdateResponseTargetJSON `json:"-"`
}
func (*PostUpdateResponseTarget) UnmarshalJSON ¶
func (r *PostUpdateResponseTarget) UnmarshalJSON(data []byte) (err error)
type PostUpdateResponseTargetsAccount ¶
type PostUpdateResponseTargetsAccount struct {
ID string `json:"id" api:"required"`
// Published post URL on the platform
URL string `json:"url" api:"required,nullable"`
Username string `json:"username" api:"required,nullable"`
JSON postUpdateResponseTargetsAccountJSON `json:"-"`
}
func (*PostUpdateResponseTargetsAccount) UnmarshalJSON ¶
func (r *PostUpdateResponseTargetsAccount) UnmarshalJSON(data []byte) (err error)
type PostUpdateResponseTargetsError ¶
type PostUpdateResponseTargetsError struct {
Code string `json:"code" api:"required"`
Message string `json:"message" api:"required"`
JSON postUpdateResponseTargetsErrorJSON `json:"-"`
}
func (*PostUpdateResponseTargetsError) UnmarshalJSON ¶
func (r *PostUpdateResponseTargetsError) UnmarshalJSON(data []byte) (err error)
type PostUpdateResponseTargetsPlatform ¶
type PostUpdateResponseTargetsPlatform string
const ( PostUpdateResponseTargetsPlatformTwitter PostUpdateResponseTargetsPlatform = "twitter" PostUpdateResponseTargetsPlatformInstagram PostUpdateResponseTargetsPlatform = "instagram" PostUpdateResponseTargetsPlatformFacebook PostUpdateResponseTargetsPlatform = "facebook" PostUpdateResponseTargetsPlatformLinkedin PostUpdateResponseTargetsPlatform = "linkedin" PostUpdateResponseTargetsPlatformTiktok PostUpdateResponseTargetsPlatform = "tiktok" PostUpdateResponseTargetsPlatformYoutube PostUpdateResponseTargetsPlatform = "youtube" PostUpdateResponseTargetsPlatformPinterest PostUpdateResponseTargetsPlatform = "pinterest" PostUpdateResponseTargetsPlatformReddit PostUpdateResponseTargetsPlatform = "reddit" PostUpdateResponseTargetsPlatformBluesky PostUpdateResponseTargetsPlatform = "bluesky" PostUpdateResponseTargetsPlatformThreads PostUpdateResponseTargetsPlatform = "threads" PostUpdateResponseTargetsPlatformTelegram PostUpdateResponseTargetsPlatform = "telegram" PostUpdateResponseTargetsPlatformSnapchat PostUpdateResponseTargetsPlatform = "snapchat" PostUpdateResponseTargetsPlatformGooglebusiness PostUpdateResponseTargetsPlatform = "googlebusiness" PostUpdateResponseTargetsPlatformWhatsapp PostUpdateResponseTargetsPlatform = "whatsapp" PostUpdateResponseTargetsPlatformMastodon PostUpdateResponseTargetsPlatform = "mastodon" PostUpdateResponseTargetsPlatformDiscord PostUpdateResponseTargetsPlatform = "discord" PostUpdateResponseTargetsPlatformSMS PostUpdateResponseTargetsPlatform = "sms" )
func (PostUpdateResponseTargetsPlatform) IsKnown ¶
func (r PostUpdateResponseTargetsPlatform) IsKnown() bool
type PostUpdateResponseTargetsStatus ¶
type PostUpdateResponseTargetsStatus string
const ( PostUpdateResponseTargetsStatusDraft PostUpdateResponseTargetsStatus = "draft" PostUpdateResponseTargetsStatusScheduled PostUpdateResponseTargetsStatus = "scheduled" PostUpdateResponseTargetsStatusPublishing PostUpdateResponseTargetsStatus = "publishing" PostUpdateResponseTargetsStatusPublished PostUpdateResponseTargetsStatus = "published" PostUpdateResponseTargetsStatusFailed PostUpdateResponseTargetsStatus = "failed" )
func (PostUpdateResponseTargetsStatus) IsKnown ¶
func (r PostUpdateResponseTargetsStatus) IsKnown() bool
type QueueGetNextSlotResponse ¶
type QueueGetNextSlotResponse struct {
// Next available slot (ISO 8601)
NextSlotAt time.Time `json:"next_slot_at" api:"required" format:"date-time"`
// Queue schedule ID
QueueID string `json:"queue_id" api:"required"`
JSON queueGetNextSlotResponseJSON `json:"-"`
}
func (*QueueGetNextSlotResponse) UnmarshalJSON ¶
func (r *QueueGetNextSlotResponse) UnmarshalJSON(data []byte) (err error)
type QueuePreviewParams ¶
type QueuePreviewParams struct {
// Number of upcoming slots to preview
Count param.Field[int64] `query:"count"`
}
func (QueuePreviewParams) URLQuery ¶
func (r QueuePreviewParams) URLQuery() (v url.Values)
URLQuery serializes QueuePreviewParams's query parameters as `url.Values`.
type QueuePreviewResponse ¶
type QueuePreviewResponse struct {
// Upcoming slot timestamps (ISO 8601)
Slots []time.Time `json:"slots" api:"required" format:"date-time"`
JSON queuePreviewResponseJSON `json:"-"`
}
func (*QueuePreviewResponse) UnmarshalJSON ¶
func (r *QueuePreviewResponse) UnmarshalJSON(data []byte) (err error)
type QueueService ¶
type QueueService struct {
Options []option.RequestOption
Slots *QueueSlotService
}
QueueService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueueService method instead.
func NewQueueService ¶
func NewQueueService(opts ...option.RequestOption) (r *QueueService)
NewQueueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QueueService) GetNextSlot ¶
func (r *QueueService) GetNextSlot(ctx context.Context, opts ...option.RequestOption) (res *QueueGetNextSlotResponse, err error)
Get next available queue slot
func (*QueueService) Preview ¶
func (r *QueueService) Preview(ctx context.Context, query QueuePreviewParams, opts ...option.RequestOption) (res *QueuePreviewResponse, err error)
Preview upcoming queue slots
type QueueSlotListResponse ¶
type QueueSlotListResponse struct {
Data []QueueSlotListResponseData `json:"data" api:"required"`
JSON queueSlotListResponseJSON `json:"-"`
}
func (*QueueSlotListResponse) UnmarshalJSON ¶
func (r *QueueSlotListResponse) UnmarshalJSON(data []byte) (err error)
type QueueSlotListResponseData ¶
type QueueSlotListResponseData struct {
// Queue schedule ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether this is the default schedule
IsDefault bool `json:"is_default" api:"required"`
// Time slots
Slots []QueueSlotListResponseDataSlot `json:"slots" api:"required"`
// Updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Schedule name
Name string `json:"name" api:"nullable"`
JSON queueSlotListResponseDataJSON `json:"-"`
}
func (*QueueSlotListResponseData) UnmarshalJSON ¶
func (r *QueueSlotListResponseData) UnmarshalJSON(data []byte) (err error)
type QueueSlotListResponseDataSlot ¶
type QueueSlotListResponseDataSlot struct {
// Day of week (0=Sunday, 6=Saturday)
DayOfWeek int64 `json:"day_of_week" api:"required"`
// Time in HH:MM format
Time string `json:"time" api:"required"`
// IANA timezone (e.g. America/New_York)
Timezone string `json:"timezone" api:"required"`
JSON queueSlotListResponseDataSlotJSON `json:"-"`
}
func (*QueueSlotListResponseDataSlot) UnmarshalJSON ¶
func (r *QueueSlotListResponseDataSlot) UnmarshalJSON(data []byte) (err error)
type QueueSlotNewParams ¶
type QueueSlotNewParams struct {
// Time slots
Slots param.Field[[]QueueSlotNewParamsSlot] `json:"slots" api:"required"`
// Default timezone for slots
Timezone param.Field[string] `json:"timezone" api:"required"`
// Schedule name
Name param.Field[string] `json:"name"`
}
func (QueueSlotNewParams) MarshalJSON ¶
func (r QueueSlotNewParams) MarshalJSON() (data []byte, err error)
type QueueSlotNewParamsSlot ¶
type QueueSlotNewParamsSlot struct {
// Day of week (0=Sunday, 6=Saturday)
DayOfWeek param.Field[int64] `json:"day_of_week" api:"required"`
// Time in HH:MM format
Time param.Field[string] `json:"time" api:"required"`
// IANA timezone (e.g. America/New_York)
Timezone param.Field[string] `json:"timezone" api:"required"`
}
func (QueueSlotNewParamsSlot) MarshalJSON ¶
func (r QueueSlotNewParamsSlot) MarshalJSON() (data []byte, err error)
type QueueSlotNewResponse ¶
type QueueSlotNewResponse struct {
// Queue schedule ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether this is the default schedule
IsDefault bool `json:"is_default" api:"required"`
// Time slots
Slots []QueueSlotNewResponseSlot `json:"slots" api:"required"`
// Updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Schedule name
Name string `json:"name" api:"nullable"`
JSON queueSlotNewResponseJSON `json:"-"`
}
func (*QueueSlotNewResponse) UnmarshalJSON ¶
func (r *QueueSlotNewResponse) UnmarshalJSON(data []byte) (err error)
type QueueSlotNewResponseSlot ¶
type QueueSlotNewResponseSlot struct {
// Day of week (0=Sunday, 6=Saturday)
DayOfWeek int64 `json:"day_of_week" api:"required"`
// Time in HH:MM format
Time string `json:"time" api:"required"`
// IANA timezone (e.g. America/New_York)
Timezone string `json:"timezone" api:"required"`
JSON queueSlotNewResponseSlotJSON `json:"-"`
}
func (*QueueSlotNewResponseSlot) UnmarshalJSON ¶
func (r *QueueSlotNewResponseSlot) UnmarshalJSON(data []byte) (err error)
type QueueSlotService ¶
type QueueSlotService struct {
Options []option.RequestOption
}
QueueSlotService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueueSlotService method instead.
func NewQueueSlotService ¶
func NewQueueSlotService(opts ...option.RequestOption) (r *QueueSlotService)
NewQueueSlotService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*QueueSlotService) Delete ¶
func (r *QueueSlotService) Delete(ctx context.Context, opts ...option.RequestOption) (err error)
Delete queue schedule
func (*QueueSlotService) List ¶
func (r *QueueSlotService) List(ctx context.Context, opts ...option.RequestOption) (res *QueueSlotListResponse, err error)
List queue schedules
func (*QueueSlotService) New ¶
func (r *QueueSlotService) New(ctx context.Context, body QueueSlotNewParams, opts ...option.RequestOption) (res *QueueSlotNewResponse, err error)
Create a queue schedule
func (*QueueSlotService) Update ¶
func (r *QueueSlotService) Update(ctx context.Context, body QueueSlotUpdateParams, opts ...option.RequestOption) (res *QueueSlotUpdateResponse, err error)
Update queue schedule
type QueueSlotUpdateParams ¶
type QueueSlotUpdateParams struct {
// Schedule name
Name param.Field[string] `json:"name"`
// Set this schedule as the default
SetAsDefault param.Field[bool] `json:"set_as_default"`
// Updated time slots
Slots param.Field[[]QueueSlotUpdateParamsSlot] `json:"slots"`
}
func (QueueSlotUpdateParams) MarshalJSON ¶
func (r QueueSlotUpdateParams) MarshalJSON() (data []byte, err error)
type QueueSlotUpdateParamsSlot ¶
type QueueSlotUpdateParamsSlot struct {
// Day of week (0=Sunday, 6=Saturday)
DayOfWeek param.Field[int64] `json:"day_of_week" api:"required"`
// Time in HH:MM format
Time param.Field[string] `json:"time" api:"required"`
// IANA timezone (e.g. America/New_York)
Timezone param.Field[string] `json:"timezone" api:"required"`
}
func (QueueSlotUpdateParamsSlot) MarshalJSON ¶
func (r QueueSlotUpdateParamsSlot) MarshalJSON() (data []byte, err error)
type QueueSlotUpdateResponse ¶
type QueueSlotUpdateResponse struct {
// Queue schedule ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether this is the default schedule
IsDefault bool `json:"is_default" api:"required"`
// Time slots
Slots []QueueSlotUpdateResponseSlot `json:"slots" api:"required"`
// Updated timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Schedule name
Name string `json:"name" api:"nullable"`
JSON queueSlotUpdateResponseJSON `json:"-"`
}
func (*QueueSlotUpdateResponse) UnmarshalJSON ¶
func (r *QueueSlotUpdateResponse) UnmarshalJSON(data []byte) (err error)
type QueueSlotUpdateResponseSlot ¶
type QueueSlotUpdateResponseSlot struct {
// Day of week (0=Sunday, 6=Saturday)
DayOfWeek int64 `json:"day_of_week" api:"required"`
// Time in HH:MM format
Time string `json:"time" api:"required"`
// IANA timezone (e.g. America/New_York)
Timezone string `json:"timezone" api:"required"`
JSON queueSlotUpdateResponseSlotJSON `json:"-"`
}
func (*QueueSlotUpdateResponseSlot) UnmarshalJSON ¶
func (r *QueueSlotUpdateResponseSlot) UnmarshalJSON(data []byte) (err error)
type RedditGetFeedParams ¶
type RedditGetFeedParams struct {
// Reddit account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
// Subreddit name
Subreddit param.Field[string] `query:"subreddit" api:"required"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Sort order
Sort param.Field[RedditGetFeedParamsSort] `query:"sort"`
// Time filter (for top sort)
Time param.Field[RedditGetFeedParamsTime] `query:"time"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (RedditGetFeedParams) URLQuery ¶
func (r RedditGetFeedParams) URLQuery() (v url.Values)
URLQuery serializes RedditGetFeedParams's query parameters as `url.Values`.
type RedditGetFeedParamsSort ¶
type RedditGetFeedParamsSort string
Sort order
const ( RedditGetFeedParamsSortHot RedditGetFeedParamsSort = "hot" RedditGetFeedParamsSortNew RedditGetFeedParamsSort = "new" RedditGetFeedParamsSortTop RedditGetFeedParamsSort = "top" RedditGetFeedParamsSortRising RedditGetFeedParamsSort = "rising" )
func (RedditGetFeedParamsSort) IsKnown ¶
func (r RedditGetFeedParamsSort) IsKnown() bool
type RedditGetFeedParamsTime ¶
type RedditGetFeedParamsTime string
Time filter (for top sort)
const ( RedditGetFeedParamsTimeHour RedditGetFeedParamsTime = "hour" RedditGetFeedParamsTimeDay RedditGetFeedParamsTime = "day" RedditGetFeedParamsTimeWeek RedditGetFeedParamsTime = "week" RedditGetFeedParamsTimeMonth RedditGetFeedParamsTime = "month" RedditGetFeedParamsTimeYear RedditGetFeedParamsTime = "year" RedditGetFeedParamsTimeAll RedditGetFeedParamsTime = "all" )
func (RedditGetFeedParamsTime) IsKnown ¶
func (r RedditGetFeedParamsTime) IsKnown() bool
type RedditGetFeedResponse ¶
type RedditGetFeedResponse struct {
Data []RedditGetFeedResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON redditGetFeedResponseJSON `json:"-"`
}
func (*RedditGetFeedResponse) UnmarshalJSON ¶
func (r *RedditGetFeedResponse) UnmarshalJSON(data []byte) (err error)
type RedditGetFeedResponseData ¶
type RedditGetFeedResponseData struct {
// Reddit post ID
ID string `json:"id" api:"required"`
// Post author
Author string `json:"author" api:"required"`
// Created timestamp (Unix)
CreatedUtc float64 `json:"created_utc" api:"required"`
// Whether it's a self post
IsSelf bool `json:"is_self" api:"required"`
// Whether NSFW
Nsfw bool `json:"nsfw" api:"required"`
// Comment count
NumComments float64 `json:"num_comments" api:"required"`
// Post score
Score float64 `json:"score" api:"required"`
// Subreddit name
Subreddit string `json:"subreddit" api:"required"`
// Post title
Title string `json:"title" api:"required"`
// Post URL
URL string `json:"url" api:"required"`
// Self text
Selftext string `json:"selftext" api:"nullable"`
// Thumbnail URL
Thumbnail string `json:"thumbnail" api:"nullable"`
JSON redditGetFeedResponseDataJSON `json:"-"`
}
func (*RedditGetFeedResponseData) UnmarshalJSON ¶
func (r *RedditGetFeedResponseData) UnmarshalJSON(data []byte) (err error)
type RedditSearchParams ¶
type RedditSearchParams struct {
// Reddit account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
// Search query
Query param.Field[string] `query:"query" api:"required"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Sort order
Sort param.Field[RedditSearchParamsSort] `query:"sort"`
// Limit to subreddit
Subreddit param.Field[string] `query:"subreddit"`
// Time filter
Time param.Field[RedditSearchParamsTime] `query:"time"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (RedditSearchParams) URLQuery ¶
func (r RedditSearchParams) URLQuery() (v url.Values)
URLQuery serializes RedditSearchParams's query parameters as `url.Values`.
type RedditSearchParamsSort ¶
type RedditSearchParamsSort string
Sort order
const ( RedditSearchParamsSortRelevance RedditSearchParamsSort = "relevance" RedditSearchParamsSortHot RedditSearchParamsSort = "hot" RedditSearchParamsSortTop RedditSearchParamsSort = "top" RedditSearchParamsSortNew RedditSearchParamsSort = "new" RedditSearchParamsSortComments RedditSearchParamsSort = "comments" )
func (RedditSearchParamsSort) IsKnown ¶
func (r RedditSearchParamsSort) IsKnown() bool
type RedditSearchParamsTime ¶
type RedditSearchParamsTime string
Time filter
const ( RedditSearchParamsTimeHour RedditSearchParamsTime = "hour" RedditSearchParamsTimeDay RedditSearchParamsTime = "day" RedditSearchParamsTimeWeek RedditSearchParamsTime = "week" RedditSearchParamsTimeMonth RedditSearchParamsTime = "month" RedditSearchParamsTimeYear RedditSearchParamsTime = "year" RedditSearchParamsTimeAll RedditSearchParamsTime = "all" )
func (RedditSearchParamsTime) IsKnown ¶
func (r RedditSearchParamsTime) IsKnown() bool
type RedditSearchResponse ¶
type RedditSearchResponse struct {
Data []RedditSearchResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON redditSearchResponseJSON `json:"-"`
}
func (*RedditSearchResponse) UnmarshalJSON ¶
func (r *RedditSearchResponse) UnmarshalJSON(data []byte) (err error)
type RedditSearchResponseData ¶
type RedditSearchResponseData struct {
// Reddit post ID
ID string `json:"id" api:"required"`
// Post author
Author string `json:"author" api:"required"`
// Created timestamp (Unix)
CreatedUtc float64 `json:"created_utc" api:"required"`
// Whether it's a self post
IsSelf bool `json:"is_self" api:"required"`
// Whether NSFW
Nsfw bool `json:"nsfw" api:"required"`
// Comment count
NumComments float64 `json:"num_comments" api:"required"`
// Post score
Score float64 `json:"score" api:"required"`
// Subreddit name
Subreddit string `json:"subreddit" api:"required"`
// Post title
Title string `json:"title" api:"required"`
// Post URL
URL string `json:"url" api:"required"`
// Self text
Selftext string `json:"selftext" api:"nullable"`
// Thumbnail URL
Thumbnail string `json:"thumbnail" api:"nullable"`
JSON redditSearchResponseDataJSON `json:"-"`
}
func (*RedditSearchResponseData) UnmarshalJSON ¶
func (r *RedditSearchResponseData) UnmarshalJSON(data []byte) (err error)
type RedditService ¶
type RedditService struct {
Options []option.RequestOption
}
RedditService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRedditService method instead.
func NewRedditService ¶
func NewRedditService(opts ...option.RequestOption) (r *RedditService)
NewRedditService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RedditService) GetFeed ¶
func (r *RedditService) GetFeed(ctx context.Context, query RedditGetFeedParams, opts ...option.RequestOption) (res *RedditGetFeedResponse, err error)
Get subreddit feed
func (*RedditService) Search ¶
func (r *RedditService) Search(ctx context.Context, query RedditSearchParams, opts ...option.RequestOption) (res *RedditSearchResponse, err error)
Search Reddit posts
type ToolInstagramCheckHashtagSafetyParams ¶
type ToolInstagramCheckHashtagSafetyParams struct {
Hashtags param.Field[[]string] `json:"hashtags" api:"required"`
}
func (ToolInstagramCheckHashtagSafetyParams) MarshalJSON ¶
func (r ToolInstagramCheckHashtagSafetyParams) MarshalJSON() (data []byte, err error)
type ToolInstagramCheckHashtagSafetyResponse ¶
type ToolInstagramCheckHashtagSafetyResponse struct {
Results []ToolInstagramCheckHashtagSafetyResponseResult `json:"results" api:"required"`
JSON toolInstagramCheckHashtagSafetyResponseJSON `json:"-"`
}
func (*ToolInstagramCheckHashtagSafetyResponse) UnmarshalJSON ¶
func (r *ToolInstagramCheckHashtagSafetyResponse) UnmarshalJSON(data []byte) (err error)
type ToolInstagramCheckHashtagSafetyResponseResult ¶
type ToolInstagramCheckHashtagSafetyResponseResult struct {
// Hashtag checked
Hashtag string `json:"hashtag" api:"required"`
// Hashtag safety status
Status ToolInstagramCheckHashtagSafetyResponseResultsStatus `json:"status" api:"required"`
JSON toolInstagramCheckHashtagSafetyResponseResultJSON `json:"-"`
}
func (*ToolInstagramCheckHashtagSafetyResponseResult) UnmarshalJSON ¶
func (r *ToolInstagramCheckHashtagSafetyResponseResult) UnmarshalJSON(data []byte) (err error)
type ToolInstagramCheckHashtagSafetyResponseResultsStatus ¶
type ToolInstagramCheckHashtagSafetyResponseResultsStatus string
Hashtag safety status
const ( ToolInstagramCheckHashtagSafetyResponseResultsStatusSafe ToolInstagramCheckHashtagSafetyResponseResultsStatus = "safe" ToolInstagramCheckHashtagSafetyResponseResultsStatusRestricted ToolInstagramCheckHashtagSafetyResponseResultsStatus = "restricted" ToolInstagramCheckHashtagSafetyResponseResultsStatusBanned ToolInstagramCheckHashtagSafetyResponseResultsStatus = "banned" )
func (ToolInstagramCheckHashtagSafetyResponseResultsStatus) IsKnown ¶
func (r ToolInstagramCheckHashtagSafetyResponseResultsStatus) IsKnown() bool
type ToolInstagramService ¶
type ToolInstagramService struct {
Options []option.RequestOption
}
ToolInstagramService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToolInstagramService method instead.
func NewToolInstagramService ¶
func NewToolInstagramService(opts ...option.RequestOption) (r *ToolInstagramService)
NewToolInstagramService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ToolInstagramService) CheckHashtagSafety ¶
func (r *ToolInstagramService) CheckHashtagSafety(ctx context.Context, body ToolInstagramCheckHashtagSafetyParams, opts ...option.RequestOption) (res *ToolInstagramCheckHashtagSafetyResponse, err error)
Check Instagram hashtag safety status
type ToolService ¶
type ToolService struct {
Options []option.RequestOption
Validate *ToolValidateService
Instagram *ToolInstagramService
}
ToolService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToolService method instead.
func NewToolService ¶
func NewToolService(opts ...option.RequestOption) (r *ToolService)
NewToolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ToolValidateCheckPostLengthParams ¶
type ToolValidateCheckPostLengthParams struct {
// Post content to check
Content param.Field[string] `json:"content" api:"required"`
}
func (ToolValidateCheckPostLengthParams) MarshalJSON ¶
func (r ToolValidateCheckPostLengthParams) MarshalJSON() (data []byte, err error)
type ToolValidateCheckPostLengthResponse ¶
type ToolValidateCheckPostLengthResponse struct {
// Character count per platform
Platforms ToolValidateCheckPostLengthResponsePlatforms `json:"platforms" api:"required"`
JSON toolValidateCheckPostLengthResponseJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponse) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponse) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatforms ¶
type ToolValidateCheckPostLengthResponsePlatforms struct {
Bluesky ToolValidateCheckPostLengthResponsePlatformsBluesky `json:"bluesky"`
Discord ToolValidateCheckPostLengthResponsePlatformsDiscord `json:"discord"`
Facebook ToolValidateCheckPostLengthResponsePlatformsFacebook `json:"facebook"`
Googlebusiness ToolValidateCheckPostLengthResponsePlatformsGooglebusiness `json:"googlebusiness"`
Instagram ToolValidateCheckPostLengthResponsePlatformsInstagram `json:"instagram"`
Linkedin ToolValidateCheckPostLengthResponsePlatformsLinkedin `json:"linkedin"`
Mastodon ToolValidateCheckPostLengthResponsePlatformsMastodon `json:"mastodon"`
Pinterest ToolValidateCheckPostLengthResponsePlatformsPinterest `json:"pinterest"`
Reddit ToolValidateCheckPostLengthResponsePlatformsReddit `json:"reddit"`
SMS ToolValidateCheckPostLengthResponsePlatformsSMS `json:"sms"`
Snapchat ToolValidateCheckPostLengthResponsePlatformsSnapchat `json:"snapchat"`
Telegram ToolValidateCheckPostLengthResponsePlatformsTelegram `json:"telegram"`
Threads ToolValidateCheckPostLengthResponsePlatformsThreads `json:"threads"`
Tiktok ToolValidateCheckPostLengthResponsePlatformsTiktok `json:"tiktok"`
Twitter ToolValidateCheckPostLengthResponsePlatformsTwitter `json:"twitter"`
Whatsapp ToolValidateCheckPostLengthResponsePlatformsWhatsapp `json:"whatsapp"`
Youtube ToolValidateCheckPostLengthResponsePlatformsYoutube `json:"youtube"`
JSON toolValidateCheckPostLengthResponsePlatformsJSON `json:"-"`
}
Character count per platform
func (*ToolValidateCheckPostLengthResponsePlatforms) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatforms) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsBluesky ¶
type ToolValidateCheckPostLengthResponsePlatformsBluesky struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsBlueskyJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsBluesky) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsBluesky) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsDiscord ¶
type ToolValidateCheckPostLengthResponsePlatformsDiscord struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsDiscordJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsDiscord) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsDiscord) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsFacebook ¶
type ToolValidateCheckPostLengthResponsePlatformsFacebook struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsFacebookJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsFacebook) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsFacebook) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsGooglebusiness ¶
type ToolValidateCheckPostLengthResponsePlatformsGooglebusiness struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsGooglebusinessJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsGooglebusiness) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsGooglebusiness) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsInstagram ¶
type ToolValidateCheckPostLengthResponsePlatformsInstagram struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsInstagramJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsInstagram) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsInstagram) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsLinkedin ¶
type ToolValidateCheckPostLengthResponsePlatformsLinkedin struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsLinkedinJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsLinkedin) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsLinkedin) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsMastodon ¶
type ToolValidateCheckPostLengthResponsePlatformsMastodon struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsMastodonJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsMastodon) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsMastodon) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsPinterest ¶
type ToolValidateCheckPostLengthResponsePlatformsPinterest struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsPinterestJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsPinterest) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsPinterest) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsReddit ¶
type ToolValidateCheckPostLengthResponsePlatformsReddit struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsRedditJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsReddit) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsReddit) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsSMS ¶
type ToolValidateCheckPostLengthResponsePlatformsSMS struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsSMSJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsSMS) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsSMS) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsSnapchat ¶
type ToolValidateCheckPostLengthResponsePlatformsSnapchat struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsSnapchatJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsSnapchat) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsSnapchat) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsTelegram ¶
type ToolValidateCheckPostLengthResponsePlatformsTelegram struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsTelegramJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsTelegram) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsTelegram) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsThreads ¶
type ToolValidateCheckPostLengthResponsePlatformsThreads struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsThreadsJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsThreads) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsThreads) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsTiktok ¶
type ToolValidateCheckPostLengthResponsePlatformsTiktok struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsTiktokJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsTiktok) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsTiktok) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsTwitter ¶
type ToolValidateCheckPostLengthResponsePlatformsTwitter struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsTwitterJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsTwitter) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsTwitter) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsWhatsapp ¶
type ToolValidateCheckPostLengthResponsePlatformsWhatsapp struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsWhatsappJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsWhatsapp) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsWhatsapp) UnmarshalJSON(data []byte) (err error)
type ToolValidateCheckPostLengthResponsePlatformsYoutube ¶
type ToolValidateCheckPostLengthResponsePlatformsYoutube struct {
// Character count for this platform
Count float64 `json:"count" api:"required"`
// Character limit for this platform
Limit float64 `json:"limit" api:"required"`
// Whether content is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateCheckPostLengthResponsePlatformsYoutubeJSON `json:"-"`
}
func (*ToolValidateCheckPostLengthResponsePlatformsYoutube) UnmarshalJSON ¶
func (r *ToolValidateCheckPostLengthResponsePlatformsYoutube) UnmarshalJSON(data []byte) (err error)
type ToolValidateGetSubredditParams ¶
type ToolValidateGetSubredditParams struct {
// Subreddit name (without r/ prefix)
Name param.Field[string] `query:"name" api:"required"`
}
func (ToolValidateGetSubredditParams) URLQuery ¶
func (r ToolValidateGetSubredditParams) URLQuery() (v url.Values)
URLQuery serializes ToolValidateGetSubredditParams's query parameters as `url.Values`.
type ToolValidateGetSubredditResponse ¶
type ToolValidateGetSubredditResponse struct {
// Whether the subreddit exists
Exists bool `json:"exists" api:"required"`
// Canonical subreddit name
Name string `json:"name" api:"nullable"`
// Whether NSFW
Nsfw bool `json:"nsfw" api:"nullable"`
// Allowed post types
PostTypes ToolValidateGetSubredditResponsePostTypes `json:"post_types"`
// Subscriber count
Subscribers float64 `json:"subscribers" api:"nullable"`
// Subreddit title
Title string `json:"title" api:"nullable"`
JSON toolValidateGetSubredditResponseJSON `json:"-"`
}
func (*ToolValidateGetSubredditResponse) UnmarshalJSON ¶
func (r *ToolValidateGetSubredditResponse) UnmarshalJSON(data []byte) (err error)
type ToolValidateGetSubredditResponsePostTypes ¶
type ToolValidateGetSubredditResponsePostTypes struct {
// Allows image posts
Image bool `json:"image" api:"required"`
// Allows link posts
Link bool `json:"link" api:"required"`
// Allows text posts
Self bool `json:"self" api:"required"`
JSON toolValidateGetSubredditResponsePostTypesJSON `json:"-"`
}
Allowed post types
func (*ToolValidateGetSubredditResponsePostTypes) UnmarshalJSON ¶
func (r *ToolValidateGetSubredditResponsePostTypes) UnmarshalJSON(data []byte) (err error)
type ToolValidateService ¶
type ToolValidateService struct {
Options []option.RequestOption
}
ToolValidateService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToolValidateService method instead.
func NewToolValidateService ¶
func NewToolValidateService(opts ...option.RequestOption) (r *ToolValidateService)
NewToolValidateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ToolValidateService) CheckPostLength ¶
func (r *ToolValidateService) CheckPostLength(ctx context.Context, body ToolValidateCheckPostLengthParams, opts ...option.RequestOption) (res *ToolValidateCheckPostLengthResponse, err error)
Check character counts against platform limits
func (*ToolValidateService) GetSubreddit ¶
func (r *ToolValidateService) GetSubreddit(ctx context.Context, query ToolValidateGetSubredditParams, opts ...option.RequestOption) (res *ToolValidateGetSubredditResponse, err error)
Check if a subreddit exists and get its details
func (*ToolValidateService) ValidateMedia ¶
func (r *ToolValidateService) ValidateMedia(ctx context.Context, body ToolValidateValidateMediaParams, opts ...option.RequestOption) (res *ToolValidateValidateMediaResponse, err error)
Validate a media URL for platform compatibility
func (*ToolValidateService) ValidatePost ¶
func (r *ToolValidateService) ValidatePost(ctx context.Context, body ToolValidateValidatePostParams, opts ...option.RequestOption) (res *ToolValidateValidatePostResponse, err error)
Validate a post (dry-run without publishing)
type ToolValidateValidateMediaParams ¶
type ToolValidateValidateMediaParams struct {
// Media URL to validate
URL param.Field[string] `json:"url" api:"required" format:"uri"`
}
func (ToolValidateValidateMediaParams) MarshalJSON ¶
func (r ToolValidateValidateMediaParams) MarshalJSON() (data []byte, err error)
type ToolValidateValidateMediaResponse ¶
type ToolValidateValidateMediaResponse struct {
// Whether the URL is accessible
Accessible bool `json:"accessible" api:"required"`
// Per-platform size limits
PlatformLimits ToolValidateValidateMediaResponsePlatformLimits `json:"platform_limits" api:"required"`
// MIME type
ContentType string `json:"content_type" api:"nullable"`
// File size in bytes
Size float64 `json:"size" api:"nullable"`
JSON toolValidateValidateMediaResponseJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponse) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponse) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimits ¶
type ToolValidateValidateMediaResponsePlatformLimits struct {
Bluesky ToolValidateValidateMediaResponsePlatformLimitsBluesky `json:"bluesky"`
Discord ToolValidateValidateMediaResponsePlatformLimitsDiscord `json:"discord"`
Facebook ToolValidateValidateMediaResponsePlatformLimitsFacebook `json:"facebook"`
Googlebusiness ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness `json:"googlebusiness"`
Instagram ToolValidateValidateMediaResponsePlatformLimitsInstagram `json:"instagram"`
Linkedin ToolValidateValidateMediaResponsePlatformLimitsLinkedin `json:"linkedin"`
Mastodon ToolValidateValidateMediaResponsePlatformLimitsMastodon `json:"mastodon"`
Pinterest ToolValidateValidateMediaResponsePlatformLimitsPinterest `json:"pinterest"`
Reddit ToolValidateValidateMediaResponsePlatformLimitsReddit `json:"reddit"`
SMS ToolValidateValidateMediaResponsePlatformLimitsSMS `json:"sms"`
Snapchat ToolValidateValidateMediaResponsePlatformLimitsSnapchat `json:"snapchat"`
Telegram ToolValidateValidateMediaResponsePlatformLimitsTelegram `json:"telegram"`
Threads ToolValidateValidateMediaResponsePlatformLimitsThreads `json:"threads"`
Tiktok ToolValidateValidateMediaResponsePlatformLimitsTiktok `json:"tiktok"`
Twitter ToolValidateValidateMediaResponsePlatformLimitsTwitter `json:"twitter"`
Whatsapp ToolValidateValidateMediaResponsePlatformLimitsWhatsapp `json:"whatsapp"`
Youtube ToolValidateValidateMediaResponsePlatformLimitsYoutube `json:"youtube"`
JSON toolValidateValidateMediaResponsePlatformLimitsJSON `json:"-"`
}
Per-platform size limits
func (*ToolValidateValidateMediaResponsePlatformLimits) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimits) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsBluesky ¶
type ToolValidateValidateMediaResponsePlatformLimitsBluesky struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsBlueskyJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsBluesky) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsBluesky) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsDiscord ¶
type ToolValidateValidateMediaResponsePlatformLimitsDiscord struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsDiscordJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsDiscord) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsDiscord) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsFacebook ¶
type ToolValidateValidateMediaResponsePlatformLimitsFacebook struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsFacebookJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsFacebook) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsFacebook) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness ¶
type ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsGooglebusinessJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsGooglebusiness) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsInstagram ¶
type ToolValidateValidateMediaResponsePlatformLimitsInstagram struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsInstagramJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsInstagram) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsInstagram) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsLinkedin ¶
type ToolValidateValidateMediaResponsePlatformLimitsLinkedin struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsLinkedinJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsLinkedin) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsLinkedin) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsMastodon ¶
type ToolValidateValidateMediaResponsePlatformLimitsMastodon struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsMastodonJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsMastodon) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsMastodon) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsPinterest ¶
type ToolValidateValidateMediaResponsePlatformLimitsPinterest struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsPinterestJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsPinterest) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsPinterest) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsReddit ¶
type ToolValidateValidateMediaResponsePlatformLimitsReddit struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsRedditJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsReddit) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsReddit) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsSMS ¶
type ToolValidateValidateMediaResponsePlatformLimitsSMS struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsSMSJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsSMS) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsSMS) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsSnapchat ¶
type ToolValidateValidateMediaResponsePlatformLimitsSnapchat struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsSnapchatJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsSnapchat) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsSnapchat) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsTelegram ¶
type ToolValidateValidateMediaResponsePlatformLimitsTelegram struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsTelegramJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsTelegram) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsTelegram) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsThreads ¶
type ToolValidateValidateMediaResponsePlatformLimitsThreads struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsThreadsJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsThreads) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsThreads) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsTiktok ¶
type ToolValidateValidateMediaResponsePlatformLimitsTiktok struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsTiktokJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsTiktok) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsTiktok) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsTwitter ¶
type ToolValidateValidateMediaResponsePlatformLimitsTwitter struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsTwitterJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsTwitter) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsTwitter) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsWhatsapp ¶
type ToolValidateValidateMediaResponsePlatformLimitsWhatsapp struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsWhatsappJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsWhatsapp) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsWhatsapp) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidateMediaResponsePlatformLimitsYoutube ¶
type ToolValidateValidateMediaResponsePlatformLimitsYoutube struct {
// Maximum file size in bytes
MaxSize float64 `json:"max_size" api:"required"`
// Whether file size is within limit
WithinLimit bool `json:"within_limit" api:"required"`
JSON toolValidateValidateMediaResponsePlatformLimitsYoutubeJSON `json:"-"`
}
func (*ToolValidateValidateMediaResponsePlatformLimitsYoutube) UnmarshalJSON ¶
func (r *ToolValidateValidateMediaResponsePlatformLimitsYoutube) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidatePostParams ¶
type ToolValidateValidatePostParams struct {
// Publish intent. Use "now" to publish immediately, "draft" to save as draft, or
// an ISO 8601 timestamp to schedule.
ScheduledAt param.Field[string] `json:"scheduled_at" api:"required"`
// Account IDs, platform names, or group IDs to publish to
Targets param.Field[[]string] `json:"targets" api:"required"`
// Post text. Optional if target_options provide per-target content.
Content param.Field[string] `json:"content"`
// Media attachments
Media param.Field[[]ToolValidateValidatePostParamsMedia] `json:"media"`
// Per-target customizations keyed by target value (account ID or platform name)
TargetOptions param.Field[map[string]map[string]interface{}] `json:"target_options"`
// IANA timezone for scheduling
Timezone param.Field[string] `json:"timezone"`
}
func (ToolValidateValidatePostParams) MarshalJSON ¶
func (r ToolValidateValidatePostParams) MarshalJSON() (data []byte, err error)
type ToolValidateValidatePostParamsMedia ¶
type ToolValidateValidatePostParamsMedia struct {
// Public URL of the media file
URL param.Field[string] `json:"url" api:"required" format:"uri"`
// Media type. Inferred from URL extension if omitted.
Type param.Field[ToolValidateValidatePostParamsMediaType] `json:"type"`
}
func (ToolValidateValidatePostParamsMedia) MarshalJSON ¶
func (r ToolValidateValidatePostParamsMedia) MarshalJSON() (data []byte, err error)
type ToolValidateValidatePostParamsMediaType ¶
type ToolValidateValidatePostParamsMediaType string
Media type. Inferred from URL extension if omitted.
const ( ToolValidateValidatePostParamsMediaTypeImage ToolValidateValidatePostParamsMediaType = "image" ToolValidateValidatePostParamsMediaTypeVideo ToolValidateValidatePostParamsMediaType = "video" ToolValidateValidatePostParamsMediaTypeGif ToolValidateValidatePostParamsMediaType = "gif" ToolValidateValidatePostParamsMediaTypeDocument ToolValidateValidatePostParamsMediaType = "document" )
func (ToolValidateValidatePostParamsMediaType) IsKnown ¶
func (r ToolValidateValidatePostParamsMediaType) IsKnown() bool
type ToolValidateValidatePostResponse ¶
type ToolValidateValidatePostResponse struct {
// Blocking errors
Errors []ToolValidateValidatePostResponseError `json:"errors" api:"required"`
// Whether the post is valid for all targets
Valid bool `json:"valid" api:"required"`
// Non-blocking warnings
Warnings []ToolValidateValidatePostResponseWarning `json:"warnings" api:"required"`
JSON toolValidateValidatePostResponseJSON `json:"-"`
}
func (*ToolValidateValidatePostResponse) UnmarshalJSON ¶
func (r *ToolValidateValidatePostResponse) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidatePostResponseError ¶
type ToolValidateValidatePostResponseError struct {
// Error code
Code string `json:"code" api:"required"`
// Human-readable error message
Message string `json:"message" api:"required"`
// Target identifier (account ID, platform, or field name)
Target string `json:"target" api:"required"`
JSON toolValidateValidatePostResponseErrorJSON `json:"-"`
}
func (*ToolValidateValidatePostResponseError) UnmarshalJSON ¶
func (r *ToolValidateValidatePostResponseError) UnmarshalJSON(data []byte) (err error)
type ToolValidateValidatePostResponseWarning ¶
type ToolValidateValidatePostResponseWarning struct {
// Error code
Code string `json:"code" api:"required"`
// Human-readable error message
Message string `json:"message" api:"required"`
// Target identifier (account ID, platform, or field name)
Target string `json:"target" api:"required"`
JSON toolValidateValidatePostResponseWarningJSON `json:"-"`
}
func (*ToolValidateValidatePostResponseWarning) UnmarshalJSON ¶
func (r *ToolValidateValidatePostResponseWarning) UnmarshalJSON(data []byte) (err error)
type TwitterBookmarkNewParams ¶
type TwitterBookmarkNewParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Tweet ID to bookmark
TweetID param.Field[string] `json:"tweet_id" api:"required"`
}
func (TwitterBookmarkNewParams) MarshalJSON ¶
func (r TwitterBookmarkNewParams) MarshalJSON() (data []byte, err error)
type TwitterBookmarkNewResponse ¶
type TwitterBookmarkNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterBookmarkNewResponseJSON `json:"-"`
}
func (*TwitterBookmarkNewResponse) UnmarshalJSON ¶
func (r *TwitterBookmarkNewResponse) UnmarshalJSON(data []byte) (err error)
type TwitterBookmarkRemoveParams ¶
type TwitterBookmarkRemoveParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Tweet ID to bookmark
TweetID param.Field[string] `json:"tweet_id" api:"required"`
}
func (TwitterBookmarkRemoveParams) MarshalJSON ¶
func (r TwitterBookmarkRemoveParams) MarshalJSON() (data []byte, err error)
type TwitterBookmarkRemoveResponse ¶
type TwitterBookmarkRemoveResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterBookmarkRemoveResponseJSON `json:"-"`
}
func (*TwitterBookmarkRemoveResponse) UnmarshalJSON ¶
func (r *TwitterBookmarkRemoveResponse) UnmarshalJSON(data []byte) (err error)
type TwitterBookmarkService ¶
type TwitterBookmarkService struct {
Options []option.RequestOption
}
TwitterBookmarkService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTwitterBookmarkService method instead.
func NewTwitterBookmarkService ¶
func NewTwitterBookmarkService(opts ...option.RequestOption) (r *TwitterBookmarkService)
NewTwitterBookmarkService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TwitterBookmarkService) New ¶
func (r *TwitterBookmarkService) New(ctx context.Context, body TwitterBookmarkNewParams, opts ...option.RequestOption) (res *TwitterBookmarkNewResponse, err error)
Bookmark a tweet
func (*TwitterBookmarkService) Remove ¶
func (r *TwitterBookmarkService) Remove(ctx context.Context, body TwitterBookmarkRemoveParams, opts ...option.RequestOption) (res *TwitterBookmarkRemoveResponse, err error)
Remove a bookmark
type TwitterFollowNewParams ¶
type TwitterFollowNewParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// User ID to follow
TargetUserID param.Field[string] `json:"target_user_id" api:"required"`
}
func (TwitterFollowNewParams) MarshalJSON ¶
func (r TwitterFollowNewParams) MarshalJSON() (data []byte, err error)
type TwitterFollowNewResponse ¶
type TwitterFollowNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterFollowNewResponseJSON `json:"-"`
}
func (*TwitterFollowNewResponse) UnmarshalJSON ¶
func (r *TwitterFollowNewResponse) UnmarshalJSON(data []byte) (err error)
type TwitterFollowService ¶
type TwitterFollowService struct {
Options []option.RequestOption
}
TwitterFollowService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTwitterFollowService method instead.
func NewTwitterFollowService ¶
func NewTwitterFollowService(opts ...option.RequestOption) (r *TwitterFollowService)
NewTwitterFollowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TwitterFollowService) New ¶
func (r *TwitterFollowService) New(ctx context.Context, body TwitterFollowNewParams, opts ...option.RequestOption) (res *TwitterFollowNewResponse, err error)
Follow a user
func (*TwitterFollowService) Unfollow ¶
func (r *TwitterFollowService) Unfollow(ctx context.Context, body TwitterFollowUnfollowParams, opts ...option.RequestOption) (res *TwitterFollowUnfollowResponse, err error)
Unfollow a user
type TwitterFollowUnfollowParams ¶
type TwitterFollowUnfollowParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// User ID to follow
TargetUserID param.Field[string] `json:"target_user_id" api:"required"`
}
func (TwitterFollowUnfollowParams) MarshalJSON ¶
func (r TwitterFollowUnfollowParams) MarshalJSON() (data []byte, err error)
type TwitterFollowUnfollowResponse ¶
type TwitterFollowUnfollowResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterFollowUnfollowResponseJSON `json:"-"`
}
func (*TwitterFollowUnfollowResponse) UnmarshalJSON ¶
func (r *TwitterFollowUnfollowResponse) UnmarshalJSON(data []byte) (err error)
type TwitterRetweetNewParams ¶
type TwitterRetweetNewParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Tweet ID to retweet
TweetID param.Field[string] `json:"tweet_id" api:"required"`
}
func (TwitterRetweetNewParams) MarshalJSON ¶
func (r TwitterRetweetNewParams) MarshalJSON() (data []byte, err error)
type TwitterRetweetNewResponse ¶
type TwitterRetweetNewResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterRetweetNewResponseJSON `json:"-"`
}
func (*TwitterRetweetNewResponse) UnmarshalJSON ¶
func (r *TwitterRetweetNewResponse) UnmarshalJSON(data []byte) (err error)
type TwitterRetweetService ¶
type TwitterRetweetService struct {
Options []option.RequestOption
}
TwitterRetweetService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTwitterRetweetService method instead.
func NewTwitterRetweetService ¶
func NewTwitterRetweetService(opts ...option.RequestOption) (r *TwitterRetweetService)
NewTwitterRetweetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TwitterRetweetService) New ¶
func (r *TwitterRetweetService) New(ctx context.Context, body TwitterRetweetNewParams, opts ...option.RequestOption) (res *TwitterRetweetNewResponse, err error)
Retweet a tweet
func (*TwitterRetweetService) Undo ¶
func (r *TwitterRetweetService) Undo(ctx context.Context, body TwitterRetweetUndoParams, opts ...option.RequestOption) (res *TwitterRetweetUndoResponse, err error)
Undo a retweet
type TwitterRetweetUndoParams ¶
type TwitterRetweetUndoParams struct {
// Twitter account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Tweet ID to retweet
TweetID param.Field[string] `json:"tweet_id" api:"required"`
}
func (TwitterRetweetUndoParams) MarshalJSON ¶
func (r TwitterRetweetUndoParams) MarshalJSON() (data []byte, err error)
type TwitterRetweetUndoResponse ¶
type TwitterRetweetUndoResponse struct {
// Whether the action succeeded
Success bool `json:"success" api:"required"`
JSON twitterRetweetUndoResponseJSON `json:"-"`
}
func (*TwitterRetweetUndoResponse) UnmarshalJSON ¶
func (r *TwitterRetweetUndoResponse) UnmarshalJSON(data []byte) (err error)
type TwitterService ¶
type TwitterService struct {
Options []option.RequestOption
Retweet *TwitterRetweetService
Bookmark *TwitterBookmarkService
Follow *TwitterFollowService
}
TwitterService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTwitterService method instead.
func NewTwitterService ¶
func NewTwitterService(opts ...option.RequestOption) (r *TwitterService)
NewTwitterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type UsageGetResponse ¶
type UsageGetResponse struct {
Plan UsageGetResponsePlan `json:"plan" api:"required"`
RateLimit UsageGetResponseRateLimit `json:"rate_limit" api:"required"`
Subscription UsageGetResponseSubscription `json:"subscription" api:"required"`
Usage UsageGetResponseUsage `json:"usage" api:"required"`
JSON usageGetResponseJSON `json:"-"`
}
func (*UsageGetResponse) UnmarshalJSON ¶
func (r *UsageGetResponse) UnmarshalJSON(data []byte) (err error)
type UsageGetResponsePlan ¶
type UsageGetResponsePlan struct {
// API calls included per billing cycle
APICallsLimit float64 `json:"api_calls_limit" api:"required"`
// API calls allowed per minute
APICallsPerMin float64 `json:"api_calls_per_min" api:"required"`
Features UsageGetResponsePlanFeatures `json:"features" api:"required"`
// Current plan
Name UsageGetResponsePlanName `json:"name" api:"required"`
JSON usageGetResponsePlanJSON `json:"-"`
}
func (*UsageGetResponsePlan) UnmarshalJSON ¶
func (r *UsageGetResponsePlan) UnmarshalJSON(data []byte) (err error)
type UsageGetResponsePlanFeatures ¶
type UsageGetResponsePlanFeatures struct {
// Access to /v1/analytics
Analytics bool `json:"analytics" api:"required"`
// Access to /v1/inbox
Inbox bool `json:"inbox" api:"required"`
JSON usageGetResponsePlanFeaturesJSON `json:"-"`
}
func (*UsageGetResponsePlanFeatures) UnmarshalJSON ¶
func (r *UsageGetResponsePlanFeatures) UnmarshalJSON(data []byte) (err error)
type UsageGetResponsePlanName ¶
type UsageGetResponsePlanName string
Current plan
const ( UsageGetResponsePlanNameFree UsageGetResponsePlanName = "free" UsageGetResponsePlanNamePro UsageGetResponsePlanName = "pro" )
func (UsageGetResponsePlanName) IsKnown ¶
func (r UsageGetResponsePlanName) IsKnown() bool
type UsageGetResponseRateLimit ¶
type UsageGetResponseRateLimit struct {
// Max API calls per rate-limit window
LimitPerMinute float64 `json:"limit_per_minute" api:"required"`
JSON usageGetResponseRateLimitJSON `json:"-"`
}
func (*UsageGetResponseRateLimit) UnmarshalJSON ¶
func (r *UsageGetResponseRateLimit) UnmarshalJSON(data []byte) (err error)
type UsageGetResponseSubscription ¶
type UsageGetResponseSubscription struct {
// Base monthly price in cents
MonthlyPriceCents float64 `json:"monthly_price_cents" api:"required"`
// Overage price per 1K API calls in cents
PricePerThousandCallsCents float64 `json:"price_per_thousand_calls_cents" api:"required"`
// Subscription status
Status string `json:"status" api:"required"`
JSON usageGetResponseSubscriptionJSON `json:"-"`
}
func (*UsageGetResponseSubscription) UnmarshalJSON ¶
func (r *UsageGetResponseSubscription) UnmarshalJSON(data []byte) (err error)
type UsageGetResponseUsage ¶
type UsageGetResponseUsage struct {
// API calls remaining this cycle (Infinity for pro overage)
APICallsRemaining float64 `json:"api_calls_remaining" api:"required"`
// API calls used this cycle
APICallsUsed float64 `json:"api_calls_used" api:"required"`
// Current billing cycle end
CycleEnd time.Time `json:"cycle_end" api:"required" format:"date-time"`
// Current billing cycle start
CycleStart time.Time `json:"cycle_start" api:"required" format:"date-time"`
// API calls exceeding included amount
OverageCalls float64 `json:"overage_calls" api:"required"`
// Overage cost in cents
OverageCostCents float64 `json:"overage_cost_cents" api:"required"`
JSON usageGetResponseUsageJSON `json:"-"`
}
func (*UsageGetResponseUsage) UnmarshalJSON ¶
func (r *UsageGetResponseUsage) UnmarshalJSON(data []byte) (err error)
type UsageService ¶
type UsageService struct {
Options []option.RequestOption
}
UsageService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUsageService method instead.
func NewUsageService ¶
func NewUsageService(opts ...option.RequestOption) (r *UsageService)
NewUsageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UsageService) Get ¶
func (r *UsageService) Get(ctx context.Context, opts ...option.RequestOption) (res *UsageGetResponse, err error)
Returns current plan details and API call usage statistics for the organization.
type WebhookListLogsParams ¶
type WebhookListLogsParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (WebhookListLogsParams) URLQuery ¶
func (r WebhookListLogsParams) URLQuery() (v url.Values)
URLQuery serializes WebhookListLogsParams's query parameters as `url.Values`.
type WebhookListLogsResponse ¶
type WebhookListLogsResponse struct {
Data []WebhookListLogsResponseData `json:"data" api:"required"`
HasMore bool `json:"has_more" api:"required"`
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON webhookListLogsResponseJSON `json:"-"`
}
func (*WebhookListLogsResponse) UnmarshalJSON ¶
func (r *WebhookListLogsResponse) UnmarshalJSON(data []byte) (err error)
type WebhookListLogsResponseData ¶
type WebhookListLogsResponseData struct {
ID string `json:"id" api:"required"`
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Error string `json:"error" api:"required,nullable"`
Event string `json:"event" api:"required"`
ResponseTimeMs float64 `json:"response_time_ms" api:"required,nullable"`
StatusCode float64 `json:"status_code" api:"required,nullable"`
Success bool `json:"success" api:"required"`
WebhookID string `json:"webhook_id" api:"required"`
JSON webhookListLogsResponseDataJSON `json:"-"`
}
func (*WebhookListLogsResponseData) UnmarshalJSON ¶
func (r *WebhookListLogsResponseData) UnmarshalJSON(data []byte) (err error)
type WebhookListParams ¶
type WebhookListParams struct {
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Filter: start date (ISO 8601)
From param.Field[time.Time] `query:"from" format:"date-time"`
// Number of items per page
Limit param.Field[int64] `query:"limit"`
// Filter: end date (ISO 8601)
To param.Field[time.Time] `query:"to" format:"date-time"`
}
func (WebhookListParams) URLQuery ¶
func (r WebhookListParams) URLQuery() (v url.Values)
URLQuery serializes WebhookListParams's query parameters as `url.Values`.
type WebhookListResponse ¶
type WebhookListResponse struct {
Data []WebhookListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON webhookListResponseJSON `json:"-"`
}
func (*WebhookListResponse) UnmarshalJSON ¶
func (r *WebhookListResponse) UnmarshalJSON(data []byte) (err error)
type WebhookListResponseData ¶
type WebhookListResponseData struct {
// Webhook ID
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether the webhook is active
Enabled bool `json:"enabled" api:"required"`
// Subscribed events
Events []string `json:"events" api:"required"`
// Last update timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Endpoint URL
URL string `json:"url" api:"required" format:"uri"`
JSON webhookListResponseDataJSON `json:"-"`
}
func (*WebhookListResponseData) UnmarshalJSON ¶
func (r *WebhookListResponseData) UnmarshalJSON(data []byte) (err error)
type WebhookNewParams ¶
type WebhookNewParams struct {
// Events to subscribe to
Events param.Field[[]WebhookNewParamsEvent] `json:"events" api:"required"`
// Webhook endpoint URL
URL param.Field[string] `json:"url" api:"required" format:"uri"`
}
func (WebhookNewParams) MarshalJSON ¶
func (r WebhookNewParams) MarshalJSON() (data []byte, err error)
type WebhookNewParamsEvent ¶
type WebhookNewParamsEvent string
const ( WebhookNewParamsEventPostPublished WebhookNewParamsEvent = "post.published" WebhookNewParamsEventPostPartial WebhookNewParamsEvent = "post.partial" WebhookNewParamsEventPostFailed WebhookNewParamsEvent = "post.failed" WebhookNewParamsEventPostScheduled WebhookNewParamsEvent = "post.scheduled" WebhookNewParamsEventAccountConnected WebhookNewParamsEvent = "account.connected" WebhookNewParamsEventAccountDisconnected WebhookNewParamsEvent = "account.disconnected" WebhookNewParamsEventCommentReceived WebhookNewParamsEvent = "comment.received" WebhookNewParamsEventMessageReceived WebhookNewParamsEvent = "message.received" )
func (WebhookNewParamsEvent) IsKnown ¶
func (r WebhookNewParamsEvent) IsKnown() bool
type WebhookNewResponse ¶
type WebhookNewResponse struct {
// Webhook ID
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether the webhook is active
Enabled bool `json:"enabled" api:"required"`
// Subscribed events
Events []string `json:"events" api:"required"`
// Webhook signing secret (shown only once)
Secret string `json:"secret" api:"required"`
// Endpoint URL
URL string `json:"url" api:"required" format:"uri"`
JSON webhookNewResponseJSON `json:"-"`
}
func (*WebhookNewResponse) UnmarshalJSON ¶
func (r *WebhookNewResponse) UnmarshalJSON(data []byte) (err error)
type WebhookSendTestParams ¶
type WebhookSendTestParams struct {
// ID of the webhook to test
WebhookID param.Field[string] `json:"webhook_id" api:"required"`
}
func (WebhookSendTestParams) MarshalJSON ¶
func (r WebhookSendTestParams) MarshalJSON() (data []byte, err error)
type WebhookSendTestResponse ¶
type WebhookSendTestResponse struct {
// Response time in milliseconds
ResponseTimeMs int64 `json:"response_time_ms" api:"required,nullable"`
// HTTP status code from the test delivery
StatusCode int64 `json:"status_code" api:"required,nullable"`
// Whether the test delivery succeeded
Success bool `json:"success" api:"required"`
JSON webhookSendTestResponseJSON `json:"-"`
}
func (*WebhookSendTestResponse) UnmarshalJSON ¶
func (r *WebhookSendTestResponse) UnmarshalJSON(data []byte) (err error)
type WebhookService ¶
type WebhookService struct {
Options []option.RequestOption
}
WebhookService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.
func NewWebhookService ¶
func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)
NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookService) Delete ¶
func (r *WebhookService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete a webhook endpoint
func (*WebhookService) List ¶
func (r *WebhookService) List(ctx context.Context, query WebhookListParams, opts ...option.RequestOption) (res *WebhookListResponse, err error)
List webhook endpoints
func (*WebhookService) ListLogs ¶
func (r *WebhookService) ListLogs(ctx context.Context, query WebhookListLogsParams, opts ...option.RequestOption) (res *WebhookListLogsResponse, err error)
Returns delivery logs from the last 7 days.
func (*WebhookService) New ¶
func (r *WebhookService) New(ctx context.Context, body WebhookNewParams, opts ...option.RequestOption) (res *WebhookNewResponse, err error)
Create a new webhook endpoint. The signing secret is returned only once in the response.
func (*WebhookService) SendTest ¶
func (r *WebhookService) SendTest(ctx context.Context, body WebhookSendTestParams, opts ...option.RequestOption) (res *WebhookSendTestResponse, err error)
Send a test POST request to the webhook URL to verify it is reachable.
func (*WebhookService) Update ¶
func (r *WebhookService) Update(ctx context.Context, id string, body WebhookUpdateParams, opts ...option.RequestOption) (res *WebhookUpdateResponse, err error)
Update a webhook endpoint
type WebhookUpdateParams ¶
type WebhookUpdateParams struct {
// Enable or disable the webhook
Enabled param.Field[bool] `json:"enabled"`
// Updated events
Events param.Field[[]WebhookUpdateParamsEvent] `json:"events"`
// Updated endpoint URL
URL param.Field[string] `json:"url" format:"uri"`
}
func (WebhookUpdateParams) MarshalJSON ¶
func (r WebhookUpdateParams) MarshalJSON() (data []byte, err error)
type WebhookUpdateParamsEvent ¶
type WebhookUpdateParamsEvent string
const ( WebhookUpdateParamsEventPostPublished WebhookUpdateParamsEvent = "post.published" WebhookUpdateParamsEventPostPartial WebhookUpdateParamsEvent = "post.partial" WebhookUpdateParamsEventPostFailed WebhookUpdateParamsEvent = "post.failed" WebhookUpdateParamsEventPostScheduled WebhookUpdateParamsEvent = "post.scheduled" WebhookUpdateParamsEventAccountConnected WebhookUpdateParamsEvent = "account.connected" WebhookUpdateParamsEventAccountDisconnected WebhookUpdateParamsEvent = "account.disconnected" WebhookUpdateParamsEventCommentReceived WebhookUpdateParamsEvent = "comment.received" WebhookUpdateParamsEventMessageReceived WebhookUpdateParamsEvent = "message.received" )
func (WebhookUpdateParamsEvent) IsKnown ¶
func (r WebhookUpdateParamsEvent) IsKnown() bool
type WebhookUpdateResponse ¶
type WebhookUpdateResponse struct {
// Webhook ID
ID string `json:"id" api:"required"`
// Creation timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether the webhook is active
Enabled bool `json:"enabled" api:"required"`
// Subscribed events
Events []string `json:"events" api:"required"`
// Last update timestamp
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Endpoint URL
URL string `json:"url" api:"required" format:"uri"`
JSON webhookUpdateResponseJSON `json:"-"`
}
func (*WebhookUpdateResponse) UnmarshalJSON ¶
func (r *WebhookUpdateResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastGetResponse ¶
type WhatsappBroadcastGetResponse struct {
// Broadcast ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Broadcast name
Name string `json:"name" api:"required"`
// Total recipients
RecipientCount float64 `json:"recipient_count" api:"required"`
// Broadcast status
Status WhatsappBroadcastGetResponseStatus `json:"status" api:"required"`
// Template name
Template string `json:"template" api:"required"`
// Failed sends
Failed float64 `json:"failed"`
// Scheduled time
ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
// Successfully sent
Sent float64 `json:"sent"`
JSON whatsappBroadcastGetResponseJSON `json:"-"`
}
func (*WhatsappBroadcastGetResponse) UnmarshalJSON ¶
func (r *WhatsappBroadcastGetResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastGetResponseStatus ¶
type WhatsappBroadcastGetResponseStatus string
Broadcast status
const ( WhatsappBroadcastGetResponseStatusDraft WhatsappBroadcastGetResponseStatus = "draft" WhatsappBroadcastGetResponseStatusScheduled WhatsappBroadcastGetResponseStatus = "scheduled" WhatsappBroadcastGetResponseStatusSending WhatsappBroadcastGetResponseStatus = "sending" WhatsappBroadcastGetResponseStatusSent WhatsappBroadcastGetResponseStatus = "sent" WhatsappBroadcastGetResponseStatusFailed WhatsappBroadcastGetResponseStatus = "failed" )
func (WhatsappBroadcastGetResponseStatus) IsKnown ¶
func (r WhatsappBroadcastGetResponseStatus) IsKnown() bool
type WhatsappBroadcastListParams ¶
type WhatsappBroadcastListParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappBroadcastListParams) URLQuery ¶
func (r WhatsappBroadcastListParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappBroadcastListParams's query parameters as `url.Values`.
type WhatsappBroadcastListResponse ¶
type WhatsappBroadcastListResponse struct {
Data []WhatsappBroadcastListResponseData `json:"data" api:"required"`
JSON whatsappBroadcastListResponseJSON `json:"-"`
}
func (*WhatsappBroadcastListResponse) UnmarshalJSON ¶
func (r *WhatsappBroadcastListResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastListResponseData ¶
type WhatsappBroadcastListResponseData struct {
// Broadcast ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Broadcast name
Name string `json:"name" api:"required"`
// Total recipients
RecipientCount float64 `json:"recipient_count" api:"required"`
// Broadcast status
Status WhatsappBroadcastListResponseDataStatus `json:"status" api:"required"`
// Template name
Template string `json:"template" api:"required"`
// Failed sends
Failed float64 `json:"failed"`
// Scheduled time
ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
// Successfully sent
Sent float64 `json:"sent"`
JSON whatsappBroadcastListResponseDataJSON `json:"-"`
}
func (*WhatsappBroadcastListResponseData) UnmarshalJSON ¶
func (r *WhatsappBroadcastListResponseData) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastListResponseDataStatus ¶
type WhatsappBroadcastListResponseDataStatus string
Broadcast status
const ( WhatsappBroadcastListResponseDataStatusDraft WhatsappBroadcastListResponseDataStatus = "draft" WhatsappBroadcastListResponseDataStatusScheduled WhatsappBroadcastListResponseDataStatus = "scheduled" WhatsappBroadcastListResponseDataStatusSending WhatsappBroadcastListResponseDataStatus = "sending" WhatsappBroadcastListResponseDataStatusSent WhatsappBroadcastListResponseDataStatus = "sent" WhatsappBroadcastListResponseDataStatusFailed WhatsappBroadcastListResponseDataStatus = "failed" )
func (WhatsappBroadcastListResponseDataStatus) IsKnown ¶
func (r WhatsappBroadcastListResponseDataStatus) IsKnown() bool
type WhatsappBroadcastNewParams ¶
type WhatsappBroadcastNewParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Broadcast name
Name param.Field[string] `json:"name" api:"required"`
// Recipient list
Recipients param.Field[[]WhatsappBroadcastNewParamsRecipient] `json:"recipients" api:"required"`
Template param.Field[WhatsappBroadcastNewParamsTemplate] `json:"template" api:"required"`
// ISO 8601 timestamp to schedule send
ScheduledAt param.Field[string] `json:"scheduled_at"`
}
func (WhatsappBroadcastNewParams) MarshalJSON ¶
func (r WhatsappBroadcastNewParams) MarshalJSON() (data []byte, err error)
type WhatsappBroadcastNewParamsRecipient ¶
type WhatsappBroadcastNewParamsRecipient struct {
// Phone number in E.164 format
Phone param.Field[string] `json:"phone" api:"required"`
// Template variable substitutions
Variables param.Field[map[string]string] `json:"variables"`
}
func (WhatsappBroadcastNewParamsRecipient) MarshalJSON ¶
func (r WhatsappBroadcastNewParamsRecipient) MarshalJSON() (data []byte, err error)
type WhatsappBroadcastNewParamsTemplate ¶
type WhatsappBroadcastNewParamsTemplate struct {
// Template language code
Language param.Field[string] `json:"language" api:"required"`
// Template name
Name param.Field[string] `json:"name" api:"required"`
Components param.Field[[]WhatsappBroadcastNewParamsTemplateComponent] `json:"components"`
}
func (WhatsappBroadcastNewParamsTemplate) MarshalJSON ¶
func (r WhatsappBroadcastNewParamsTemplate) MarshalJSON() (data []byte, err error)
type WhatsappBroadcastNewParamsTemplateComponent ¶
type WhatsappBroadcastNewParamsTemplateComponent struct {
// Component type
Type param.Field[WhatsappBroadcastNewParamsTemplateComponentsType] `json:"type" api:"required"`
// Component parameters
Parameters param.Field[[]map[string]interface{}] `json:"parameters"`
}
func (WhatsappBroadcastNewParamsTemplateComponent) MarshalJSON ¶
func (r WhatsappBroadcastNewParamsTemplateComponent) MarshalJSON() (data []byte, err error)
type WhatsappBroadcastNewParamsTemplateComponentsType ¶
type WhatsappBroadcastNewParamsTemplateComponentsType string
Component type
const ( WhatsappBroadcastNewParamsTemplateComponentsTypeHeader WhatsappBroadcastNewParamsTemplateComponentsType = "header" WhatsappBroadcastNewParamsTemplateComponentsTypeBody WhatsappBroadcastNewParamsTemplateComponentsType = "body" WhatsappBroadcastNewParamsTemplateComponentsTypeButton WhatsappBroadcastNewParamsTemplateComponentsType = "button" )
func (WhatsappBroadcastNewParamsTemplateComponentsType) IsKnown ¶
func (r WhatsappBroadcastNewParamsTemplateComponentsType) IsKnown() bool
type WhatsappBroadcastNewResponse ¶
type WhatsappBroadcastNewResponse struct {
// Broadcast ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Broadcast name
Name string `json:"name" api:"required"`
// Total recipients
RecipientCount float64 `json:"recipient_count" api:"required"`
// Broadcast status
Status WhatsappBroadcastNewResponseStatus `json:"status" api:"required"`
// Template name
Template string `json:"template" api:"required"`
// Failed sends
Failed float64 `json:"failed"`
// Scheduled time
ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
// Successfully sent
Sent float64 `json:"sent"`
JSON whatsappBroadcastNewResponseJSON `json:"-"`
}
func (*WhatsappBroadcastNewResponse) UnmarshalJSON ¶
func (r *WhatsappBroadcastNewResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastNewResponseStatus ¶
type WhatsappBroadcastNewResponseStatus string
Broadcast status
const ( WhatsappBroadcastNewResponseStatusDraft WhatsappBroadcastNewResponseStatus = "draft" WhatsappBroadcastNewResponseStatusScheduled WhatsappBroadcastNewResponseStatus = "scheduled" WhatsappBroadcastNewResponseStatusSending WhatsappBroadcastNewResponseStatus = "sending" WhatsappBroadcastNewResponseStatusSent WhatsappBroadcastNewResponseStatus = "sent" WhatsappBroadcastNewResponseStatusFailed WhatsappBroadcastNewResponseStatus = "failed" )
func (WhatsappBroadcastNewResponseStatus) IsKnown ¶
func (r WhatsappBroadcastNewResponseStatus) IsKnown() bool
type WhatsappBroadcastScheduleResponse ¶
type WhatsappBroadcastScheduleResponse struct {
// Broadcast ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Broadcast name
Name string `json:"name" api:"required"`
// Total recipients
RecipientCount float64 `json:"recipient_count" api:"required"`
// Broadcast status
Status WhatsappBroadcastScheduleResponseStatus `json:"status" api:"required"`
// Template name
Template string `json:"template" api:"required"`
// Failed sends
Failed float64 `json:"failed"`
// Scheduled time
ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
// Successfully sent
Sent float64 `json:"sent"`
JSON whatsappBroadcastScheduleResponseJSON `json:"-"`
}
func (*WhatsappBroadcastScheduleResponse) UnmarshalJSON ¶
func (r *WhatsappBroadcastScheduleResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastScheduleResponseStatus ¶
type WhatsappBroadcastScheduleResponseStatus string
Broadcast status
const ( WhatsappBroadcastScheduleResponseStatusDraft WhatsappBroadcastScheduleResponseStatus = "draft" WhatsappBroadcastScheduleResponseStatusScheduled WhatsappBroadcastScheduleResponseStatus = "scheduled" WhatsappBroadcastScheduleResponseStatusSending WhatsappBroadcastScheduleResponseStatus = "sending" WhatsappBroadcastScheduleResponseStatusSent WhatsappBroadcastScheduleResponseStatus = "sent" WhatsappBroadcastScheduleResponseStatusFailed WhatsappBroadcastScheduleResponseStatus = "failed" )
func (WhatsappBroadcastScheduleResponseStatus) IsKnown ¶
func (r WhatsappBroadcastScheduleResponseStatus) IsKnown() bool
type WhatsappBroadcastSendResponse ¶
type WhatsappBroadcastSendResponse struct {
// Broadcast ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Broadcast name
Name string `json:"name" api:"required"`
// Total recipients
RecipientCount float64 `json:"recipient_count" api:"required"`
// Broadcast status
Status WhatsappBroadcastSendResponseStatus `json:"status" api:"required"`
// Template name
Template string `json:"template" api:"required"`
// Failed sends
Failed float64 `json:"failed"`
// Scheduled time
ScheduledAt time.Time `json:"scheduled_at" api:"nullable" format:"date-time"`
// Successfully sent
Sent float64 `json:"sent"`
JSON whatsappBroadcastSendResponseJSON `json:"-"`
}
func (*WhatsappBroadcastSendResponse) UnmarshalJSON ¶
func (r *WhatsappBroadcastSendResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBroadcastSendResponseStatus ¶
type WhatsappBroadcastSendResponseStatus string
Broadcast status
const ( WhatsappBroadcastSendResponseStatusDraft WhatsappBroadcastSendResponseStatus = "draft" WhatsappBroadcastSendResponseStatusScheduled WhatsappBroadcastSendResponseStatus = "scheduled" WhatsappBroadcastSendResponseStatusSending WhatsappBroadcastSendResponseStatus = "sending" WhatsappBroadcastSendResponseStatusSent WhatsappBroadcastSendResponseStatus = "sent" WhatsappBroadcastSendResponseStatusFailed WhatsappBroadcastSendResponseStatus = "failed" )
func (WhatsappBroadcastSendResponseStatus) IsKnown ¶
func (r WhatsappBroadcastSendResponseStatus) IsKnown() bool
type WhatsappBroadcastService ¶
type WhatsappBroadcastService struct {
Options []option.RequestOption
}
WhatsappBroadcastService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappBroadcastService method instead.
func NewWhatsappBroadcastService ¶
func NewWhatsappBroadcastService(opts ...option.RequestOption) (r *WhatsappBroadcastService)
NewWhatsappBroadcastService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappBroadcastService) Delete ¶
func (r *WhatsappBroadcastService) Delete(ctx context.Context, broadcastID string, opts ...option.RequestOption) (err error)
Delete a broadcast
func (*WhatsappBroadcastService) Get ¶
func (r *WhatsappBroadcastService) Get(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastGetResponse, err error)
Get broadcast details
func (*WhatsappBroadcastService) List ¶
func (r *WhatsappBroadcastService) List(ctx context.Context, query WhatsappBroadcastListParams, opts ...option.RequestOption) (res *WhatsappBroadcastListResponse, err error)
List broadcasts
func (*WhatsappBroadcastService) New ¶
func (r *WhatsappBroadcastService) New(ctx context.Context, body WhatsappBroadcastNewParams, opts ...option.RequestOption) (res *WhatsappBroadcastNewResponse, err error)
Create a broadcast
func (*WhatsappBroadcastService) Schedule ¶
func (r *WhatsappBroadcastService) Schedule(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastScheduleResponse, err error)
Schedule a broadcast
func (*WhatsappBroadcastService) Send ¶
func (r *WhatsappBroadcastService) Send(ctx context.Context, broadcastID string, opts ...option.RequestOption) (res *WhatsappBroadcastSendResponse, err error)
Send a broadcast immediately
type WhatsappBulkSendParams ¶
type WhatsappBulkSendParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Recipients
Recipients param.Field[[]WhatsappBulkSendParamsRecipient] `json:"recipients" api:"required"`
Template param.Field[WhatsappBulkSendParamsTemplate] `json:"template" api:"required"`
}
func (WhatsappBulkSendParams) MarshalJSON ¶
func (r WhatsappBulkSendParams) MarshalJSON() (data []byte, err error)
type WhatsappBulkSendParamsRecipient ¶
type WhatsappBulkSendParamsRecipient struct {
// Phone number in E.164 format
Phone param.Field[string] `json:"phone" api:"required"`
// Template variable substitutions
Variables param.Field[map[string]string] `json:"variables"`
}
func (WhatsappBulkSendParamsRecipient) MarshalJSON ¶
func (r WhatsappBulkSendParamsRecipient) MarshalJSON() (data []byte, err error)
type WhatsappBulkSendParamsTemplate ¶
type WhatsappBulkSendParamsTemplate struct {
// Template language code
Language param.Field[string] `json:"language" api:"required"`
// Template name
Name param.Field[string] `json:"name" api:"required"`
// Template components
Components param.Field[[]WhatsappBulkSendParamsTemplateComponent] `json:"components"`
}
func (WhatsappBulkSendParamsTemplate) MarshalJSON ¶
func (r WhatsappBulkSendParamsTemplate) MarshalJSON() (data []byte, err error)
type WhatsappBulkSendParamsTemplateComponent ¶
type WhatsappBulkSendParamsTemplateComponent struct {
// Component type
Type param.Field[WhatsappBulkSendParamsTemplateComponentsType] `json:"type" api:"required"`
// Component parameters
Parameters param.Field[[]map[string]interface{}] `json:"parameters"`
}
func (WhatsappBulkSendParamsTemplateComponent) MarshalJSON ¶
func (r WhatsappBulkSendParamsTemplateComponent) MarshalJSON() (data []byte, err error)
type WhatsappBulkSendParamsTemplateComponentsType ¶
type WhatsappBulkSendParamsTemplateComponentsType string
Component type
const ( WhatsappBulkSendParamsTemplateComponentsTypeHeader WhatsappBulkSendParamsTemplateComponentsType = "header" WhatsappBulkSendParamsTemplateComponentsTypeBody WhatsappBulkSendParamsTemplateComponentsType = "body" WhatsappBulkSendParamsTemplateComponentsTypeButton WhatsappBulkSendParamsTemplateComponentsType = "button" )
func (WhatsappBulkSendParamsTemplateComponentsType) IsKnown ¶
func (r WhatsappBulkSendParamsTemplateComponentsType) IsKnown() bool
type WhatsappBulkSendResponse ¶
type WhatsappBulkSendResponse struct {
Results []WhatsappBulkSendResponseResult `json:"results" api:"required"`
Summary WhatsappBulkSendResponseSummary `json:"summary" api:"required"`
JSON whatsappBulkSendResponseJSON `json:"-"`
}
func (*WhatsappBulkSendResponse) UnmarshalJSON ¶
func (r *WhatsappBulkSendResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBulkSendResponseResult ¶
type WhatsappBulkSendResponseResult struct {
// Recipient phone number
Phone string `json:"phone" api:"required"`
// Send status
Status WhatsappBulkSendResponseResultsStatus `json:"status" api:"required"`
// Error message if failed
Error string `json:"error" api:"nullable"`
JSON whatsappBulkSendResponseResultJSON `json:"-"`
}
func (*WhatsappBulkSendResponseResult) UnmarshalJSON ¶
func (r *WhatsappBulkSendResponseResult) UnmarshalJSON(data []byte) (err error)
type WhatsappBulkSendResponseResultsStatus ¶
type WhatsappBulkSendResponseResultsStatus string
Send status
const ( WhatsappBulkSendResponseResultsStatusSent WhatsappBulkSendResponseResultsStatus = "sent" WhatsappBulkSendResponseResultsStatusFailed WhatsappBulkSendResponseResultsStatus = "failed" )
func (WhatsappBulkSendResponseResultsStatus) IsKnown ¶
func (r WhatsappBulkSendResponseResultsStatus) IsKnown() bool
type WhatsappBulkSendResponseSummary ¶
type WhatsappBulkSendResponseSummary struct {
// Failed count
Failed float64 `json:"failed" api:"required"`
// Successfully sent count
Sent float64 `json:"sent" api:"required"`
JSON whatsappBulkSendResponseSummaryJSON `json:"-"`
}
func (*WhatsappBulkSendResponseSummary) UnmarshalJSON ¶
func (r *WhatsappBulkSendResponseSummary) UnmarshalJSON(data []byte) (err error)
type WhatsappBusinessProfileGetParams ¶
type WhatsappBusinessProfileGetParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappBusinessProfileGetParams) URLQuery ¶
func (r WhatsappBusinessProfileGetParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappBusinessProfileGetParams's query parameters as `url.Values`.
type WhatsappBusinessProfileGetResponse ¶
type WhatsappBusinessProfileGetResponse struct {
// About text
About string `json:"about" api:"nullable"`
// Business address
Address string `json:"address" api:"nullable"`
// Description
Description string `json:"description" api:"nullable"`
// Business email
Email string `json:"email" api:"nullable"`
// Profile picture URL
ProfilePictureURL string `json:"profile_picture_url" api:"nullable"`
// Website URLs
Websites []string `json:"websites"`
JSON whatsappBusinessProfileGetResponseJSON `json:"-"`
}
func (*WhatsappBusinessProfileGetResponse) UnmarshalJSON ¶
func (r *WhatsappBusinessProfileGetResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappBusinessProfileService ¶
type WhatsappBusinessProfileService struct {
Options []option.RequestOption
}
WhatsappBusinessProfileService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappBusinessProfileService method instead.
func NewWhatsappBusinessProfileService ¶
func NewWhatsappBusinessProfileService(opts ...option.RequestOption) (r *WhatsappBusinessProfileService)
NewWhatsappBusinessProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappBusinessProfileService) Get ¶
func (r *WhatsappBusinessProfileService) Get(ctx context.Context, query WhatsappBusinessProfileGetParams, opts ...option.RequestOption) (res *WhatsappBusinessProfileGetResponse, err error)
Get WhatsApp Business profile
func (*WhatsappBusinessProfileService) Update ¶
func (r *WhatsappBusinessProfileService) Update(ctx context.Context, body WhatsappBusinessProfileUpdateParams, opts ...option.RequestOption) (res *WhatsappBusinessProfileUpdateResponse, err error)
Update WhatsApp Business profile
type WhatsappBusinessProfileUpdateParams ¶
type WhatsappBusinessProfileUpdateParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
About param.Field[string] `json:"about"`
Address param.Field[string] `json:"address"`
Description param.Field[string] `json:"description"`
Email param.Field[string] `json:"email"`
Websites param.Field[[]string] `json:"websites"`
}
func (WhatsappBusinessProfileUpdateParams) MarshalJSON ¶
func (r WhatsappBusinessProfileUpdateParams) MarshalJSON() (data []byte, err error)
type WhatsappBusinessProfileUpdateResponse ¶
type WhatsappBusinessProfileUpdateResponse struct {
// About text
About string `json:"about" api:"nullable"`
// Business address
Address string `json:"address" api:"nullable"`
// Description
Description string `json:"description" api:"nullable"`
// Business email
Email string `json:"email" api:"nullable"`
// Profile picture URL
ProfilePictureURL string `json:"profile_picture_url" api:"nullable"`
// Website URLs
Websites []string `json:"websites"`
JSON whatsappBusinessProfileUpdateResponseJSON `json:"-"`
}
func (*WhatsappBusinessProfileUpdateResponse) UnmarshalJSON ¶
func (r *WhatsappBusinessProfileUpdateResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactBulkOperationsParams ¶
type WhatsappContactBulkOperationsParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Action
Action param.Field[WhatsappContactBulkOperationsParamsAction] `json:"action" api:"required"`
// Contact IDs
ContactIDs param.Field[[]string] `json:"contact_ids" api:"required"`
// Tags (for tag actions)
Tags param.Field[[]string] `json:"tags"`
}
func (WhatsappContactBulkOperationsParams) MarshalJSON ¶
func (r WhatsappContactBulkOperationsParams) MarshalJSON() (data []byte, err error)
type WhatsappContactBulkOperationsParamsAction ¶
type WhatsappContactBulkOperationsParamsAction string
Action
const ( WhatsappContactBulkOperationsParamsActionAddTags WhatsappContactBulkOperationsParamsAction = "add_tags" WhatsappContactBulkOperationsParamsActionRemoveTags WhatsappContactBulkOperationsParamsAction = "remove_tags" WhatsappContactBulkOperationsParamsActionDelete WhatsappContactBulkOperationsParamsAction = "delete" )
func (WhatsappContactBulkOperationsParamsAction) IsKnown ¶
func (r WhatsappContactBulkOperationsParamsAction) IsKnown() bool
type WhatsappContactBulkOperationsResponse ¶
type WhatsappContactBulkOperationsResponse struct {
// Number of contacts affected
Affected float64 `json:"affected" api:"required"`
JSON whatsappContactBulkOperationsResponseJSON `json:"-"`
}
func (*WhatsappContactBulkOperationsResponse) UnmarshalJSON ¶
func (r *WhatsappContactBulkOperationsResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactGetResponse ¶
type WhatsappContactGetResponse struct {
// Contact ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether contact has opted in
OptedIn bool `json:"opted_in" api:"required"`
// Phone number
Phone string `json:"phone" api:"required"`
// Email address
Email string `json:"email" api:"nullable"`
// Group IDs
Groups []string `json:"groups"`
// Contact name
Name string `json:"name" api:"nullable"`
// Tags
Tags []string `json:"tags"`
JSON whatsappContactGetResponseJSON `json:"-"`
}
func (*WhatsappContactGetResponse) UnmarshalJSON ¶
func (r *WhatsappContactGetResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactImportParams ¶
type WhatsappContactImportParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Contacts to import
Contacts param.Field[[]WhatsappContactImportParamsContact] `json:"contacts" api:"required"`
}
func (WhatsappContactImportParams) MarshalJSON ¶
func (r WhatsappContactImportParams) MarshalJSON() (data []byte, err error)
type WhatsappContactImportParamsContact ¶
type WhatsappContactImportParamsContact struct {
// Phone number
Phone param.Field[string] `json:"phone" api:"required"`
Email param.Field[string] `json:"email"`
Name param.Field[string] `json:"name"`
Tags param.Field[[]string] `json:"tags"`
}
func (WhatsappContactImportParamsContact) MarshalJSON ¶
func (r WhatsappContactImportParamsContact) MarshalJSON() (data []byte, err error)
type WhatsappContactImportResponse ¶
type WhatsappContactImportResponse struct {
// Failed count
Failed float64 `json:"failed" api:"required"`
// Successfully imported count
Imported float64 `json:"imported" api:"required"`
// Skipped (duplicate) count
Skipped float64 `json:"skipped" api:"required"`
JSON whatsappContactImportResponseJSON `json:"-"`
}
func (*WhatsappContactImportResponse) UnmarshalJSON ¶
func (r *WhatsappContactImportResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactListParams ¶
type WhatsappContactListParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
// Pagination cursor
Cursor param.Field[string] `query:"cursor"`
// Number of items
Limit param.Field[int64] `query:"limit"`
// Search by name or phone
Search param.Field[string] `query:"search"`
// Filter by tag
Tag param.Field[string] `query:"tag"`
}
func (WhatsappContactListParams) URLQuery ¶
func (r WhatsappContactListParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappContactListParams's query parameters as `url.Values`.
type WhatsappContactListResponse ¶
type WhatsappContactListResponse struct {
Data []WhatsappContactListResponseData `json:"data" api:"required"`
// Whether more items exist
HasMore bool `json:"has_more" api:"required"`
// Cursor for next page
NextCursor string `json:"next_cursor" api:"required,nullable"`
JSON whatsappContactListResponseJSON `json:"-"`
}
func (*WhatsappContactListResponse) UnmarshalJSON ¶
func (r *WhatsappContactListResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactListResponseData ¶
type WhatsappContactListResponseData struct {
// Contact ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether contact has opted in
OptedIn bool `json:"opted_in" api:"required"`
// Phone number
Phone string `json:"phone" api:"required"`
// Email address
Email string `json:"email" api:"nullable"`
// Group IDs
Groups []string `json:"groups"`
// Contact name
Name string `json:"name" api:"nullable"`
// Tags
Tags []string `json:"tags"`
JSON whatsappContactListResponseDataJSON `json:"-"`
}
func (*WhatsappContactListResponseData) UnmarshalJSON ¶
func (r *WhatsappContactListResponseData) UnmarshalJSON(data []byte) (err error)
type WhatsappContactNewParams ¶
type WhatsappContactNewParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Phone number in E.164 format
Phone param.Field[string] `json:"phone" api:"required"`
// Email address
Email param.Field[string] `json:"email"`
// Contact name
Name param.Field[string] `json:"name"`
// Tags
Tags param.Field[[]string] `json:"tags"`
}
func (WhatsappContactNewParams) MarshalJSON ¶
func (r WhatsappContactNewParams) MarshalJSON() (data []byte, err error)
type WhatsappContactNewResponse ¶
type WhatsappContactNewResponse struct {
// Contact ID
ID string `json:"id" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether contact has opted in
OptedIn bool `json:"opted_in" api:"required"`
// Phone number
Phone string `json:"phone" api:"required"`
// Email address
Email string `json:"email" api:"nullable"`
// Group IDs
Groups []string `json:"groups"`
// Contact name
Name string `json:"name" api:"nullable"`
// Tags
Tags []string `json:"tags"`
JSON whatsappContactNewResponseJSON `json:"-"`
}
func (*WhatsappContactNewResponse) UnmarshalJSON ¶
func (r *WhatsappContactNewResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappContactService ¶
type WhatsappContactService struct {
Options []option.RequestOption
}
WhatsappContactService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappContactService method instead.
func NewWhatsappContactService ¶
func NewWhatsappContactService(opts ...option.RequestOption) (r *WhatsappContactService)
NewWhatsappContactService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappContactService) BulkOperations ¶
func (r *WhatsappContactService) BulkOperations(ctx context.Context, body WhatsappContactBulkOperationsParams, opts ...option.RequestOption) (res *WhatsappContactBulkOperationsResponse, err error)
Bulk contact operations (add/remove tags, delete)
func (*WhatsappContactService) Delete ¶
func (r *WhatsappContactService) Delete(ctx context.Context, contactID string, opts ...option.RequestOption) (err error)
Delete a contact
func (*WhatsappContactService) Get ¶
func (r *WhatsappContactService) Get(ctx context.Context, contactID string, opts ...option.RequestOption) (res *WhatsappContactGetResponse, err error)
Get contact details
func (*WhatsappContactService) Import ¶
func (r *WhatsappContactService) Import(ctx context.Context, body WhatsappContactImportParams, opts ...option.RequestOption) (res *WhatsappContactImportResponse, err error)
Bulk import contacts
func (*WhatsappContactService) List ¶
func (r *WhatsappContactService) List(ctx context.Context, query WhatsappContactListParams, opts ...option.RequestOption) (res *WhatsappContactListResponse, err error)
List contacts
func (*WhatsappContactService) New ¶
func (r *WhatsappContactService) New(ctx context.Context, body WhatsappContactNewParams, opts ...option.RequestOption) (res *WhatsappContactNewResponse, err error)
Create a contact
type WhatsappGroupListParams ¶
type WhatsappGroupListParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappGroupListParams) URLQuery ¶
func (r WhatsappGroupListParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappGroupListParams's query parameters as `url.Values`.
type WhatsappGroupListResponse ¶
type WhatsappGroupListResponse struct {
Data []WhatsappGroupListResponseData `json:"data" api:"required"`
JSON whatsappGroupListResponseJSON `json:"-"`
}
func (*WhatsappGroupListResponse) UnmarshalJSON ¶
func (r *WhatsappGroupListResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappGroupListResponseData ¶
type WhatsappGroupListResponseData struct {
// Group ID
ID string `json:"id" api:"required"`
// Number of contacts
ContactCount float64 `json:"contact_count" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Group name
Name string `json:"name" api:"required"`
Description string `json:"description" api:"nullable"`
JSON whatsappGroupListResponseDataJSON `json:"-"`
}
func (*WhatsappGroupListResponseData) UnmarshalJSON ¶
func (r *WhatsappGroupListResponseData) UnmarshalJSON(data []byte) (err error)
type WhatsappGroupNewParams ¶
type WhatsappGroupNewParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Group name
Name param.Field[string] `json:"name" api:"required"`
// Initial contact IDs
ContactIDs param.Field[[]string] `json:"contact_ids"`
// Group description
Description param.Field[string] `json:"description"`
}
func (WhatsappGroupNewParams) MarshalJSON ¶
func (r WhatsappGroupNewParams) MarshalJSON() (data []byte, err error)
type WhatsappGroupNewResponse ¶
type WhatsappGroupNewResponse struct {
// Group ID
ID string `json:"id" api:"required"`
// Number of contacts
ContactCount float64 `json:"contact_count" api:"required"`
// Created timestamp
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Group name
Name string `json:"name" api:"required"`
Description string `json:"description" api:"nullable"`
JSON whatsappGroupNewResponseJSON `json:"-"`
}
func (*WhatsappGroupNewResponse) UnmarshalJSON ¶
func (r *WhatsappGroupNewResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappGroupService ¶
type WhatsappGroupService struct {
Options []option.RequestOption
}
WhatsappGroupService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappGroupService method instead.
func NewWhatsappGroupService ¶
func NewWhatsappGroupService(opts ...option.RequestOption) (r *WhatsappGroupService)
NewWhatsappGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappGroupService) Delete ¶
func (r *WhatsappGroupService) Delete(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
Delete a contact group
func (*WhatsappGroupService) List ¶
func (r *WhatsappGroupService) List(ctx context.Context, query WhatsappGroupListParams, opts ...option.RequestOption) (res *WhatsappGroupListResponse, err error)
List contact groups
func (*WhatsappGroupService) New ¶
func (r *WhatsappGroupService) New(ctx context.Context, body WhatsappGroupNewParams, opts ...option.RequestOption) (res *WhatsappGroupNewResponse, err error)
Create a contact group
type WhatsappListPhoneNumbersParams ¶
type WhatsappListPhoneNumbersParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappListPhoneNumbersParams) URLQuery ¶
func (r WhatsappListPhoneNumbersParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappListPhoneNumbersParams's query parameters as `url.Values`.
type WhatsappListPhoneNumbersResponse ¶
type WhatsappListPhoneNumbersResponse struct {
Data []WhatsappListPhoneNumbersResponseData `json:"data" api:"required"`
JSON whatsappListPhoneNumbersResponseJSON `json:"-"`
}
func (*WhatsappListPhoneNumbersResponse) UnmarshalJSON ¶
func (r *WhatsappListPhoneNumbersResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappListPhoneNumbersResponseData ¶
type WhatsappListPhoneNumbersResponseData struct {
// Phone number ID
ID string `json:"id" api:"required"`
// Phone number
PhoneNumber string `json:"phone_number" api:"required"`
// Registration status
Status WhatsappListPhoneNumbersResponseDataStatus `json:"status" api:"required"`
// Display name
DisplayName string `json:"display_name" api:"nullable"`
JSON whatsappListPhoneNumbersResponseDataJSON `json:"-"`
}
func (*WhatsappListPhoneNumbersResponseData) UnmarshalJSON ¶
func (r *WhatsappListPhoneNumbersResponseData) UnmarshalJSON(data []byte) (err error)
type WhatsappListPhoneNumbersResponseDataStatus ¶
type WhatsappListPhoneNumbersResponseDataStatus string
Registration status
const ( WhatsappListPhoneNumbersResponseDataStatusActive WhatsappListPhoneNumbersResponseDataStatus = "active" WhatsappListPhoneNumbersResponseDataStatusInactive WhatsappListPhoneNumbersResponseDataStatus = "inactive" WhatsappListPhoneNumbersResponseDataStatusPending WhatsappListPhoneNumbersResponseDataStatus = "pending" )
func (WhatsappListPhoneNumbersResponseDataStatus) IsKnown ¶
func (r WhatsappListPhoneNumbersResponseDataStatus) IsKnown() bool
type WhatsappService ¶
type WhatsappService struct {
Options []option.RequestOption
Broadcasts *WhatsappBroadcastService
Templates *WhatsappTemplateService
Contacts *WhatsappContactService
Groups *WhatsappGroupService
BusinessProfile *WhatsappBusinessProfileService
}
WhatsappService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappService method instead.
func NewWhatsappService ¶
func NewWhatsappService(opts ...option.RequestOption) (r *WhatsappService)
NewWhatsappService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappService) BulkSend ¶
func (r *WhatsappService) BulkSend(ctx context.Context, body WhatsappBulkSendParams, opts ...option.RequestOption) (res *WhatsappBulkSendResponse, err error)
Send bulk WhatsApp messages via template
func (*WhatsappService) ListPhoneNumbers ¶
func (r *WhatsappService) ListPhoneNumbers(ctx context.Context, query WhatsappListPhoneNumbersParams, opts ...option.RequestOption) (res *WhatsappListPhoneNumbersResponse, err error)
List registered phone numbers
type WhatsappTemplateDeleteParams ¶
type WhatsappTemplateDeleteParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappTemplateDeleteParams) URLQuery ¶
func (r WhatsappTemplateDeleteParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappTemplateDeleteParams's query parameters as `url.Values`.
type WhatsappTemplateGetParams ¶
type WhatsappTemplateGetParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappTemplateGetParams) URLQuery ¶
func (r WhatsappTemplateGetParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappTemplateGetParams's query parameters as `url.Values`.
type WhatsappTemplateGetResponse ¶
type WhatsappTemplateGetResponse struct {
// Template category
Category WhatsappTemplateGetResponseCategory `json:"category" api:"required"`
Components []WhatsappTemplateGetResponseComponent `json:"components" api:"required"`
// Template language code
Language string `json:"language" api:"required"`
// Template name
Name string `json:"name" api:"required"`
// Approval status
Status WhatsappTemplateGetResponseStatus `json:"status" api:"required"`
JSON whatsappTemplateGetResponseJSON `json:"-"`
}
func (*WhatsappTemplateGetResponse) UnmarshalJSON ¶
func (r *WhatsappTemplateGetResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateGetResponseCategory ¶
type WhatsappTemplateGetResponseCategory string
Template category
const ( WhatsappTemplateGetResponseCategoryMarketing WhatsappTemplateGetResponseCategory = "MARKETING" WhatsappTemplateGetResponseCategoryUtility WhatsappTemplateGetResponseCategory = "UTILITY" WhatsappTemplateGetResponseCategoryAuthentication WhatsappTemplateGetResponseCategory = "AUTHENTICATION" )
func (WhatsappTemplateGetResponseCategory) IsKnown ¶
func (r WhatsappTemplateGetResponseCategory) IsKnown() bool
type WhatsappTemplateGetResponseComponent ¶
type WhatsappTemplateGetResponseComponent struct {
// Component type
Type WhatsappTemplateGetResponseComponentsType `json:"type" api:"required"`
Buttons []WhatsappTemplateGetResponseComponentsButton `json:"buttons"`
// Header format (TEXT, IMAGE, etc.)
Format string `json:"format"`
// Component text
Text string `json:"text"`
JSON whatsappTemplateGetResponseComponentJSON `json:"-"`
}
func (*WhatsappTemplateGetResponseComponent) UnmarshalJSON ¶
func (r *WhatsappTemplateGetResponseComponent) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateGetResponseComponentsButton ¶
type WhatsappTemplateGetResponseComponentsButton struct {
// Button text
Text string `json:"text" api:"required"`
// Button type
Type string `json:"type" api:"required"`
PhoneNumber string `json:"phone_number"`
URL string `json:"url"`
JSON whatsappTemplateGetResponseComponentsButtonJSON `json:"-"`
}
func (*WhatsappTemplateGetResponseComponentsButton) UnmarshalJSON ¶
func (r *WhatsappTemplateGetResponseComponentsButton) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateGetResponseComponentsType ¶
type WhatsappTemplateGetResponseComponentsType string
Component type
const ( WhatsappTemplateGetResponseComponentsTypeHeader WhatsappTemplateGetResponseComponentsType = "HEADER" WhatsappTemplateGetResponseComponentsTypeBody WhatsappTemplateGetResponseComponentsType = "BODY" WhatsappTemplateGetResponseComponentsTypeButtons WhatsappTemplateGetResponseComponentsType = "BUTTONS" )
func (WhatsappTemplateGetResponseComponentsType) IsKnown ¶
func (r WhatsappTemplateGetResponseComponentsType) IsKnown() bool
type WhatsappTemplateGetResponseStatus ¶
type WhatsappTemplateGetResponseStatus string
Approval status
const ( WhatsappTemplateGetResponseStatusApproved WhatsappTemplateGetResponseStatus = "APPROVED" WhatsappTemplateGetResponseStatusPending WhatsappTemplateGetResponseStatus = "PENDING" WhatsappTemplateGetResponseStatusRejected WhatsappTemplateGetResponseStatus = "REJECTED" )
func (WhatsappTemplateGetResponseStatus) IsKnown ¶
func (r WhatsappTemplateGetResponseStatus) IsKnown() bool
type WhatsappTemplateListParams ¶
type WhatsappTemplateListParams struct {
// WhatsApp account ID
AccountID param.Field[string] `query:"account_id" api:"required"`
}
func (WhatsappTemplateListParams) URLQuery ¶
func (r WhatsappTemplateListParams) URLQuery() (v url.Values)
URLQuery serializes WhatsappTemplateListParams's query parameters as `url.Values`.
type WhatsappTemplateListResponse ¶
type WhatsappTemplateListResponse struct {
Data []WhatsappTemplateListResponseData `json:"data" api:"required"`
JSON whatsappTemplateListResponseJSON `json:"-"`
}
func (*WhatsappTemplateListResponse) UnmarshalJSON ¶
func (r *WhatsappTemplateListResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateListResponseData ¶
type WhatsappTemplateListResponseData struct {
// Template category
Category WhatsappTemplateListResponseDataCategory `json:"category" api:"required"`
Components []WhatsappTemplateListResponseDataComponent `json:"components" api:"required"`
// Template language code
Language string `json:"language" api:"required"`
// Template name
Name string `json:"name" api:"required"`
// Approval status
Status WhatsappTemplateListResponseDataStatus `json:"status" api:"required"`
JSON whatsappTemplateListResponseDataJSON `json:"-"`
}
func (*WhatsappTemplateListResponseData) UnmarshalJSON ¶
func (r *WhatsappTemplateListResponseData) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateListResponseDataCategory ¶
type WhatsappTemplateListResponseDataCategory string
Template category
const ( WhatsappTemplateListResponseDataCategoryMarketing WhatsappTemplateListResponseDataCategory = "MARKETING" WhatsappTemplateListResponseDataCategoryUtility WhatsappTemplateListResponseDataCategory = "UTILITY" WhatsappTemplateListResponseDataCategoryAuthentication WhatsappTemplateListResponseDataCategory = "AUTHENTICATION" )
func (WhatsappTemplateListResponseDataCategory) IsKnown ¶
func (r WhatsappTemplateListResponseDataCategory) IsKnown() bool
type WhatsappTemplateListResponseDataComponent ¶
type WhatsappTemplateListResponseDataComponent struct {
// Component type
Type WhatsappTemplateListResponseDataComponentsType `json:"type" api:"required"`
Buttons []WhatsappTemplateListResponseDataComponentsButton `json:"buttons"`
// Header format (TEXT, IMAGE, etc.)
Format string `json:"format"`
// Component text
Text string `json:"text"`
JSON whatsappTemplateListResponseDataComponentJSON `json:"-"`
}
func (*WhatsappTemplateListResponseDataComponent) UnmarshalJSON ¶
func (r *WhatsappTemplateListResponseDataComponent) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateListResponseDataComponentsButton ¶
type WhatsappTemplateListResponseDataComponentsButton struct {
// Button text
Text string `json:"text" api:"required"`
// Button type
Type string `json:"type" api:"required"`
PhoneNumber string `json:"phone_number"`
URL string `json:"url"`
JSON whatsappTemplateListResponseDataComponentsButtonJSON `json:"-"`
}
func (*WhatsappTemplateListResponseDataComponentsButton) UnmarshalJSON ¶
func (r *WhatsappTemplateListResponseDataComponentsButton) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateListResponseDataComponentsType ¶
type WhatsappTemplateListResponseDataComponentsType string
Component type
const ( WhatsappTemplateListResponseDataComponentsTypeHeader WhatsappTemplateListResponseDataComponentsType = "HEADER" WhatsappTemplateListResponseDataComponentsTypeBody WhatsappTemplateListResponseDataComponentsType = "BODY" WhatsappTemplateListResponseDataComponentsTypeButtons WhatsappTemplateListResponseDataComponentsType = "BUTTONS" )
func (WhatsappTemplateListResponseDataComponentsType) IsKnown ¶
func (r WhatsappTemplateListResponseDataComponentsType) IsKnown() bool
type WhatsappTemplateListResponseDataStatus ¶
type WhatsappTemplateListResponseDataStatus string
Approval status
const ( WhatsappTemplateListResponseDataStatusApproved WhatsappTemplateListResponseDataStatus = "APPROVED" WhatsappTemplateListResponseDataStatusPending WhatsappTemplateListResponseDataStatus = "PENDING" WhatsappTemplateListResponseDataStatusRejected WhatsappTemplateListResponseDataStatus = "REJECTED" )
func (WhatsappTemplateListResponseDataStatus) IsKnown ¶
func (r WhatsappTemplateListResponseDataStatus) IsKnown() bool
type WhatsappTemplateNewParams ¶
type WhatsappTemplateNewParams struct {
// WhatsApp account ID
AccountID param.Field[string] `json:"account_id" api:"required"`
// Template category
Category param.Field[WhatsappTemplateNewParamsCategory] `json:"category" api:"required"`
// Template components
Components param.Field[[]WhatsappTemplateNewParamsComponent] `json:"components" api:"required"`
// Template language code
Language param.Field[string] `json:"language" api:"required"`
// Template name
Name param.Field[string] `json:"name" api:"required"`
}
func (WhatsappTemplateNewParams) MarshalJSON ¶
func (r WhatsappTemplateNewParams) MarshalJSON() (data []byte, err error)
type WhatsappTemplateNewParamsCategory ¶
type WhatsappTemplateNewParamsCategory string
Template category
const ( WhatsappTemplateNewParamsCategoryMarketing WhatsappTemplateNewParamsCategory = "MARKETING" WhatsappTemplateNewParamsCategoryUtility WhatsappTemplateNewParamsCategory = "UTILITY" WhatsappTemplateNewParamsCategoryAuthentication WhatsappTemplateNewParamsCategory = "AUTHENTICATION" )
func (WhatsappTemplateNewParamsCategory) IsKnown ¶
func (r WhatsappTemplateNewParamsCategory) IsKnown() bool
type WhatsappTemplateNewParamsComponent ¶
type WhatsappTemplateNewParamsComponent struct {
// Component type
Type param.Field[WhatsappTemplateNewParamsComponentsType] `json:"type" api:"required"`
Buttons param.Field[[]WhatsappTemplateNewParamsComponentsButton] `json:"buttons"`
// Header format (TEXT, IMAGE, etc.)
Format param.Field[string] `json:"format"`
// Component text
Text param.Field[string] `json:"text"`
}
func (WhatsappTemplateNewParamsComponent) MarshalJSON ¶
func (r WhatsappTemplateNewParamsComponent) MarshalJSON() (data []byte, err error)
type WhatsappTemplateNewParamsComponentsButton ¶
type WhatsappTemplateNewParamsComponentsButton struct {
// Button text
Text param.Field[string] `json:"text" api:"required"`
// Button type
Type param.Field[string] `json:"type" api:"required"`
PhoneNumber param.Field[string] `json:"phone_number"`
URL param.Field[string] `json:"url"`
}
func (WhatsappTemplateNewParamsComponentsButton) MarshalJSON ¶
func (r WhatsappTemplateNewParamsComponentsButton) MarshalJSON() (data []byte, err error)
type WhatsappTemplateNewParamsComponentsType ¶
type WhatsappTemplateNewParamsComponentsType string
Component type
const ( WhatsappTemplateNewParamsComponentsTypeHeader WhatsappTemplateNewParamsComponentsType = "HEADER" WhatsappTemplateNewParamsComponentsTypeBody WhatsappTemplateNewParamsComponentsType = "BODY" WhatsappTemplateNewParamsComponentsTypeButtons WhatsappTemplateNewParamsComponentsType = "BUTTONS" )
func (WhatsappTemplateNewParamsComponentsType) IsKnown ¶
func (r WhatsappTemplateNewParamsComponentsType) IsKnown() bool
type WhatsappTemplateNewResponse ¶
type WhatsappTemplateNewResponse struct {
// Template category
Category WhatsappTemplateNewResponseCategory `json:"category" api:"required"`
Components []WhatsappTemplateNewResponseComponent `json:"components" api:"required"`
// Template language code
Language string `json:"language" api:"required"`
// Template name
Name string `json:"name" api:"required"`
// Approval status
Status WhatsappTemplateNewResponseStatus `json:"status" api:"required"`
JSON whatsappTemplateNewResponseJSON `json:"-"`
}
func (*WhatsappTemplateNewResponse) UnmarshalJSON ¶
func (r *WhatsappTemplateNewResponse) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateNewResponseCategory ¶
type WhatsappTemplateNewResponseCategory string
Template category
const ( WhatsappTemplateNewResponseCategoryMarketing WhatsappTemplateNewResponseCategory = "MARKETING" WhatsappTemplateNewResponseCategoryUtility WhatsappTemplateNewResponseCategory = "UTILITY" WhatsappTemplateNewResponseCategoryAuthentication WhatsappTemplateNewResponseCategory = "AUTHENTICATION" )
func (WhatsappTemplateNewResponseCategory) IsKnown ¶
func (r WhatsappTemplateNewResponseCategory) IsKnown() bool
type WhatsappTemplateNewResponseComponent ¶
type WhatsappTemplateNewResponseComponent struct {
// Component type
Type WhatsappTemplateNewResponseComponentsType `json:"type" api:"required"`
Buttons []WhatsappTemplateNewResponseComponentsButton `json:"buttons"`
// Header format (TEXT, IMAGE, etc.)
Format string `json:"format"`
// Component text
Text string `json:"text"`
JSON whatsappTemplateNewResponseComponentJSON `json:"-"`
}
func (*WhatsappTemplateNewResponseComponent) UnmarshalJSON ¶
func (r *WhatsappTemplateNewResponseComponent) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateNewResponseComponentsButton ¶
type WhatsappTemplateNewResponseComponentsButton struct {
// Button text
Text string `json:"text" api:"required"`
// Button type
Type string `json:"type" api:"required"`
PhoneNumber string `json:"phone_number"`
URL string `json:"url"`
JSON whatsappTemplateNewResponseComponentsButtonJSON `json:"-"`
}
func (*WhatsappTemplateNewResponseComponentsButton) UnmarshalJSON ¶
func (r *WhatsappTemplateNewResponseComponentsButton) UnmarshalJSON(data []byte) (err error)
type WhatsappTemplateNewResponseComponentsType ¶
type WhatsappTemplateNewResponseComponentsType string
Component type
const ( WhatsappTemplateNewResponseComponentsTypeHeader WhatsappTemplateNewResponseComponentsType = "HEADER" WhatsappTemplateNewResponseComponentsTypeBody WhatsappTemplateNewResponseComponentsType = "BODY" WhatsappTemplateNewResponseComponentsTypeButtons WhatsappTemplateNewResponseComponentsType = "BUTTONS" )
func (WhatsappTemplateNewResponseComponentsType) IsKnown ¶
func (r WhatsappTemplateNewResponseComponentsType) IsKnown() bool
type WhatsappTemplateNewResponseStatus ¶
type WhatsappTemplateNewResponseStatus string
Approval status
const ( WhatsappTemplateNewResponseStatusApproved WhatsappTemplateNewResponseStatus = "APPROVED" WhatsappTemplateNewResponseStatusPending WhatsappTemplateNewResponseStatus = "PENDING" WhatsappTemplateNewResponseStatusRejected WhatsappTemplateNewResponseStatus = "REJECTED" )
func (WhatsappTemplateNewResponseStatus) IsKnown ¶
func (r WhatsappTemplateNewResponseStatus) IsKnown() bool
type WhatsappTemplateService ¶
type WhatsappTemplateService struct {
Options []option.RequestOption
}
WhatsappTemplateService contains methods and other services that help with interacting with the relay API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWhatsappTemplateService method instead.
func NewWhatsappTemplateService ¶
func NewWhatsappTemplateService(opts ...option.RequestOption) (r *WhatsappTemplateService)
NewWhatsappTemplateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WhatsappTemplateService) Delete ¶
func (r *WhatsappTemplateService) Delete(ctx context.Context, templateName string, body WhatsappTemplateDeleteParams, opts ...option.RequestOption) (err error)
Delete a message template
func (*WhatsappTemplateService) Get ¶
func (r *WhatsappTemplateService) Get(ctx context.Context, templateName string, query WhatsappTemplateGetParams, opts ...option.RequestOption) (res *WhatsappTemplateGetResponse, err error)
Get template details
func (*WhatsappTemplateService) List ¶
func (r *WhatsappTemplateService) List(ctx context.Context, query WhatsappTemplateListParams, opts ...option.RequestOption) (res *WhatsappTemplateListResponse, err error)
List message templates
func (*WhatsappTemplateService) New ¶
func (r *WhatsappTemplateService) New(ctx context.Context, body WhatsappTemplateNewParams, opts ...option.RequestOption) (res *WhatsappTemplateNewResponse, err error)
Create a message template
Source Files
¶
- account.go
- accountfacebookpage.go
- accountgmblocation.go
- accountgroup.go
- accounthealth.go
- accountlinkedinorganization.go
- accountpinterestboard.go
- accountredditflair.go
- accountredditsubreddit.go
- aliases.go
- analytics.go
- analyticsyoutube.go
- apikey.go
- client.go
- connect.go
- connectfacebook.go
- connectfacebookpage.go
- connectgooglebusiness.go
- connectgooglebusinesslocation.go
- connection.go
- connectlinkedin.go
- connectlinkedinorganization.go
- connectpinterest.go
- connectpinterestboard.go
- connectsnapchat.go
- connectsnapchatprofile.go
- connecttelegram.go
- connectwhatsapp.go
- field.go
- inbox.go
- inboxcomment.go
- inboxcommenthide.go
- inboxcommentlike.go
- inboxmessage.go
- inboxreview.go
- inboxreviewreply.go
- media.go
- post.go
- postlog.go
- queue.go
- queueslot.go
- reddit.go
- tool.go
- toolinstagram.go
- toolvalidate.go
- twitter.go
- twitterbookmark.go
- twitterfollow.go
- twitterretweet.go
- usage.go
- webhook.go
- whatsapp.go
- whatsappbroadcast.go
- whatsappbusinessprofile.go
- whatsappcontact.go
- whatsappgroup.go
- whatsapptemplate.go