item

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package item contains auto-generated files. DO NOT MODIFY

Package item contains auto-generated files. DO NOT MODIFY

Package item contains auto-generated files. DO NOT MODIFY

Package item contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing a specific list item resource See https://www.twilio.com/docs/sync/api/listitem-resource for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the item client

func (Client) Delete

func (c Client) Delete() error

Delete removes a list item resource from the account See https://www.twilio.com/docs/sync/api/listitem-resource#delete-a-listitem-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a list item resource from the account See https://www.twilio.com/docs/sync/api/listitem-resource#delete-a-listitem-resource for more details

func (Client) Fetch

func (c Client) Fetch() (*FetchSyncListItemResponse, error)

Fetch retrieves an list item resource See https://www.twilio.com/docs/sync/api/listitem-resource#fetch-a-listitem-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchSyncListItemResponse, error)

FetchWithContext retrieves an list item resource See https://www.twilio.com/docs/sync/api/listitem-resource#fetch-a-listitem-resource for more details

func (Client) Update

Update modifies a list item resource See https://www.twilio.com/docs/sync/api/listitem-resource#update-a-listitem-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateSyncListItemInput) (*UpdateSyncListItemResponse, error)

UpdateWithContext modifies a list item resource See https://www.twilio.com/docs/sync/api/listitem-resource#update-a-listitem-resource for more details

type ClientProperties

type ClientProperties struct {
	Index       int
	ServiceSid  string
	SyncListSid string
}

ClientProperties are the properties required to manage the item resources

type FetchSyncListItemResponse

type FetchSyncListItemResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Index       int                    `json:"index"`
	ListSid     string                 `json:"list_sid"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	URL         string                 `json:"url"`
}

FetchSyncListItemResponse defines the response fields for the retrieved list item

type UpdateSyncListItemInput

type UpdateSyncListItemInput struct {
	CollectionTtl *int    `form:"CollectionTtl,omitempty"`
	Data          *string `form:"Data,omitempty"`
	ItemTtl       *int    `form:"ItemTtl,omitempty"`
	Ttl           *int    `form:"Ttl,omitempty"`
}

UpdateSyncListItemInput defines input fields for updating a list item resource

type UpdateSyncListItemResponse

type UpdateSyncListItemResponse struct {
	AccountSid  string                 `json:"account_sid"`
	CreatedBy   string                 `json:"created_by"`
	Data        map[string]interface{} `json:"data"`
	DateCreated time.Time              `json:"date_created"`
	DateExpires *time.Time             `json:"date_expires,omitempty"`
	DateUpdated *time.Time             `json:"date_updated,omitempty"`
	Index       int                    `json:"index"`
	ListSid     string                 `json:"list_sid"`
	Revision    string                 `json:"revision"`
	ServiceSid  string                 `json:"service_Sid"`
	URL         string                 `json:"url"`
}

UpdateSyncListItemResponse defines the response fields for the updated list item

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL