Documentation ¶
Overview ¶
Package dlsite provides access to DLSite work information.
Example ¶
f, err := dlsite.NewFetcher() if err != nil { panic(err) } defer f.Close() w, err := f.FetchWork("RJ123") if err != nil { panic(err) } fmt.Println(w.Title)
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchWorkOption ¶
type FetchWorkOption interface {
// contains filtered or unexported methods
}
A FetchWorkOption can be passed to FetchWork to configure fetching.
Deprecated; use the FetchWorkDirectly method instead.
func IgnoreCache ¶
func IgnoreCache() FetchWorkOption
IgnoreCache returns an option that ignores the cache when fetching. Updated work information is still added to the cache.
Deprecated; use the FetchWorkDirectly method instead.
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
A Fetcher can fetch DLSite work information.
func NewFetcher ¶
func NewFetcher(o ...FetcherOption) (*Fetcher, error)
NewFetcher creates a new Fetcher. The Fetcher scrapes DLSite and HVDB for information. The Fetcher keeps a cache in the user's XDG cache directory.
func (*Fetcher) FetchWork ¶
FetchWork fetches information for a DLSite work.
The FetchWorkOption argument is deprecated; use the FetchWorkDirectly method instead.
type FetcherOption ¶
type FetcherOption interface {
// contains filtered or unexported methods
}
A FetcherOption can be passed to NewFetcher to configure Fetcher creation.
func CachePath ¶
func CachePath(path string) FetcherOption
CachePath sets the cache path of the Fetcher. If path is empty, no cache file is used.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
dlsite
Command dlsite provides dlsite utilities.
|
Command dlsite provides dlsite utilities. |
Package codes contains the types for DLSite RJ codes and RE codes.
|
Package codes contains the types for DLSite RJ codes and RE codes. |
internal
|
|
caching
Package caching implements a key value caching store.
|
Package caching implements a key value caching store. |
dlsite
Package dlsite provides a Go API for accessing DLSite information.
|
Package dlsite provides a Go API for accessing DLSite information. |
hvdb
Package hvdb provides a Go API for accessing HVDB information.
|
Package hvdb provides a Go API for accessing HVDB information. |