import "bitbucket.org/iharsuvorau/orcid"
Package orcid provides an API for research works fetching using the ORCID Public HTTP API.
Check the ORCID docs: https://members.orcid.org/api/about-public-api.
UpdateContributorsLine populates a slice of works with an URI for external ids if its value is missing.
UpdateExternalIDsURL populates a slice of works with an URI for external ids if its value is missing.
UpdateMarkup is a tricky function and relies on the underlying template which is passed by a client. So the client must be aware of what is going on here to effectively render works.
Activity is the ORCID <activities:works> XML element.
Citation is an ORCID citation field.
type Client struct {
// contains filtered or unexported fields
}
Client is the ORCID API client for requests handling.
New return a client.
Contributor is an ORCID contributor.
ID is an ORCID.
IDFromURL creates ID from an URL.
IsEmpty checks if the ID is an empty string.
String returns ID.
type Work struct { Created time.Time `xml:"created-date"` Modified time.Time `xml:"last-modified-date"` SourceName string `xml:"source>source-name"` Year int `xml:"publication-date>year"` Month int `xml:"publication-date>month"` Day int `xml:"publication-date>day"` // Path to detailed information about the work. Path string `xml:"path,attr"` Title template.HTML `xml:"title>title"` JournalTitle string `xml:"journal-title"` Citation *Citation `xml:"citation"` Type string `xml:"type"` ExternalIDs []struct { Type string `xml:"external-id-type"` // doi = Digital Object Identifier, eid = Scopus Value string `xml:"external-id-value"` URL template.URL `xml:"external-id-url"` } `xml:"external-ids>external-id"` URI string `xml:"url"` Contributors []*Contributor `xml:"contributors>contributor"` DoiURI template.URL ContributorsLine string }
Work is the ORCID <work:work> and <work:work-summary> XML elements.
FetchWorks downloads publications from ORCID.
func ReadWorks(path string, mods ...WorksModifier) ([]*Work, error)
ReadWorks decodes publications from an XML-file with publications saved as top-level elements. Basically, it decodes an output of xml.Marshal([]*Work) back into []*Work.
ExternalIDValue returns ExternalID.Value by ExternalID.Type.
WorksModifier is a general type for any function you can pass to FetchWorks or ReadWorks to mutate the works with any arbitrary logic which a user of a library might need.
Package orcid imports 14 packages (graph). Updated 2019-12-16. Refresh now. Tools for package owners.