Skip to content

Commit 73580a9

Browse files
committed
Added UserFlairWithID
Signed-off-by: Sandy <thecsw@ku.edu>
1 parent 0cd19a8 commit 73580a9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reddit.go

+10
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,16 @@ func (c *Reddit) UserFlair(user, text string) error {
627627
return err
628628
}
629629

630+
func (c *Reddit) UserFlairWithID(name, user, text string) error {
631+
target := RedditOauth + "/r/" + name + "/api/flair"
632+
_, err := c.MiraRequest("POST", target, map[string]string{
633+
"name": user,
634+
"text": text,
635+
"api_type": "json",
636+
})
637+
return err
638+
}
639+
630640
func (c *Reddit) SelectFlair(text string) error {
631641
name, _, err := c.checkType("submission")
632642
if err != nil {

0 commit comments

Comments
 (0)