javdbapi

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 11 Imported by: 0

README

javdbapi

Installation

go get -u github.com/RPbro/javdbapi

Getting started

see api_xxx_test.go.

Documentation

Index

Constants

View Source
const (
	PathHome     = "/"
	PathRankings = "/rankings/movies"
	PathMakers   = "/makers"
	PathActors   = "/actors"
	PathSearch   = "/search"
	PathReviews  = "/reviews/lastest"
)

path

View Source
const (
	HomeTypeAll         = ""
	HomeTypeCensored    = "censored"
	HomeTypeUncensored  = "uncensored"
	HomeTypeWestern     = "western"
	HomeFilterAll       = "0"
	HomeFilterDownload  = "1"
	HomeFilterCNSub     = "2"
	HomeFilterReview    = "3"
	HomeSortPublishDate = "1"
	HomeSortMagnetDate  = "2"
)

homes https://javdb.com/censored?vft=2

View Source
const (
	RankingsPeriodDaily    = "daily"
	RankingsPeriodWeekly   = "weekly"
	RankingsPeriodMonthly  = "monthly"
	RankingsTypeCensored   = "censored"
	RankingsTypeUncensored = "uncensored"
	RankingsTypeWestern    = "western"
)

rankings https://javdb.com/rankings/movies?p=daily&t=censored

View Source
const (
	MakersFilterAll      = ""
	MakersFilterPlayable = "playable"
	MakersFilterSingle   = "single"
	MakersFilterDownload = "download"
	MakersFilterCNSub    = "cnsub"
	MakersFilterPreview  = "preview"
)

https://javdb.com/makers/7R?f=download

View Source
const (
	ActorsFilterAll      = ""
	ActorsFilterPlayable = "p"
	ActorsFilterSingle   = "s"
	ActorsFilterDownload = "d"
	ActorsFilterCNSub    = "c"
)

actors https://javdb.com/actors/O2Q30

Variables

This section is empty.

Functions

func WithDomain

func WithDomain(domain string) func(c *Client)

func WithProxy

func WithProxy(addr string) func(c *Client)

func WithTimeout

func WithTimeout(timeout time.Duration) func(c *Client)

func WithUserAgent

func WithUserAgent(ua string) func(c *Client)

Types

type API

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

func (*API) First

func (a *API) First(link string) (*Item, error)

func (*API) Get

func (a *API) Get(t any) ([]*Item, error)

func (*API) SetDebug added in v0.1.0

func (a *API) SetDebug() *API

func (*API) SetFilter

func (a *API) SetFilter(filter Filter) *API

func (*API) SetLimit

func (a *API) SetLimit(limit int) *API

func (*API) SetPage

func (a *API) SetPage(page int) *API

func (*API) SetRandom added in v0.1.0

func (a *API) SetRandom() *API

type APIActors

type APIActors struct {
	Actor  string
	Filter []string
	// contains filtered or unexported fields
}

func (*APIActors) Get

func (a *APIActors) Get() ([]*Item, error)

func (*APIActors) SetActor

func (a *APIActors) SetActor(actor string) *APIActors

func (*APIActors) SetDebug added in v0.1.0

func (a *APIActors) SetDebug() *APIActors

func (*APIActors) SetFilter

func (a *APIActors) SetFilter(filter Filter) *APIActors

func (*APIActors) SetFilterAll

func (a *APIActors) SetFilterAll() *APIActors

func (*APIActors) SetFilterCNSub added in v0.0.9

func (a *APIActors) SetFilterCNSub() *APIActors

func (*APIActors) SetFilterDownload added in v0.0.9

func (a *APIActors) SetFilterDownload() *APIActors

func (*APIActors) SetFilterPlayable

func (a *APIActors) SetFilterPlayable() *APIActors

func (*APIActors) SetFilterSingle

func (a *APIActors) SetFilterSingle() *APIActors

func (*APIActors) SetLimit

func (a *APIActors) SetLimit(limit int) *APIActors

func (*APIActors) SetPage

func (a *APIActors) SetPage(page int) *APIActors

func (*APIActors) SetRandom added in v0.1.0

func (a *APIActors) SetRandom() *APIActors

type APIFirst

type APIFirst struct {
	Raw string
	// contains filtered or unexported fields
}

func (*APIFirst) First

func (a *APIFirst) First() (*Item, error)

func (*APIFirst) SetDebug added in v0.1.0

func (a *APIFirst) SetDebug() *APIFirst

func (*APIFirst) SetRaw

func (a *APIFirst) SetRaw(raw string) *APIFirst

type APIHome added in v0.0.9

type APIHome struct {
	Type   string
	Filter string
	Sort   string
	// contains filtered or unexported fields
}

func (*APIHome) Get added in v0.0.9

func (a *APIHome) Get() ([]*Item, error)

func (*APIHome) SetDebug added in v0.1.0

func (a *APIHome) SetDebug() *APIHome

func (*APIHome) SetFilter added in v0.0.9

func (a *APIHome) SetFilter(filter Filter) *APIHome

func (*APIHome) SetFilterAll added in v0.0.9

func (a *APIHome) SetFilterAll() *APIHome

func (*APIHome) SetFilterCNSub added in v0.0.9

func (a *APIHome) SetFilterCNSub() *APIHome

func (*APIHome) SetFilterDownload added in v0.0.9

func (a *APIHome) SetFilterDownload() *APIHome

func (*APIHome) SetFilterReview added in v0.0.9

func (a *APIHome) SetFilterReview() *APIHome

func (*APIHome) SetLimit added in v0.0.9

func (a *APIHome) SetLimit(limit int) *APIHome

func (*APIHome) SetPage added in v0.0.9

func (a *APIHome) SetPage(page int) *APIHome

func (*APIHome) SetRandom added in v0.1.0

func (a *APIHome) SetRandom() *APIHome

func (*APIHome) SetSortMagnetDate added in v0.0.9

func (a *APIHome) SetSortMagnetDate() *APIHome

func (*APIHome) SetSortPublishDate added in v0.0.9

func (a *APIHome) SetSortPublishDate() *APIHome

func (*APIHome) SetTypeAll added in v0.0.9

func (a *APIHome) SetTypeAll() *APIHome

func (*APIHome) SetTypeCensored added in v0.0.9

func (a *APIHome) SetTypeCensored() *APIHome

func (*APIHome) SetTypeUncensored added in v0.0.9

func (a *APIHome) SetTypeUncensored() *APIHome

func (*APIHome) SetTypeWestern added in v0.0.9

func (a *APIHome) SetTypeWestern() *APIHome

type APIMakers

type APIMakers struct {
	Maker  string
	Filter string
	// contains filtered or unexported fields
}

func (*APIMakers) Get

func (a *APIMakers) Get() ([]*Item, error)

func (*APIMakers) SetDebug added in v0.1.0

func (a *APIMakers) SetDebug() *APIMakers

func (*APIMakers) SetFilter

func (a *APIMakers) SetFilter(filter Filter) *APIMakers

func (*APIMakers) SetFilterAll

func (a *APIMakers) SetFilterAll() *APIMakers

func (*APIMakers) SetFilterCNSub added in v0.0.9

func (a *APIMakers) SetFilterCNSub() *APIMakers

func (*APIMakers) SetFilterDownload added in v0.0.9

func (a *APIMakers) SetFilterDownload() *APIMakers

func (*APIMakers) SetFilterPlayable

func (a *APIMakers) SetFilterPlayable() *APIMakers

func (*APIMakers) SetFilterPreview added in v0.0.9

func (a *APIMakers) SetFilterPreview() *APIMakers

func (*APIMakers) SetFilterSingle

func (a *APIMakers) SetFilterSingle() *APIMakers

func (*APIMakers) SetLimit

func (a *APIMakers) SetLimit(limit int) *APIMakers

func (*APIMakers) SetMaker

func (a *APIMakers) SetMaker(maker string) *APIMakers

func (*APIMakers) SetPage

func (a *APIMakers) SetPage(page int) *APIMakers

func (*APIMakers) SetRandom added in v0.1.0

func (a *APIMakers) SetRandom() *APIMakers

type APIRankings

type APIRankings struct {
	Period string
	Type   string
	// contains filtered or unexported fields
}

func (*APIRankings) Get

func (a *APIRankings) Get() ([]*Item, error)

func (*APIRankings) SetDebug added in v0.1.0

func (a *APIRankings) SetDebug() *APIRankings

func (*APIRankings) SetFilter

func (a *APIRankings) SetFilter(filter Filter) *APIRankings

func (*APIRankings) SetLimit

func (a *APIRankings) SetLimit(limit int) *APIRankings

func (*APIRankings) SetPage

func (a *APIRankings) SetPage(page int) *APIRankings

func (*APIRankings) SetPeriodDaily added in v0.0.9

func (a *APIRankings) SetPeriodDaily() *APIRankings

func (*APIRankings) SetPeriodMonthly added in v0.0.9

func (a *APIRankings) SetPeriodMonthly() *APIRankings

func (*APIRankings) SetPeriodWeekly added in v0.0.9

func (a *APIRankings) SetPeriodWeekly() *APIRankings

func (*APIRankings) SetRandom added in v0.1.0

func (a *APIRankings) SetRandom() *APIRankings

func (*APIRankings) SetTypeCensored added in v0.0.9

func (a *APIRankings) SetTypeCensored() *APIRankings

func (*APIRankings) SetTypeUncensored added in v0.0.9

func (a *APIRankings) SetTypeUncensored() *APIRankings

func (*APIRankings) SetTypeWestern added in v0.0.9

func (a *APIRankings) SetTypeWestern() *APIRankings

type APIRaw

type APIRaw struct {
	Raw string
	// contains filtered or unexported fields
}

func (*APIRaw) Get

func (a *APIRaw) Get() ([]*Item, error)

func (*APIRaw) SetDebug added in v0.1.0

func (a *APIRaw) SetDebug() *APIRaw

func (*APIRaw) SetFilter

func (a *APIRaw) SetFilter(filter Filter) *APIRaw

func (*APIRaw) SetLimit

func (a *APIRaw) SetLimit(limit int) *APIRaw

func (*APIRaw) SetPage

func (a *APIRaw) SetPage(page int) *APIRaw

func (*APIRaw) SetRandom added in v0.1.0

func (a *APIRaw) SetRandom() *APIRaw

func (*APIRaw) SetRaw

func (a *APIRaw) SetRaw(raw string) *APIRaw

type APISearch

type APISearch struct {
	Query string
	// contains filtered or unexported fields
}

func (*APISearch) Get

func (a *APISearch) Get() ([]*Item, error)

func (*APISearch) SetDebug added in v0.1.0

func (a *APISearch) SetDebug() *APISearch

func (*APISearch) SetFilter

func (a *APISearch) SetFilter(filter Filter) *APISearch

func (*APISearch) SetLimit

func (a *APISearch) SetLimit(limit int) *APISearch

func (*APISearch) SetPage

func (a *APISearch) SetPage(page int) *APISearch

func (*APISearch) SetQuery

func (a *APISearch) SetQuery(query string) *APISearch

func (*APISearch) SetRandom added in v0.1.0

func (a *APISearch) SetRandom() *APISearch

type Client

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

func NewClient

func NewClient(options ...option) *Client

func (*Client) GetActors

func (c *Client) GetActors() *APIActors

func (*Client) GetFirst

func (c *Client) GetFirst() *APIFirst

func (*Client) GetHome added in v0.0.9

func (c *Client) GetHome() *APIHome

func (*Client) GetMakers

func (c *Client) GetMakers() *APIMakers

func (*Client) GetRankings

func (c *Client) GetRankings() *APIRankings

func (*Client) GetRaw

func (c *Client) GetRaw() *APIRaw

func (*Client) GetSearch

func (c *Client) GetSearch() *APISearch

type Filter

type Filter struct {

	// list
	ScoreGT       float64
	ScoreLT       float64
	ScoreCountGT  int
	ScoreCountLT  int
	PubDateBefore time.Time
	PubDateAfter  time.Time
	HasSubtitle   bool

	// details
	HasPreview  bool
	ActorsIn    []string
	ActorsNotIn []string
	TagsIn      []string
	TagsNotIn   []string
	HasPics     bool
	HasMagnets  bool

	// reviews
	HasReviews bool

	// result
	ResultRegexpMagnets string
	// contains filtered or unexported fields
}

type Item added in v0.0.9

type Item struct {
	ID string // path

	Title       string
	Code        string
	Cover       string
	Path        string
	Score       float64
	ScoreCount  int
	PubDate     time.Time
	HasSubtitle bool

	Preview string
	Actors  []string
	Tags    []string
	Pics    []string
	Magnets []string

	Reviews []string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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