Skip to content

Commit

Permalink
Move Tokener interface into client.go file.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAdam committed Sep 15, 2014
1 parent e594cd4 commit 9e36a7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ type TweetUserMention struct {
Indices []uint `json:"indices"`
}

type Tokener interface {
// Token returns a valid user access token to provide access to Twitter.
// This method also needs to set the app token so valid requests can be made.
Token(*oauth.Client) (*oauth.Credentials, error)
}

// NewClient creates a new StreamClient for access to the Twitter API (both stream & rest).
func NewClient() (client *StreamClient) {
client = new(StreamClient)
Expand Down
6 changes: 0 additions & 6 deletions tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ var (
tokenFilePermission = os.FileMode(0600)
)

type Tokener interface {
// Token returns a valid user access token to provide access to Twitter.
// This method also needs to set the app token so valid requests can be made.
Token(*oauth.Client) (*oauth.Credentials, error)
}

type ClientTokens struct {
// Location to our token storage file (JSON format)
TokenFile string `json:"-"`
Expand Down

0 comments on commit 9e36a7a

Please sign in to comment.