setu

package
v0.0.0-...-d8cc314 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API = "https://api.lolicon.app/setu/v2"
)
View Source
const PATH = "data/setu/cache"
View Source
const PIXAPI_RE_TOKEN_KEY = "setu_pixivapi_refresh_token"
View Source
const PIXAPI_TOKEN_KEY = "setu_pixivapi_token"
View Source
const PIXAPI_TOKEN_TIME_KEY = "setu_pixivapi_time"
View Source
const PIXIV_IMG_PROXY = "https://pixiv.re"

Variables

This section is empty.

Functions

func Init

func Init(c Config)

func SendPixivBigPic

func SendPixivBigPic(ctx *ZeroBot.Ctx, data setu)

func SendPixivPic

func SendPixivPic(ctx *ZeroBot.Ctx, data setu)

func SendSomePic

func SendSomePic(ctx *ZeroBot.Ctx, data []setu)

Types

type Config

type Config struct {
	Enable        bool
	Server        string
	PixivUser     string
	PixivPassword string
}

type SetuPixivApi

type SetuPixivApi struct {
	App *pixiv.AppPixivAPI
}

func (*SetuPixivApi) AddPicToDB

func (pixivapi *SetuPixivApi) AddPicToDB(illust pixiv.Illust) error

func (*SetuPixivApi) DownloadPic

func (pixivapi *SetuPixivApi) DownloadPic(id uint64) error

func (*SetuPixivApi) GetPic

func (pixivapi *SetuPixivApi) GetPic(id, page uint64) ([]byte, error)

func (*SetuPixivApi) GetUserAllPic

func (pixivapi *SetuPixivApi) GetUserAllPic(uid uint64) int

func (*SetuPixivApi) Init

func (pixivapi *SetuPixivApi) Init()

func (*SetuPixivApi) Login

func (pixivapi *SetuPixivApi) Login(token, retoken string, time time.Time) error

func (*SetuPixivApi) SetTokenAndLogin

func (pixivapi *SetuPixivApi) SetTokenAndLogin(token, retoken string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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