pikpak_share

package
v3.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addition

type Addition struct {
	driver.RootID
	Username string `json:"username" required:"true"`
	Password string `json:"password" required:"true"`
	ShareId  string `json:"share_id" required:"true"`
	SharePwd string `json:"share_pwd"`
}

type File

type File struct {
	Id             string    `json:"id"`
	ShareId        string    `json:"share_id"`
	Kind           string    `json:"kind"`
	Name           string    `json:"name"`
	ModifiedTime   time.Time `json:"modified_time"`
	Size           string    `json:"size"`
	ThumbnailLink  string    `json:"thumbnail_link"`
	WebContentLink string    `json:"web_content_link"`
	Medias         []Media   `json:"medias"`
}

type Media

type Media struct {
	MediaId   string `json:"media_id"`
	MediaName string `json:"media_name"`
	Video     struct {
		Height     int    `json:"height"`
		Width      int    `json:"width"`
		Duration   int    `json:"duration"`
		BitRate    int    `json:"bit_rate"`
		FrameRate  int    `json:"frame_rate"`
		VideoCodec string `json:"video_codec"`
		AudioCodec string `json:"audio_codec"`
		VideoType  string `json:"video_type"`
	} `json:"video"`
	Link struct {
		Url    string    `json:"url"`
		Token  string    `json:"token"`
		Expire time.Time `json:"expire"`
	} `json:"link"`
	NeedMoreQuota  bool          `json:"need_more_quota"`
	VipTypes       []interface{} `json:"vip_types"`
	RedirectLink   string        `json:"redirect_link"`
	IconLink       string        `json:"icon_link"`
	IsDefault      bool          `json:"is_default"`
	Priority       int           `json:"priority"`
	IsOrigin       bool          `json:"is_origin"`
	ResolutionName string        `json:"resolution_name"`
	IsVisible      bool          `json:"is_visible"`
	Category       string        `json:"category"`
}

type PikPakShare

type PikPakShare struct {
	model.Storage
	Addition
	RefreshToken  string
	AccessToken   string
	PassCodeToken string
}

func (*PikPakShare) Config

func (d *PikPakShare) Config() driver.Config

func (*PikPakShare) Drop

func (d *PikPakShare) Drop(ctx context.Context) error

func (*PikPakShare) GetAddition

func (d *PikPakShare) GetAddition() driver.Additional

func (*PikPakShare) Init

func (d *PikPakShare) Init(ctx context.Context) error
func (d *PikPakShare) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)

func (*PikPakShare) List

func (d *PikPakShare) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)

type RespErr

type RespErr struct {
	ErrorCode int    `json:"error_code"`
	Error     string `json:"error"`
}

type ShareResp

type ShareResp struct {
	ShareStatus     string `json:"share_status"`
	ShareStatusText string `json:"share_status_text"`
	FileInfo        File   `json:"file_info"`
	Files           []File `json:"files"`
	NextPageToken   string `json:"next_page_token"`
	PassCodeToken   string `json:"pass_code_token"`
}

Jump to

Keyboard shortcuts

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