crossref

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

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 CrossrefResponse

type CrossrefResponse struct {
	Status  string `json:"status"`
	Message struct {
		Items        []CrossrefWork `json:"items"`
		TotalResults int            `json:"total-results"`
	} `json:"message"`
}

CrossrefResponse represents the API response structure

func QueryBibliographic

func QueryBibliographic(reference string, rows int) (*CrossrefResponse, error)

QueryBibliographic queries the Crossref API for reference matching

type CrossrefWork

type CrossrefWork struct {
	DOI    string   `json:"DOI"`
	Title  []string `json:"title"`
	Score  float64  `json:"score"`
	Author []struct {
		Given  string `json:"given"`
		Family string `json:"family"`
	} `json:"author"`
	Published struct {
		DateParts [][]int `json:"date-parts"`
	} `json:"published-print"`
	ContainerTitle []string `json:"container-title"`
}

CrossrefWork represents a work item from the Crossref API

func (*CrossrefWork) ToString

func (w *CrossrefWork) ToString() string

type ReferenceMatchResult

type ReferenceMatchResult struct {
	BestMatch    *CrossrefWork
	SecondMatch  *CrossrefWork
	IsConclusive bool
	Error        error
}

ReferenceMatchResult contains the matching results

Jump to

Keyboard shortcuts

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