twitter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	types.BaseAPI
	Config     types.TwitterConfig
	LastCalled time.Time `json:"-"`
	// This is the object we get from the backend API - we could possible remove this and just have the ResponseObject
	DataObject TwitterResponse `json:"-"`
	// This is the object we are passing to the frontend - only need to rebuild it when its stale
	ResponseObject types.TwitterResponse `json:"-"`
	ValidCache     bool
}

API for twitter

func NewAPI

func NewAPI(sockets map[types.Socket]bool, pool types.Pool, id uuid.UUID) *API

NewAPI creates a new API

func (*API) Configure

func (a *API) Configure(message types.ClientMessage) error

Configure based on client message

func (*API) Data

func (a *API) Data() (interface{}, error)

Data performs a bulk of the computational logic

func (*API) Run

func (a *API) Run()

Run main entry point to the API

type TwitterResponse

type TwitterResponse struct {
	Tweets []twitter.Tweet
}

func (*TwitterResponse) Transform

func (o *TwitterResponse) Transform() interface{}

func (*TwitterResponse) Update

func (o *TwitterResponse) Update(arguments interface{}) error

Jump to

Keyboard shortcuts

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