Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultListOptions = &ListOptions{
Limit: 20,
Offset: 0,
}
DefaultListOptions provides reasonable values for List().
Functions ¶
Types ¶
type Contact ¶
type Contact struct { ID string HRef string MSISDN int64 FirstName string LastName string CustomDetails struct { Custom1 string Custom2 string Custom3 string Custom4 string } Groups struct { TotalCount int HRef string } Messages struct { TotalCount int HRef string } CreatedDatetime *time.Time UpdatedDatetime *time.Time }
Contact gets returned by the API.
type ContactList ¶
func List ¶
func List(c *messagebird.Client, options *ListOptions) (*ContactList, error)
List retrieves a paginated list of contacts, based on the options provided. It's worth noting DefaultListOptions.
type ListOptions ¶
type ListOptions struct {
Limit, Offset int
}
ListOptions can be used to set pagination options in List().
type Request ¶
type Request struct { MSISDN string `json:"msisdn,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Custom1 string `json:"custom1,omitempty"` Custom2 string `json:"custom2,omitempty"` Custom3 string `json:"custom3,omitempty"` Custom4 string `json:"custom4,omitempty"` }
Request represents a contact for write operations, e.g. for creating a new contact or updating an existing one.
Click to show internal directories.
Click to hide internal directories.