Documentation
¶
Overview ¶
Copyright 2025 National Technology and Engineering Solutions of Sandia SPDX-License-Identifier: BSD-3-Clause
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleEntry ¶
type ArticleEntry struct {
Identifier string `json:"dc:identifier"`
Title string `json:"dc:title"`
Creator []string `json:"dc:creator"`
PublicationName string `json:"prism:publicationName"`
CoverDate string `json:"prism:coverDate"`
DOI string `json:"prism:doi"`
PII string `json:"pii"`
OpenAccess bool `json:"openaccess"`
Link []Link `json:"link"`
Authors []map[string]string `json:"authors,omitempty"`
}
ArticleEntry represents a single article in the search results
type ArticleMetadataParams ¶
type ArticleMetadataParams struct {
View string // STANDARD or COMPLETE (default: STANDARD)
Field string // Comma-separated list of specific fields to return
Start int // Results offset (starting position)
Count int // Maximum number of results to return
}
ArticleMetadataParams contains optional parameters for the article metadata search
type ArticleMetadataResponse ¶
type ArticleMetadataResponse struct {
SearchResults struct {
TotalResults string `json:"opensearch:totalResults"`
StartIndex string `json:"opensearch:startIndex"`
ItemsPerPage string `json:"opensearch:itemsPerPage"`
Query map[string]interface{} `json:"opensearch:Query"`
Link []Link `json:"link"`
Entry []ArticleEntry `json:"entry"`
} `json:"search-results"`
}
ArticleMetadataResponse represents the API response structure
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ArticleMetadata ¶
func (c *Client) ArticleMetadata(query *Query, params *ArticleMetadataParams) (*ArticleMetadataResponse, error)
ArticleMetadata searches for articles in ScienceDirect
func (*Client) ArticleMetadataRaw ¶
func (c *Client) ArticleMetadataRaw(query string, params *ArticleMetadataParams) (*ArticleMetadataResponse, error)
ArticleMetadataRaw searches performs an Article Metadata query in ScienceDirect
func (*Client) Search ¶
func (c *Client) Search(query *SearchQuery) (*SearchResponse, error)
Search searches for articles in ScienceDirect API v2
type Link ¶
type Link struct {
Ref string `json:"@ref"`
Href string `json:"@href"`
Type string `json:"@type,omitempty"`
}
Link represents a link in the response
type ResponseAuthor ¶ added in v0.2.0
type SearchQuery ¶
type SearchResponse ¶
type SearchResponse struct {
ResultsFound int `json:"resultsFound"`
Results []*SearchResult `json:"results"`
Message string `json:"message"`
}
SearchResponse represents the top-level API response
type SearchResult ¶
type SearchResult struct {
Authors []ResponseAuthor `json:"authors"`
DOI string `json:"doi"`
LoadDate string `json:"loadDate"`
OpenAccess bool `json:"openAccess"`
Pages Pages `json:"pages"`
PII string `json:"pii"`
PublicationDate string `json:"publicationDate"`
SourceTitle string `json:"sourceTitle"`
Title string `json:"title"`
URI string `json:"uri"`
VolumeIssue string `json:"volumeIssue"`
}
SearchResult represents a single search result item
func (*SearchResult) ToString ¶ added in v0.2.0
func (sr *SearchResult) ToString() string