twitter

package
v1.49.8 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: OSL-3.0 Imports: 8 Imported by: 0

README

Twitter

How to get Bearer Token?

Make a request to this page, without Cookies:

https://twitter.com

in the response should be something like this:

"authorization":"Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZ...

How to get Space Persisted Query?

Visit a spaces link:

https://twitter.com/i/spaces/1kvKpAdOwXgGE

and look at the requests.

Why does this exist?

2022-02-25

https://github.com/89z/mech/issues/12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLevel format.LogLevel

Functions

This section is empty.

Types

type AudioSpace added in v1.49.0

type AudioSpace struct {
	Metadata struct {
		Media_Key  string
		Title      string
		Started_At int64
		Ended_At   int64 `json:"ended_at,string"`
	}
	Participants struct {
		Admins []struct {
			Display_Name string
		}
	}
}

func (AudioSpace) Admins added in v1.49.0

func (a AudioSpace) Admins() string

func (AudioSpace) Base added in v1.49.0

func (a AudioSpace) Base() string

func (AudioSpace) Duration added in v1.49.0

func (a AudioSpace) Duration() time.Duration

func (AudioSpace) String added in v1.49.0

func (a AudioSpace) String() string

func (AudioSpace) Time added in v1.49.0

func (a AudioSpace) Time() time.Time

type Guest added in v1.42.5

type Guest struct {
	Guest_Token string
}

func NewGuest added in v1.42.5

func NewGuest() (*Guest, error)

func (Guest) AudioSpace added in v1.49.0

func (g Guest) AudioSpace(id string) (*AudioSpace, error)

func (Guest) Search added in v1.48.4

func (g Guest) Search(query string) (*Search, error)

func (Guest) SearchCount added in v1.49.6

func (g Guest) SearchCount(query string, count int) (*Search, error)

func (Guest) Source added in v1.49.0

func (g Guest) Source(space *AudioSpace) (*Source, error)

func (Guest) Status added in v1.48.4

func (g Guest) Status(id int64) (*Status, error)

type Media added in v1.46.8

type Media struct {
	Media_URL     string
	Original_Info struct {
		Width  int64
		Height int64
	}
	Video_Info struct {
		Variants []Variant
	}
}

func (Media) String added in v1.46.8

func (m Media) String() string

func (Media) Variants added in v1.46.8

func (m Media) Variants() []Variant
type Search struct {
	GlobalObjects struct {
		Tweets map[int64]struct {
			Entities struct {
				URLs []struct {
					Expanded_URL string
				}
			}
		}
	}
}

func (Search) String added in v1.49.2

func (s Search) String() string

type Source added in v1.49.0

type Source struct {
	Location string // Segment
}

type Status

type Status struct {
	Created_At string
	User       struct {
		Screen_Name string
		Name        string
	}
	Full_Text         string
	Extended_Entities struct {
		Media []Media
	}
}

func (Status) Base added in v1.49.6

func (s Status) Base(id int64) string

func (Status) String added in v1.46.8

func (s Status) String() string

type Variant added in v1.42.4

type Variant struct {
	Bitrate      int64
	Content_Type string
	URL          string
}

func (Variant) Ext added in v1.49.6

func (v Variant) Ext() (string, error)

func (Variant) String added in v1.46.8

func (v Variant) String() string

Jump to

Keyboard shortcuts

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