From 2a3b088c92d9d1ac06599b2b8ecd76f2fbe62a1c Mon Sep 17 00:00:00 2001 From: Geert-Johan Riemer Date: Thu, 28 Mar 2019 11:47:24 +0100 Subject: [PATCH] Expose user type --- user.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/user.go b/user.go index 7dcf446..1f447e1 100644 --- a/user.go +++ b/user.go @@ -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"` } @@ -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"` @@ -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"` } @@ -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. @@ -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.