Documentation ¶
Index ¶
- type ApiService
- func (c *ApiService) DeleteContent(Sid string) error
- func (c *ApiService) FetchApprovalFetch(Sid string) (*ContentV1ApprovalFetch, error)
- func (c *ApiService) FetchContent(Sid string) (*ContentV1Content, error)
- func (c *ApiService) ListContent(params *ListContentParams) ([]ContentV1Content, error)
- func (c *ApiService) ListContentAndApprovals(params *ListContentAndApprovalsParams) ([]ContentV1ContentAndApprovals, error)
- func (c *ApiService) ListLegacyContent(params *ListLegacyContentParams) ([]ContentV1LegacyContent, error)
- func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumber string) (*ListContentResponse, error)
- func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsParams, pageToken, pageNumber string) (*ListContentAndApprovalsResponse, error)
- func (c *ApiService) PageLegacyContent(params *ListLegacyContentParams, pageToken, pageNumber string) (*ListLegacyContentResponse, error)
- func (c *ApiService) StreamContent(params *ListContentParams) (chan ContentV1Content, chan error)
- func (c *ApiService) StreamContentAndApprovals(params *ListContentAndApprovalsParams) (chan ContentV1ContentAndApprovals, chan error)
- func (c *ApiService) StreamLegacyContent(params *ListLegacyContentParams) (chan ContentV1LegacyContent, chan error)
- type ContentV1ApprovalFetch
- type ContentV1Content
- type ContentV1ContentAndApprovals
- type ContentV1LegacyContent
- type ListContentAndApprovalsParams
- type ListContentAndApprovalsResponse
- type ListContentParams
- type ListContentResponse
- type ListContentResponseMeta
- type ListLegacyContentParams
- type ListLegacyContentResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) DeleteContent ¶
func (c *ApiService) DeleteContent(Sid string) error
Deletes a Content resource
func (*ApiService) FetchApprovalFetch ¶
func (c *ApiService) FetchApprovalFetch(Sid string) (*ContentV1ApprovalFetch, error)
Fetch a Content resource's approval status by its unique Content Sid
func (*ApiService) FetchContent ¶
func (c *ApiService) FetchContent(Sid string) (*ContentV1Content, error)
Fetch a Content resource by its unique Content Sid
func (*ApiService) ListContent ¶
func (c *ApiService) ListContent(params *ListContentParams) ([]ContentV1Content, error)
Lists Content records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListContentAndApprovals ¶
func (c *ApiService) ListContentAndApprovals(params *ListContentAndApprovalsParams) ([]ContentV1ContentAndApprovals, error)
Lists ContentAndApprovals records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListLegacyContent ¶
func (c *ApiService) ListLegacyContent(params *ListLegacyContentParams) ([]ContentV1LegacyContent, error)
Lists LegacyContent records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageContent ¶
func (c *ApiService) PageContent(params *ListContentParams, pageToken, pageNumber string) (*ListContentResponse, error)
Retrieve a single page of Content records from the API. Request is executed immediately.
func (*ApiService) PageContentAndApprovals ¶
func (c *ApiService) PageContentAndApprovals(params *ListContentAndApprovalsParams, pageToken, pageNumber string) (*ListContentAndApprovalsResponse, error)
Retrieve a single page of ContentAndApprovals records from the API. Request is executed immediately.
func (*ApiService) PageLegacyContent ¶
func (c *ApiService) PageLegacyContent(params *ListLegacyContentParams, pageToken, pageNumber string) (*ListLegacyContentResponse, error)
Retrieve a single page of LegacyContent records from the API. Request is executed immediately.
func (*ApiService) StreamContent ¶
func (c *ApiService) StreamContent(params *ListContentParams) (chan ContentV1Content, chan error)
Streams Content records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamContentAndApprovals ¶
func (c *ApiService) StreamContentAndApprovals(params *ListContentAndApprovalsParams) (chan ContentV1ContentAndApprovals, chan error)
Streams ContentAndApprovals records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamLegacyContent ¶
func (c *ApiService) StreamLegacyContent(params *ListLegacyContentParams) (chan ContentV1LegacyContent, chan error)
Streams LegacyContent records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
type ContentV1ApprovalFetch ¶
type ContentV1ApprovalFetch struct { // The unique string that that we created to identify the Content resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource. AccountSid *string `json:"account_sid,omitempty"` // Contains the whatsapp approval information for the Content resource, with fields such as approval status, rejection reason, and category, amongst others. Whatsapp *interface{} `json:"whatsapp,omitempty"` // The URL of the resource, relative to `https://content.twilio.com`. Url *string `json:"url,omitempty"` }
ContentV1ApprovalFetch struct for ContentV1ApprovalFetch
type ContentV1Content ¶
type ContentV1Content struct { // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The unique string that that we created to identify the Content resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource. AccountSid *string `json:"account_sid,omitempty"` // A string name used to describe the Content resource. Not visible to the end recipient. FriendlyName *string `json:"friendly_name,omitempty"` // Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. Language *string `json:"language,omitempty"` // Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. Variables *interface{} `json:"variables,omitempty"` // The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. Types *interface{} `json:"types,omitempty"` // The URL of the resource, relative to `https://content.twilio.com`. Url *string `json:"url,omitempty"` // A list of links related to the Content resource, such as approval_fetch and approval_create Links *map[string]interface{} `json:"links,omitempty"` }
ContentV1Content struct for ContentV1Content
type ContentV1ContentAndApprovals ¶
type ContentV1ContentAndApprovals struct { // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The unique string that that we created to identify the Content resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource. AccountSid *string `json:"account_sid,omitempty"` // A string name used to describe the Content resource. Not visible to the end recipient. FriendlyName *string `json:"friendly_name,omitempty"` // Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. Language *string `json:"language,omitempty"` // Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. Variables *interface{} `json:"variables,omitempty"` // The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. Types *interface{} `json:"types,omitempty"` // The submitted information and approval request status of the Content resource. ApprovalRequests *interface{} `json:"approval_requests,omitempty"` }
ContentV1ContentAndApprovals struct for ContentV1ContentAndApprovals
type ContentV1LegacyContent ¶
type ContentV1LegacyContent struct { // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The unique string that that we created to identify the Content resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource. AccountSid *string `json:"account_sid,omitempty"` // A string name used to describe the Content resource. Not visible to the end recipient. FriendlyName *string `json:"friendly_name,omitempty"` // Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in. Language *string `json:"language,omitempty"` // Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}. Variables *interface{} `json:"variables,omitempty"` // The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource. Types *interface{} `json:"types,omitempty"` // The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed LegacyTemplateName *string `json:"legacy_template_name,omitempty"` // The string body field of the legacy content template associated with this Content resource LegacyBody *string `json:"legacy_body,omitempty"` // The URL of the resource, relative to `https://content.twilio.com`. Url *string `json:"url,omitempty"` }
ContentV1LegacyContent struct for ContentV1LegacyContent
type ListContentAndApprovalsParams ¶
type ListContentAndApprovalsParams struct { // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListContentAndApprovals'
func (*ListContentAndApprovalsParams) SetLimit ¶
func (params *ListContentAndApprovalsParams) SetLimit(Limit int) *ListContentAndApprovalsParams
func (*ListContentAndApprovalsParams) SetPageSize ¶
func (params *ListContentAndApprovalsParams) SetPageSize(PageSize int) *ListContentAndApprovalsParams
type ListContentAndApprovalsResponse ¶
type ListContentAndApprovalsResponse struct { Contents []ContentV1ContentAndApprovals `json:"contents,omitempty"` Meta ListContentResponseMeta `json:"meta,omitempty"` }
ListContentAndApprovalsResponse struct for ListContentAndApprovalsResponse
type ListContentParams ¶
type ListContentParams struct { // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListContent'
func (*ListContentParams) SetLimit ¶
func (params *ListContentParams) SetLimit(Limit int) *ListContentParams
func (*ListContentParams) SetPageSize ¶
func (params *ListContentParams) SetPageSize(PageSize int) *ListContentParams
type ListContentResponse ¶
type ListContentResponse struct { Contents []ContentV1Content `json:"contents,omitempty"` Meta ListContentResponseMeta `json:"meta,omitempty"` }
ListContentResponse struct for ListContentResponse
type ListContentResponseMeta ¶
type ListContentResponseMeta struct { FirstPageUrl string `json:"first_page_url,omitempty"` NextPageUrl *string `json:"next_page_url,omitempty"` Page int `json:"page,omitempty"` PageSize int `json:"page_size,omitempty"` PreviousPageUrl *string `json:"previous_page_url,omitempty"` Url string `json:"url,omitempty"` Key string `json:"key,omitempty"` }
ListContentResponseMeta struct for ListContentResponseMeta
type ListLegacyContentParams ¶
type ListLegacyContentParams struct { // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListLegacyContent'
func (*ListLegacyContentParams) SetLimit ¶
func (params *ListLegacyContentParams) SetLimit(Limit int) *ListLegacyContentParams
func (*ListLegacyContentParams) SetPageSize ¶
func (params *ListLegacyContentParams) SetPageSize(PageSize int) *ListLegacyContentParams
type ListLegacyContentResponse ¶
type ListLegacyContentResponse struct { Contents []ContentV1LegacyContent `json:"contents,omitempty"` Meta ListContentResponseMeta `json:"meta,omitempty"` }
ListLegacyContentResponse struct for ListLegacyContentResponse
Source Files ¶
- api_service.go
- content.go
- content_and_approvals.go
- content_approval_requests.go
- legacy_content.go
- model_content_v1_approval_fetch.go
- model_content_v1_content.go
- model_content_v1_content_and_approvals.go
- model_content_v1_legacy_content.go
- model_list_content_and_approvals_response.go
- model_list_content_response.go
- model_list_content_response_meta.go
- model_list_legacy_content_response.go