astitwitter

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

// TODO

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APIKey       = flag.String("twitter-api-key", "", "the api key")
	APISecretKey = flag.String("twitter-api-secret-key", "", "the api secret key")
)

Flags

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents the client

func New

func New(c Configuration) *Client

New creates a new client

func (*Client) UserTimeline

func (c *Client) UserTimeline(o UserTimelineOptions) (is []UserTimelineItem, err error)

type Configuration

type Configuration struct {
	APIKey       string `toml:"api_key"`
	APISecretKey string `toml:"api_secret_key"`
	Sender       astikit.HTTPSenderOptions
}

Configuration represents the lib's configuration

func FlagConfig

func FlagConfig() Configuration

FlagConfig generates a Configuration based on flags

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ErrorBody

type ErrorBody struct {
	Errors Errors `json:"errors"`
}

type Errors

type Errors []Error

func (Errors) Error

func (e Errors) Error() string

type TokenBody

type TokenBody struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
}

type UserTimelineEntities

type UserTimelineEntities struct {
	URLs []UserTimelineURL `json:"urls"`
}

type UserTimelineItem

type UserTimelineItem struct {
	CreatedAt UserTimelineTime     `json:"created_at"`
	Entities  UserTimelineEntities `json:"entities"`
	ID        int                  `json:"id"`
	Text      string               `json:"text"`
}

type UserTimelineOptions

type UserTimelineOptions struct {
	Count          *int
	ExcludeReplies *bool
	IncludeRts     *bool
	MaxID          *int
	ScreenName     string
	SinceID        *int
	TrimUser       *bool
	UserID         *int
}

type UserTimelineTime

type UserTimelineTime time.Time

func (*UserTimelineTime) UnmarshalText

func (t *UserTimelineTime) UnmarshalText(b []byte) error

type UserTimelineURL

type UserTimelineURL struct {
	ExpandedURL string `json:"expanded_url"`
	URL         string `json:"url"`
}

Jump to

Keyboard shortcuts

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