Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
rename to twitterstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallenstedt committed Jan 3, 2021
1 parent 5bb4295 commit 981d05d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func startStreaming() {
// Obtain an AccessToken
// You can use the token generator and provide your api key and secret
// or provide an access token you already have
token, err := twitter_stream.NewTokenGenerator().SetApiKeyAndSecret(
token, err := twitterstream.NewTokenGenerator().SetApiKeyAndSecret(
"your_twitter_api_key",
"your_twitter_api_secret",
).RequestBearerToken()
Expand All @@ -38,8 +38,8 @@ func startStreaming() {
panic("No token found!")
}

// With an access token, you can create a new twitter_stream and start streaming
api := twitter_stream.NewTwitterStream(token.AccessToken)
// With an access token, you can create a new twitterstream and start streaming
api := twitterstream.NewTwitterStream(token.AccessToken)
api.Stream.StartStream()

// If you do not put this in a go routine, you will stream forever
Expand All @@ -65,7 +65,7 @@ func addRules() {
// Obtain an AccessToken
// You can use the token generator and provide your api key and secret
// or provide an access token you already have
token, err := twitter_stream.NewTokenGenerator().SetApiKeyAndSecret(
token, err := twitterstream.NewTokenGenerator().SetApiKeyAndSecret(
"your_twitter_api_key",
"your_twitter_api_secret",
).RequestBearerToken()
Expand All @@ -74,8 +74,8 @@ func addRules() {
panic("No token found!")
}

// With an access token, you can create a new twitter_stream and start adding rules
api := twitter_stream.NewTwitterStream(token.AccessToken)
// With an access token, you can create a new twitterstream and start adding rules
api := twitterstream.NewTwitterStream(token.AccessToken)

// You can add rules by passing in stringified JSON with the rules you want to add
// You can learn more about building rules here: https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule
Expand All @@ -99,7 +99,7 @@ func deleteRules() {
// Obtain an AccessToken
// You can use the token generator and provide your api key and secret
// or provide an access token you already have
token, err := twitter_stream.NewTokenGenerator().SetApiKeyAndSecret(
token, err := twitterstream.NewTokenGenerator().SetApiKeyAndSecret(
"your_twitter_api_key",
"your_twitter_api_secret",
).RequestBearerToken()
Expand All @@ -108,8 +108,8 @@ func deleteRules() {
panic("No token found!")
}

// With an access token, you can create a new twitter_stream and start deleting rules
api := twitter_stream.NewTwitterStream(token.AccessToken)
// With an access token, you can create a new twitterstream and start deleting rules
api := twitterstream.NewTwitterStream(token.AccessToken)

// You can delete rules by passing in stringified JSON with the rules you want to delete
// Learn more about deleting rules here: https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/post-tweets-search-stream-rules
Expand All @@ -133,7 +133,7 @@ func getRules() {
// Obtain an AccessToken
// You can use the token generator and provide your api key and secret
// or provide an access token you already have
token, err := twitter_stream.NewTokenGenerator().SetApiKeyAndSecret(
token, err := twitterstream.NewTokenGenerator().SetApiKeyAndSecret(
"your_twitter_api_key",
"your_twitter_api_secret",
).RequestBearerToken()
Expand All @@ -142,8 +142,8 @@ func getRules() {
panic("No token found!")
}

// With an access token, you can create a new twitter_stream and start getting your rules
api := twitter_stream.NewTwitterStream(token.AccessToken)
// With an access token, you can create a new twitterstream and start getting your rules
api := twitterstream.NewTwitterStream(token.AccessToken)

// You can get your rules by invoking GetRules
// Learn more about getting rules here: https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream-rules
Expand Down
2 changes: 1 addition & 1 deletion http_client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion http_client_mock.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import "net/http"

Expand Down
2 changes: 1 addition & 1 deletion rules.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion rules_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion stream.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion stream_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion stream_utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

//
// ❤️ Credit goes to the team at dghubble/go-twitter who originally built this code.
Expand Down
2 changes: 1 addition & 1 deletion stream_utils_mock.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion token_generator.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"encoding/base64"
Expand Down
2 changes: 1 addition & 1 deletion token_generator_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package twitter_stream
package twitterstream

import (
"bytes"
Expand Down
4 changes: 2 additions & 2 deletions twitter_stream.go → twitterstream.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package twitter_stream provides an easy way to stream tweets using Twitter's v2 Streaming API.
package twitter_stream
// Package twitterstream provides an easy way to stream tweets using Twitter's v2 Streaming API.
package twitterstream

type twitterApi struct {
Rules IRules
Expand Down

0 comments on commit 981d05d

Please sign in to comment.