json

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activate

type Activate struct {
	GuestToken string `json:"guest_token"`
}

type Adaptive

type Adaptive struct {
	GlobalObjects GlobalObjects `json:"globalObjects"`
	Timeline      Timeline      `json:"timeline"`
}

func (*Adaptive) FindCursor

func (j *Adaptive) FindCursor() (string, error)

type AddEntries

type AddEntries struct {
	Entries []Entry `json:"entries"`
}

type BoundingBox

type BoundingBox struct {
	Type        string      `json:"type"`
	Coordinates [][]LongLat `json:"coordinates"`
}

type Content

type Content struct {
	Operation Operation `json:"operation"`
	Item      Item      `json:"item"`
}

type ContentTweet

type ContentTweet struct {
	Id          string `json":id"`
	DisplayType string `json:"displayType"`
}

type Coordinates

type Coordinates struct {
	Type        string  `json:"type"`
	Coordinates LongLat `json:"coordinates"`
}

type Cursor

type Cursor struct {
	Value      string `json:"value"`
	CursorType string `json:"cursorType"`
}

type Entry

type Entry struct {
	EntryId   string  `json:"entryId"`
	SortIndex string  `json:"sortIndex"`
	Content   Content `json:"content"`
}

type Error

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

type ErrorResponse

type ErrorResponse struct {
	Errors []Error `json:"errors"`
}

func (*ErrorResponse) Error

func (res *ErrorResponse) Error() string

type Geo

type Geo struct {
	Type        string  `json:"type"`
	Coordinates LatLong `json:"coordinates"`
}

type GlobalObjects

type GlobalObjects struct {
	Tweets map[string]Tweet `json:"tweets"`
	Users  map[string]User  `json:"users"`
}

type Instruction

type Instruction struct {
	AddEntries   AddEntries   `json:"addEntries"`
	ReplaceEntry ReplaceEntry `json:"replaceEntry"`
}

type Item

type Item struct {
	Content ItemContent `json:"content"`
}

type ItemContent

type ItemContent struct {
	Tweet ContentTweet `json:"tweet"`
}

type LatLong

type LatLong [2]float64

func (LatLong) Latitude

func (l LatLong) Latitude() float64

func (LatLong) Longitude

func (l LatLong) Longitude() float64

func (LatLong) String

func (l LatLong) String() string

type LongLat

type LongLat [2]float64

func (LongLat) Latitude

func (l LongLat) Latitude() float64

func (LongLat) Longitude

func (l LongLat) Longitude() float64

func (LongLat) String

func (l LongLat) String() string

type Operation

type Operation struct {
	Cursor Cursor `json:"cursor"`
}

type Place

type Place struct {
	Id          string      `json:"id"`
	Url         string      `json:"url"`
	PlaceType   string      `json:"place_type"`
	Name        string      `json:"name"`
	FullName    string      `json:"full_name"`
	CountryCode string      `json:"country_code"`
	Country     string      `json:"country"`
	BoundingBox BoundingBox `json:"bounding_box"`
}

type ReplaceEntry

type ReplaceEntry struct {
	EntryIdToReplace string `json:"entryIdToReplace"`
	Entry            Entry  `json:"entry"`
}

type RubyDate

type RubyDate time.Time

func (*RubyDate) Equal

func (t *RubyDate) Equal(u RubyDate) bool

func (*RubyDate) String

func (t *RubyDate) String() string

func (*RubyDate) UnmarshalJSON

func (t *RubyDate) UnmarshalJSON(buf []byte) error

type Timeline

type Timeline struct {
	Id           string        `json:"id"`
	Instructions []Instruction `json:"instructions"`
}

type Tweet

type Tweet struct {
	Id            uint64       `json:"id"`
	UserId        uint64       `json:"user_id"`
	FullText      string       `json:"full_text"`
	RetweetCount  uint64       `json:"retweet_count"`
	FavoriteCount uint64       `json:"favorite_count"`
	ReplyCount    uint64       `json:"reply_count"`
	QuoteCount    uint64       `json:"quote_count"`
	Geo           *Geo         `json:"geo"` // deprecated
	Coordinates   *Coordinates `json:"coordinates"`
	Place         *Place       `json:"place"`
	Lang          string       `json:"lang"`
	Source        string       `json:"source"`
	CreatedAt     RubyDate     `json:"created_at"`
}

type User

type User struct {
	Id              uint64   `json:"id"`
	Name            string   `json:"name"`
	ScreenName      string   `json:"screen_name"`
	Location        string   `json:"location"`
	Description     string   `json:"description"`
	Url             string   `json:"url"`
	FollowersCount  uint64   `json:"followers_count"`
	FriendsCount    uint64   `json:"friends_count"`
	ListedCount     uint64   `json:"listed_count"`
	FavouritesCount uint64   `json:"favourites_count"`
	StatusesCount   uint64   `json:"statuses_count"`
	MediaCount      uint64   `json:"media_count"`
	Verified        bool     `json:"verified"`
	CreatedAt       RubyDate `json:"created_at"`
}

Jump to

Keyboard shortcuts

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