Documentation ¶
Index ¶
- Constants
- func SendRequestToAPI(apiURL, token string, w http.ResponseWriter, r *http.Request) (*http.Response, error)
- func SetAuthorizationHeaders(nr, or *http.Request, token string) error
- type BibRecordIn
- type BibRecordOut
- type BibRecordsIn
- type BibRecordsOut
- type ItemRecordIn
- type ItemRecordOut
- type ItemRecordsIn
- type ItemRecordsOut
Constants ¶
View Source
const ( //API URL DefaultURL string = "https://sandbox.iii.com/iii/sierra-api/v1/" //API Endpoints TokenRequestEndpoint string = "token" BibRequestEndpoint string = "bibs" ItemRequestEndpoint string = "items" )
Variables ¶
This section is empty.
Functions ¶
func SendRequestToAPI ¶
Types ¶
type BibRecordIn ¶ added in v0.7.0
type BibRecordIn struct { ID int `json:"id"` CreatedDate time.Time `json:"createdDate"` Marc struct { Fields []struct { Data struct { Subfields []struct { Code string `json:"code"` Data string `json:"data"` } `json:"subfields"` } `json:"data"` Tag string `json:"tag"` } `json:"fields"` Leader string `json:"leader"` } `json:"marc"` }
func (*BibRecordIn) Convert ¶ added in v0.7.0
func (in *BibRecordIn) Convert() *BibRecordOut
type BibRecordOut ¶ added in v0.7.0
type BibRecordsIn ¶ added in v0.7.0
type BibRecordsIn struct {
Entries []BibRecordIn `json:"entries"`
}
func (*BibRecordsIn) Convert ¶ added in v0.7.0
func (in *BibRecordsIn) Convert() *BibRecordsOut
type BibRecordsOut ¶ added in v0.7.0
type BibRecordsOut []BibRecordOut
func (BibRecordsOut) Len ¶ added in v0.7.0
func (records BibRecordsOut) Len() int
func (BibRecordsOut) Less ¶ added in v0.7.0
func (records BibRecordsOut) Less(i, j int) bool
func (BibRecordsOut) Swap ¶ added in v0.7.0
func (records BibRecordsOut) Swap(i, j int)
type ItemRecordIn ¶
type ItemRecordIn struct { CallNumber string `json:"callNumber"` Status struct { DueDate time.Time `json:"duedate"` } `json:"status"` Location struct { Name string `json:"name"` } `json:"location"` }
func (*ItemRecordIn) Convert ¶
func (in *ItemRecordIn) Convert() *ItemRecordOut
type ItemRecordOut ¶
type ItemRecordsIn ¶
type ItemRecordsIn struct {
Entries []ItemRecordIn `json:"entries"`
}
func (*ItemRecordsIn) Convert ¶
func (in *ItemRecordsIn) Convert() *ItemRecordsOut
type ItemRecordsOut ¶
type ItemRecordsOut struct {
Entries []ItemRecordOut
}
Click to show internal directories.
Click to hide internal directories.