FollowAccount: Add 'reblogs' parameter
authorMikael Berthe <mikael@lilotux.net>
Wed, 21 Mar 2018 00:27:10 +0100
changeset 218 22ed9de1c5fe
parent 217 cc086e49cd0c
child 219 98697242c4a0
FollowAccount: Add 'reblogs' parameter
account.go
--- a/account.go	Tue Mar 20 22:38:33 2018 +0100
+++ b/account.go	Wed Mar 21 00:27:10 2018 +0100
@@ -199,8 +199,18 @@
 }
 
 // FollowAccount follows an account
-func (mc *Client) FollowAccount(accountID int64) (*Relationship, error) {
-	rel, err := mc.updateRelationship("follow", accountID, nil)
+// 'reblogs' can be used to specify if boots should be displayed or hidden.
+func (mc *Client) FollowAccount(accountID int64, reblogs *bool) (*Relationship, error) {
+	var params apiCallParams
+	if reblogs != nil {
+		params = make(apiCallParams)
+		if *reblogs {
+			params["reblogs"] = "true"
+		} else {
+			params["reblogs"] = "false"
+		}
+	}
+	rel, err := mc.updateRelationship("follow", accountID, params)
 	if err != nil {
 		return nil, err
 	}