Skip to content

Commit

Permalink
Expose user type
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertJohan committed Mar 28, 2019
1 parent 1dbafb0 commit 2a3b088
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type UserService struct {

// UserList holds a list of Users and paging information
type UserList struct {
Pages PageParams
Users []User
Pages PageParams
Users []User
ScrollParam string `json:"scroll_param,omitempty"`
}

Expand All @@ -19,6 +19,7 @@ type UserList struct {
// stripped out from the request. Please see the API documentation for details.
type User struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
UserID string `json:"user_id,omitempty"`
Expand Down Expand Up @@ -81,7 +82,7 @@ type UserIdentifiers struct {

// UserAvatar represents an avatar for a User.
type UserAvatar struct {
Type string `json:"type,omitempty"`
Type string `json:"type,omitempty"`
ImageURL string `json:"image_url,omitempty"`
}

Expand All @@ -92,7 +93,7 @@ type userListParams struct {
}

type scrollParams struct {
ScrollParam string `url:"scroll_param,omitempty"`
ScrollParam string `url:"scroll_param,omitempty"`
}

// FindByID looks up a User by their Intercom ID.
Expand Down Expand Up @@ -121,7 +122,7 @@ func (u *UserService) List(params PageParams) (UserList, error) {

// List all Users for App via Scroll API
func (u *UserService) Scroll(scrollParam string) (UserList, error) {
return u.Repository.scroll(scrollParam)
return u.Repository.scroll(scrollParam)
}

// List Users by Segment.
Expand Down

0 comments on commit 2a3b088

Please sign in to comment.