Skip to content
Snippets Groups Projects
Commit 4421d75a authored by Abdulsamad Sheikh's avatar Abdulsamad Sheikh :cat2:
Browse files

Upload New File

parent 30ba2e8c
No related branches found
No related tags found
No related merge requests found
package models
// ... Other models
// GutenbergBook represents the structure of a book from the Gutenberg API.
type GutenbergBook struct {
ID int `json:"id"`
Title string `json:"title"`
Authors []Person `json:"authors"`
Translators []Person `json:"translators"`
Subjects []string `json:"subjects"`
Bookshelves []string `json:"bookshelves"`
Languages []string `json:"languages"`
Copyright bool `json:"copyright"`
MediaType string `json:"media_type"`
Formats map[string]string `json:"formats"`
DownloadCount int `json:"download_count"`
}
// GutenbergResponse represents the paginated response from Gutenberg API.
type GutenbergResponse struct {
Count int `json:"count"`
Next string `json:"next"`
Previous string `json:"previous"`
Results []GutenbergBook `json:"results"`
}
// Person represents an author or translator.
type Person struct {
BirthYear *int `json:"birth_year"`
DeathYear *int `json:"death_year"`
Name string `json:"name"`
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment