Documentation
¶
Index ¶
- Variables
- 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 *ListOptions) (*contact.ContactList, error)
- func RemoveContact(c *messagebird.Client, groupID, contactID string) error
- func Update(c *messagebird.Client, id string, request *Request) error
- type Group
- type GroupList
- type ListOptions
- type Request
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultListOptions = &ListOptions{
Limit: 10,
Offset: 0,
}
DefaultListOptions provides reasonable values for List().
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 *ListOptions) (*contact.ContactList, 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 GroupList ¶
type GroupList 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 *ListOptions) (*GroupList, error)
List retrieves a paginated list of groups, 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() and ListContacts().
Click to show internal directories.
Click to hide internal directories.