Documentation
¶
Index ¶
- func AddContacts(c messagebird.Client, groupID string, contactIDs []string) error
- func Delete(c messagebird.Client, id string) error
- func ListContacts(c messagebird.Client, groupID string, options *messagebird.PaginationRequest) (*contact.Contacts, error)
- func RemoveContact(c messagebird.Client, groupID, contactID string) error
- func Update(c messagebird.Client, id string, request *Request) error
- type Group
- type Groups
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContacts ¶
func AddContacts(c messagebird.Client, groupID string, contactIDs []string) error
AddContacts adds a maximum of 50 contacts to the group.
func Delete ¶
func Delete(c messagebird.Client, id string) error
Delete attempts deleting the group with the provided ID. If nil is returned, the resource was deleted successfully.
func ListContacts ¶
func ListContacts(c messagebird.Client, groupID string, options *messagebird.PaginationRequest) (*contact.Contacts, error)
ListContacts lists the contacts that are a member of a group.
func RemoveContact ¶
func RemoveContact(c messagebird.Client, groupID, contactID string) error
RemoveContact removes the contact from a group. If nil is returned, the operation was successful.
Types ¶
type Group ¶
type Group struct {
ID string
HRef string
Name string
Contacts struct {
TotalCount int
HRef string
}
CreatedDatetime *time.Time
UpdatedDatetime *time.Time
}
Group gets returned by the API.
type Groups ¶
type Groups struct {
Offset int
Limit int
Count int
TotalCount int
Links struct {
First string
Previous string
Next string
Last string
}
Items []Group
}
func List ¶
func List(c messagebird.Client, options *messagebird.PaginationRequest) (*Groups, error)
List retrieves a paginated list of groups, based on the options provided. It's worth noting DefaultListOptions.
Click to show internal directories.
Click to hide internal directories.