Rename Friendship struct to Relationship

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-07-02 20:36:44 -04:00
parent f19965798c
commit 8424b2ac49
4 changed files with 32 additions and 32 deletions
+3 -3
View File
@@ -305,7 +305,7 @@ func (s *AccountService) Trophies(ctx context.Context) ([]Trophy, *Response, err
}
type rootFriendList struct {
Friends []Friendship
Friends []Relationship
}
// UnmarshalJSON implements the json.Unmarshaler interface.
@@ -340,7 +340,7 @@ func (l *rootFriendList) UnmarshalJSON(b []byte) error {
return nil
}
var friends []Friendship
var friends []Relationship
err = json.Unmarshal(byteValue, &friends)
if err != nil {
return err
@@ -351,7 +351,7 @@ func (l *rootFriendList) UnmarshalJSON(b []byte) error {
}
// Friends returns a list of your friends.
func (s *AccountService) Friends(ctx context.Context) ([]Friendship, *Response, error) {
func (s *AccountService) Friends(ctx context.Context) ([]Relationship, *Response, error) {
path := "prefs/friends"
req, err := s.client.NewRequest(http.MethodGet, path, nil)