reusable

package
v0.0.0-...-c438a7a Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2013 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OauthClient = oauth.Client{
	TemporaryCredentialRequestURI: "https://api.twitter.com/oauth/request_token",
	ResourceOwnerAuthorizationURI: "https://api.twitter.com/oauth/authenticate",
	TokenRequestURI:               "https://api.twitter.com/oauth/access_token",
	Credentials: oauth.Credentials{
		Token:  "Gqj79MWnbSlx8BZ8wDWYQ",
		Secret: "HyjatdbuRHjc0Y8YaddKEV16RekRnQJZ3M29tqQbs8",
	},
}

Functions

func GetConfig

func GetConfig(app string) map[string]string

func GetHostnameAndIps

func GetHostnameAndIps() (string, string)

func GetOauthCredentials

func GetOauthCredentials(config map[string]string) (*oauth.Credentials, bool, error)

func PostTweet

func PostTweet(token *oauth.Credentials, msg string) error

func SetConfig

func SetConfig(app string, config map[string]string)

Types

type Tweet

type Tweet struct {
	Text       string
	Identifier string `json:"id_str"`
	Source     string
	CreatedAt  string `json:"created_at"`
	User       struct {
		Name            string
		ScreenName      string `json:"screen_name"`
		FollowersCount  int    `json:"followers_count"`
		ProfileImageURL string `json:"profile_image_url"`
	}
	Place *struct {
		Id       string
		FullName string `json:"full_name"`
	}
	Entities struct {
		HashTags []struct {
			Indices [2]int
			Text    string
		}
		UserMentions []struct {
			Indices    [2]int
			ScreenName string `json:"screen_name"`
		} `json:"user_mentions"`
		Urls []struct {
			Indices [2]int
			Url     string
		}
	}
}

Jump to

Keyboard shortcuts

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