ChimeraCoder / anaconda

A Go client library for the Twitter 1.1 API
MIT License
1.14k stars 246 forks source link

I want to detect that a twitter user is tweeting. #275

Open oguzdelioglu opened 3 years ago

oguzdelioglu commented 3 years ago

When a specified user tweeted, I want to detect that tweet.

How should I use which function of this project?

v := url.Values{}
s := api.PublicStreamFilter(v)

v.Add("follow", "2876288241")

for {
item := <-s.C
fmt.Println(item)
}

Result: {[] Sun Mar 07 12:24:31 +0000 2021 [] {[] [] {[]} [] []} {[] [] {[]} [] []} { [] {[] [] {[]} [] []} {[] [] {[]} [] []}} 0 false low xxxxxxxxxxxxx false 1368538049487978499 1368538049487978499 0
0 false und {map[] {[] } [] {[] } [] } 0 false false 0 false Twitter Web App map[] xxxxxxxxxxxxx {false Fri Nov 14 11:50:22 +0000 2014 true false {[] [] {[]} [] []} 0 false 4 false 1 false false 2876288241 2876288241 false false 0 Daily Kids Games false C0DEED http://abs.twimg.com/images/themes/theme1/bg.png https://abs.twimg.com/images/themes/theme1/bg.png false https://pbs.twimg.com/profile_banners/2876288241/1415966811 http://pbs.twimg.com/profile_images/533227532913356803/l-x_UByU_normal.png https://pbs.twimg.com/profile_images/533227532913356803/l-x_UByU_normal.png 1DA1F2 C0DEED DDEEF6 333333 true false dailykidsgames false 2 0 false [] } false [] } {1368538049487978499 1368538049487978499 2876288241 2876288241}

rilysh commented 1 year ago

That should be in home feed.