From 4421d75ab544973343bd36714ef78ca87f73325f Mon Sep 17 00:00:00 2001
From: Abdulsamad Sheikh <abdulsas@stud.ntnu.no>
Date: Wed, 21 Feb 2024 19:44:47 +0000
Subject: [PATCH] Upload New File

---
 models/models.go | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 models/models.go

diff --git a/models/models.go b/models/models.go
new file mode 100644
index 0000000..ea40e15
--- /dev/null
+++ b/models/models.go
@@ -0,0 +1,33 @@
+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"`
+}
-- 
GitLab