twitter

package
v1.44.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2022 License: OSL-3.0 Imports: 9 Imported by: 0

README

Twitter

How to get Bearer Token?

Visit this page:

https://twitter.com

and you should see a request like this:

GET /i/api/1.1/hashflags.json HTTP/1.1
Host: twitter.com
x-guest-token: 1471285364216246275
authorization: Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs=1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA

Documentation

Index

Constants

View Source
const API = "https://api.twitter.com/1.1"

Variables

This section is empty.

Functions

func Parse added in v1.42.6

func Parse(id string) (uint64, error)

Types

type Guest added in v1.42.5

type Guest struct {
	Guest_Token string
}

func NewGuest added in v1.42.5

func NewGuest() (*Guest, error)

type Space added in v1.42.5

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

func NewSpace added in v1.42.5

func NewSpace(guest *Guest, id string) (*Space, error)

func (Space) Admins added in v1.42.5

func (s Space) Admins() string

func (Space) Duration added in v1.42.5

func (s Space) Duration() time.Duration

func (Space) Stream added in v1.42.5

func (s Space) Stream(guest *Guest) (*Stream, error)

func (Space) Title added in v1.42.5

func (s Space) Title() string

type Status

type Status struct {
	Extended_Entities struct {
		Media []struct {
			Video_Info struct {
				Variants []Variant
			}
		}
	}
	User struct {
		Name string
	}
}

func NewStatus added in v1.42.5

func NewStatus(guest *Guest, id uint64) (*Status, error)

func (Status) Variants added in v1.42.4

func (s Status) Variants() []Variant

type Stream added in v1.42.5

type Stream struct {
	Source struct {
		Location string
	}
}

func (Stream) Chunks added in v1.42.5

func (s Stream) Chunks() ([]m3u.Format, error)

type URL

type URL string

func (URL) String

func (u URL) String() string

type Variant added in v1.42.4

type Variant struct {
	Content_Type string
	URL          URL
}

Jump to

Keyboard shortcuts

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