Documentation
¶
Overview ¶
Package segments provides a service for managing Intercom segments.
Segments are saved filters that dynamically group contacts based on attributes and behavior.
Index ¶
- type List
- type ListOptions
- type Segment
- type Service
- func (s *Service) Get(ctx context.Context, id string) (*Segment, error)
- func (s *Service) GetRaw(ctx context.Context, id string) (*api.Result, error)
- func (s *Service) List(ctx context.Context, opts *ListOptions) (*List, error)
- func (s *Service) ListRaw(ctx context.Context, opts *ListOptions) (*api.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListOptions ¶
type ListOptions struct {
IncludeCount *bool `url:"include_count,omitempty"`
}
ListOptions specifies optional parameters to the List method.
type Segment ¶
type Segment struct {
Type string `json:"type"`
ID string `json:"id"`
Name string `json:"name,omitempty"`
CreatedAt int64 `json:"created_at,omitempty"`
UpdatedAt int64 `json:"updated_at,omitempty"`
PersonType string `json:"person_type,omitempty"`
Count int `json:"count,omitempty"`
}
Segment represents an Intercom segment.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles communication with the segment related methods of the Intercom API.
func (*Service) Get ¶
Get retrieves a segment by ID.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/segments/retrievesegment
func (*Service) GetRaw ¶
GetRaw retrieves a segment by ID with the full HTTP result.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/segments/retrievesegment
func (*Service) List ¶
List returns all segments.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/segments/listsegments
func (*Service) ListRaw ¶
ListRaw returns all segments with the full HTTP result.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/segments/listsegments