Skip to content

Commit

Permalink
feat: add anime title struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsm-dev committed Jan 3, 2022
1 parent 85636b9 commit dd145f4
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions internal/types/response.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
package types

// AnimeTitle struct - information about the anime title.
type AnimeTitle struct {
Native string `json:"native"`
Romaji string `json:"romaji"`
English string `json:"english"`
}

// Anime struct - information about the anime passed in the request to trace.moe API.
type Anime struct {
ID int `json:"id"`
IDMal int `json:"idMal"`
Title struct {
Native string `json:"native"`
Romaji string `json:"romaji"`
English string `json:"english"`
} `json:"title"`
Synonyms []string `json:"synonyms"`
IsAdult bool `json:"isAdult"`
ID int `json:"id"`
IDMal int `json:"idMal"`
Title AnimeTitle `json:"title"`
Synonyms []string `json:"synonyms"`
IsAdult bool `json:"isAdult"`
}

// Response struct - content of trace.moe API request result.
Expand Down

0 comments on commit dd145f4

Please sign in to comment.