Documentation ¶
Index ¶
- Variables
- type Cookies
- func (c *Cookies) GeneratePushKeys() error
- func (c *Cookies) Get(key MetaCookieName) string
- func (c *Cookies) GetMissingCookieNames() []MetaCookieName
- func (c *Cookies) GetUserID() int64
- func (c *Cookies) GetViewports() (width, height string)
- func (c *Cookies) IsLoggedIn() bool
- func (c *Cookies) MarshalJSON() ([]byte, error)
- func (c *Cookies) Set(key MetaCookieName, value string)
- func (c *Cookies) String() string
- func (c *Cookies) UnmarshalJSON(data []byte) error
- func (c *Cookies) UpdateFromResponse(r *http.Response)
- func (c *Cookies) UpdateValues(newValues map[string]string)
- type MetaCookieName
- type PushKeys
- type PushKeysPublic
Constants ¶
This section is empty.
Variables ¶
View Source
var FBRequiredCookies = []MetaCookieName{FBCookieXS, FBCookieCUser}
View Source
var IGRequiredCookies = []MetaCookieName{IGCookieSessionID, IGCookieCSRFToken, IGCookieDSUserID, IGCookieMachineID, IGCookieDeviceID}
Functions ¶
This section is empty.
Types ¶
type Cookies ¶
type Cookies struct { Platform types.Platform PushKeys *PushKeys IGWWWClaim string // contains filtered or unexported fields }
func (*Cookies) GeneratePushKeys ¶
func (*Cookies) Get ¶
func (c *Cookies) Get(key MetaCookieName) string
func (*Cookies) GetMissingCookieNames ¶
func (c *Cookies) GetMissingCookieNames() []MetaCookieName
func (*Cookies) GetViewports ¶
func (*Cookies) IsLoggedIn ¶
func (*Cookies) MarshalJSON ¶
func (*Cookies) Set ¶
func (c *Cookies) Set(key MetaCookieName, value string)
func (*Cookies) UnmarshalJSON ¶
func (*Cookies) UpdateFromResponse ¶
func (*Cookies) UpdateValues ¶
type MetaCookieName ¶
type MetaCookieName string
const ( // MetaCookieDatr seems to be a session ID that's displayed in security settings MetaCookieDatr MetaCookieName = "datr" MetaCookieDevicePixelRatio MetaCookieName = "dpr" // FBCookieXS is the main session cookie for Facebook FBCookieXS MetaCookieName = "xs" // FBCookieCUser contains the user ID for Facebook FBCookieCUser MetaCookieName = "c_user" FBCookieSB MetaCookieName = "sb" FBCookieFR MetaCookieName = "fr" FBCookieWindowDimensions MetaCookieName = "wd" FBCookiePresence MetaCookieName = "presence" FBCookieOO MetaCookieName = "oo" // IGCookieSessionID is the main session cookie for Instagram IGCookieSessionID MetaCookieName = "sessionid" // IGCookieCSRFToken is the CSRF token for Instagram which must match the one in request headers IGCookieCSRFToken MetaCookieName = "csrftoken" // IGCookieDSUserID contains the user ID for Instagram IGCookieDSUserID MetaCookieName = "ds_user_id" IGCookieMachineID MetaCookieName = "mid" IGCookieDeviceID MetaCookieName = "ig_did" )
type PushKeys ¶
type PushKeys struct { Public PushKeysPublic Private string }
type PushKeysPublic ¶
Click to show internal directories.
Click to hide internal directories.