-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for relationships #284
Conversation
Adds Support for: - Sending friend request. - Accepting friend request. - Getting all the relationships. - Getting all the mutual friends with another user. - Blocking a user. **Note:** - Bot accounts are not allowed to access the endpoint. - May close bwmarrin#150
@@ -381,7 +381,7 @@ type Ready struct { | |||
// A Relationship between the logged in user and Relationship.User | |||
type Relationship struct { | |||
User *User `json:"user"` | |||
Type int `json:"type"` // 1 = friend, 2 = blocked, 3 = incoming friend req, 4 = sent friend req | |||
Type uint8 `json:"type"` // 1 = friend, 2 = blocked, 3 = incoming friend req, 4 = sent friend req |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, might as well leave as int.
Changed the uint8 declarations to int.
|
||
// relationshipCreate creates a new relationship. (I.e. send or accept a friend request, block a user.) | ||
// relationshipType : 1 = friend, 2 = blocked, 3 = incoming friend req, 4 = sent friend req | ||
func (s *Session) relationshipCreate(userID string, relationshipType uint8) (err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uint8 broke, sorry about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhmm. Forgot to run the tests.
Missed one instance of unint8 during previous push.
* Add support for relationships Adds Support for: - Sending friend request. - Accepting friend request. - Getting all the relationships. - Getting all the mutual friends with another user. - Blocking a user. **Note:** - Bot accounts are not allowed to access the endpoint. - May close bwmarrin#150 * Implement requested changes Changed the uint8 declarations to int. * Change the missed unint8 declaration to int Missed one instance of unint8 during previous push.
Adds Support for:
Note: