github.com/dghubble/go-twitter v0.0.0-20190512073027-53f972dc4b06
Basename is uppercase README.mdContains an unbounded block loop
SHA-2564a368ebb774b4be2ae58cdb013cff5ceb49c33b3bee05c23c7a3fdb320165652
Evidence
1# go-twitter Changelog
2
3Notable changes over time. Note, `go-twitter` does not follow a semver release cycle since it may change whenever the Twitter API changes (external).
4
5## 11/2018
6
7* Add `DirectMessageService` support for the new Twitter Direct Message Events [API](https://developer.twitter.com/en/docs/direct-messages/api-features) ([#125](https://github.com/dghubble/go-twitter/pull/125))
8 * Add `EventsNew` method for sending a Direct Message event
9 * Add `EventsShow` method for getting a single Direct Message event
10 * Add `EventsList` method for listing recent Direct Message events
11 * Add`EventsDestroy` method for destroying a Direct Message event
12
1.PHONY: all
2all: test vet lint fmt
3
4.PHONY: test
5test:
6 @go test ./twitter -cover
7
8.PHONY: vet
⋯11 lines
1:218… doc.org/github.com/dghubble/go-twitter)
2<img align="right" src="https://storage.googleapis.com/dghubble/gopher-on-bird.png">
3
4go-twitter is a Go client library for the [Twitter API](https://dev.twitter.com/rest/public). Check the [usage](#usage) section or try the [examples](/examples) to see how to access the Twitter API.
5
6### Features
⋯5 lines
22:20… s
23 * User Streams
24 * Site Streams
25 * Firehose Streams
26
27## Install
28
29 go get github.com/dghubble/go-twitter/twitter
30
31## Documentation
32
33Read [GoDoc](https://godoc.org/github.com/dghubble/go-twitter/twitter)
34
35## Usage
36
37### REST API
⋯4 lines
1
2# Examples
3
4Get the dependencies and examples
5
6 cd examples
7 go get .
8
9## User Auth (OAuth1)
10
11A user access token (OAuth1) grants a consumer application access to a user's Twitter resources.
12
13Setup an OAuth1 `http.Client` with the consumer key and secret and oauth token and secret.
14
15 export TWITTER_CONSUMER_KEY=xxx
16 export TWITTER_CONSUMER_SECRET=xxx
17 export TWITTER_ACCESS_TOKEN=xxx
18 export TWITTER_ACCESS_SECRET=xxx
19
20To make requests as an application, on behalf of a user, create a `twitter` `Client` to get the home timeline, mention timeline, and more (example will **not** post Tweets).
21
22 go run user-auth.go
23
24## App Auth (OAuth2)
25
26An application access token (OAuth2) allows an application to make Twitter API requests for public content, with rate limits counting against the app itself. App auth requests can be made to API endpoints which do not require a user context.
27
28Setup an OAuth2 `http.Client` with the Twitter application access token.
29
30 export TWITTER_APP_ACCESS_TOKEN=xxx
31
32To make requests as an application, create a `twitter` `Client` and get public Tweets or timelines or other public content.
33
34 go run app-auth.go
35
36## Streaming API
37
38A user access token (OAuth1) is required for Streaming API requests. See above.
39
40 go run streaming.go
41
42Hit CTRL-C to stop streaming. Uncomment different examples in code to try different streams.
Showing the top 5 files — 6 more files (41 regions) not shown.
No evidence locations were recorded for this file. Raw result