unpaywall

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is an http client for calling OAB endpoit

func NewClient

func NewClient(email string) *Client

NewClient returns new OABClient

func (*Client) GetDOI

func (c *Client) GetDOI(doi string) (*DOIResp, error)

type DOIResp

type DOIResp struct {
	DOI           string `json:"doi"`
	Title         string
	Genre         string
	Year          int
	PublishedDate string `json:"published_date"`
	JournalName   string `json:"journal_name"`
	OAStatus      string `json:"oa_status"`
	BestOALink    struct {
		URL      string `json:"url"`
		URLpage  string `json:"url_for_landing_page"`
		URLpdf   string `json:"url_for_pdf"`
		Version  string
		License  string
		HostType string `json:"host_type"`
	} `json:"best_oa_location"`
}

Jump to

Keyboard shortcuts

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