twitter

package
v0.0.0-...-a7c1c26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2014 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package twitter provides a radically simplified Twitter API.

To use this package, you must create your own Twitter app.

Instructions:

  • Goto http://dev.twitter.com
  • Sign in
  • Click on your profile icon and goto “My applications”
  • Click “Create a new application”
  • Fill out the form (don’t mind the callback URL)
  • After creating your app, click on “Create my access token”

Now you have all the values needed to fill the `Credentials` struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hashtags

func Hashtags(cred *Credentials, Hashtags ...string) (<-chan *Tweet, error)

Hashtags returns a channel over which tweets can be received, which match at least one of the given hashtags.

Types

type Credentials

type Credentials struct {
	ConsumerKey    string `json:"consumer_key"`
	ConsumerSecret string `json:"consumer_secret"`
	AccessToken    string `json:"access_token"`
	AccessSecret   string `json:"access_secret"`
}

type Tweet

type Tweet struct {
	Text   string
	Date   time.Time
	Author TwitterUser
}

type TwitterUser

type TwitterUser struct {
	Name           string
	ScreenName     string
	ProfilePicture image.Image
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL