Documentation ¶
Index ¶
- Constants
- func GetCitations(doi, file, mailto string) citation.Citation
- type Client
- type ClientType
- type CrossRef
- type CrossRefDate
- type CrossRefFields
- type CrossRefInstitution
- type CrossRefLink
- type DataCite
- type DataCiteContainer
- type DataCiteContributor
- type DataCiteFields
- type DataciteTitle
- type DataciteTypes
Constants ¶
View Source
const ( CrossRefUrl string = "https://api.crossref.org" DataCiteUrl string = "https://api.datacite.org" )
Variables ¶
This section is empty.
Functions ¶
func GetCitations ¶
returns Citation from crossref or datacite
Types ¶
type Client ¶
type Client struct { Typ ClientType Api string Path string RateLimitLimit int RateLimitInterval int Status string StatusCode int LastRequest time.Time }
crossref / datacite client taken and modified from https://github.com/caltechlibrary/dataciteapi
type ClientType ¶
type ClientType int
const ( CrossRefClient ClientType = 0 DataCiteClient ClientType = 2 )
type CrossRef ¶
type CrossRef struct { Status string `json:"status"` MessageType string `json:"message-type"` MessageVersion string `json:"message-version"` Message CrossRefFields `json:"message"` }
type CrossRefDate ¶
type CrossRefDate struct {
Parts [][]int `json:"date-parts"` // date parts as array
}
type CrossRefFields ¶
type CrossRefFields struct { Author []citation.CitationAuthor `json:"author"` // authors ContainerTitle []string `json:"container-title"` // title of journal or book DOI string `json:"DOI"` // DOI Editor []citation.CitationAuthor `json:"editor"` // editors EditionNumber string `json:"edition-number"` // edition number ISBN []string `json:"ISBN"` // book isbn ISSN []string `json:"ISSN"` // issn Institution CrossRefInstitution `json:"institution"` // institution Issue string `json:"issue"` // issue Link []CrossRefLink `json:"link"` // url to the resource Page string `json:"page"` // pages Published CrossRefDate `json:"published"` // publication date Publisher string `json:"publisher"` // publisher PublisherLocation string `json:"publisher-location"` // location of the publisher Title []string `json:"title"` // title of the work Type string `json:"type"` // resource type URL string `json:"URL"` // doi url Volume string `json:"volume"` // volume }
type CrossRefInstitution ¶
type CrossRefLink ¶
type CrossRefLink struct {
URL string `json:"URL"` // url
}
type DataCite ¶
type DataCite struct { Data struct { Attributes DataCiteFields `json:"attributes"` } `json:"data"` }
type DataCiteContainer ¶
type DataCiteContributor ¶
type DataCiteFields ¶
type DataCiteFields struct { Container DataCiteContainer `json:"container"` Contributors []DataCiteContributor `json:"contributors"` Creators []DataCiteContributor `json:"creators"` Doi string `json:"doi"` Identifier string `json:"identifier"` Name string `json:"name"` Publisher string `json:"publisher"` Title []DataciteTitle `json:"titles"` Types DataciteTypes `json:"types"` Url string `json:"url"` PublicationYear int `json:"publicationYear"` }
type DataciteTitle ¶
type DataciteTitle struct {
Title string `json:"title"`
}
type DataciteTypes ¶
type DataciteTypes struct {
Bibtex string `json:"bibtex"`
}
Click to show internal directories.
Click to hide internal directories.