gista_helpers

package
v0.0.0-...-12f777f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(address, filePath string) (err error)

func DownloadItem

func DownloadItem(i *models.Item, path *string) (errs map[string]error)

func GetDashManifestBestMediaUrl

func GetDashManifestBestMediaUrl(dashManifest string) (address string)

func GetItemBestQualityUrl

func GetItemBestQualityUrl(i *models.Item) (info map[string]map[string]string, err error)

func GetMediaBestQualityUrl

func GetMediaBestQualityUrl(i interface{}) (url string, err error)

func ShortCodeToMediaId

func ShortCodeToMediaId(shortCode string) int64

Types

type ChallengeResponse

type ChallengeResponse struct {
	Config      *ChallengeResponseConfig    `json:"config"`
	EntryData   *ChallengeResponseEntryData `json:"entry_data"`
	RollOutHash string                      `json:"rollout_hash"`
}

type ChallengeResponseConfig

type ChallengeResponseConfig struct {
	CsrfToken string `json:"csrf_token"`
}

type ChallengeResponseEntryData

type ChallengeResponseEntryData struct {
	Challenge *[]ChallengeResponseEntryDataChallenge `json:"Challenge"`
}

type ChallengeResponseEntryDataChallenge

type ChallengeResponseEntryDataChallenge struct {
	ChallengeType string                                         `json:"challengeType"`
	Fields        *ChallengeResponseEntryDataChallengeFields     `json:"fields"`
	Navigation    *ChallengeResponseEntryDataChallengeNavigation `json:"navigation"`
	Type          string                                         `json:"type"`
}

type ChallengeResponseEntryDataChallengeFields

type ChallengeResponseEntryDataChallengeFields struct {
	Choice string `json:"choice"`
	Email  string `json:"email"`
}

type ChallengeResponseEntryDataChallengeNavigation

type ChallengeResponseEntryDataChallengeNavigation struct {
	Forward string `json:"forward"`
	Replay  string `json:"replay"`
	Dismiss string `json:"dismiss"`
}

type ChallengeSolver

type ChallengeSolver struct {
	// contains filtered or unexported fields
}

func NewChallengeSolver

func NewChallengeSolver() *ChallengeSolver

func (*ChallengeSolver) GetChallengeByUrl

func (ncs *ChallengeSolver) GetChallengeByUrl(address string) (response *ChallengeResponse, err error)

func (*ChallengeSolver) GetSolveChallengeByEmail

func (ncs *ChallengeSolver) GetSolveChallengeByEmail(address, csrf, ajaxId string) (response *PostChallengeChoiceResponse, err error)

func (*ChallengeSolver) SolveChallenge

func (ncs *ChallengeSolver) SolveChallenge(address, csrf, ajaxId, securityCode string) (response *SolveChallengeResponse, err error)

type PostChallengeChoiceResponse

type PostChallengeChoiceResponse struct {
	Location      string                                `json:"location"`
	ChallengeType string                                `json:"challengeType"`
	ExtraData     *PostChallengeChoiceResponseExtraData `json:"extraData"`
	Type          string                                `json:"type"`
	Status        string                                `json:"status"`
}

type PostChallengeChoiceResponseExtraData

type PostChallengeChoiceResponseExtraData struct {
	TypeName string                                         `json:"__typename"`
	Content  *[]PostChallengeChoiceResponseExtraDataContent `json:"content"`
}

type PostChallengeChoiceResponseExtraDataContent

type PostChallengeChoiceResponseExtraDataContent struct {
	TypeName string `json:"__typename"`
	Title    string `json:"title"`
	Text     string `json:"text"`
}

type SolveChallengeResponse

type SolveChallengeResponse struct {
	Message   string                           `json:"message"`
	Challenge *SolveChallengeResponseChallenge `json:"challenge"`
	Location  string                           `json:"location"`
	Type      string                           `json:"type"`
	Status    string                           `json:"status"`
}

type SolveChallengeResponseChallenge

type SolveChallengeResponseChallenge struct {
	ChallengeType string   `json:"challengeType"`
	Errors        []string `json:"errors"`
}

Jump to

Keyboard shortcuts

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