diff --git a/example/midlevel/tag.go b/example/midlevel/tag.go index ed45a85..0784022 100644 --- a/example/midlevel/tag.go +++ b/example/midlevel/tag.go @@ -13,8 +13,8 @@ func main() { Client: http.Client{}, Host: "https://e621.net", UserAgent: "Go-e621-SDK (@username)", - Username: "selloo", // Replace with your username - APIKey: "zt7XAaewLqP4AWvQi5WrLNwN", // Replace with your API key + Username: "", // Replace with your username + APIKey: "", // Replace with your API key } // Log: Getting a single tag. diff --git a/pkg/e621/model/tag.go b/pkg/e621/model/tag.go index f084af2..9851807 100644 --- a/pkg/e621/model/tag.go +++ b/pkg/e621/model/tag.go @@ -1,13 +1,26 @@ package model +type TagCategory int + +const ( + General TagCategory = iota + Artist + Copyright TagCategory = iota + 1 + Character + Species + Invalide + Meta + Lore +) + type Tag struct { - ID int64 `json:"id"` - Name string `json:"name"` - PostCount int64 `json:"post_count"` - RelatedTags string `json:"related_tags"` - RelatedTagsUpdatedAt string `json:"related_tags_updated_at"` - Category int64 `json:"category"` - IsLocked bool `json:"is_locked"` - CreatedAt string `json:"created_at"` - UpdatedAt string `json:"updated_at"` + ID int64 `json:"id"` + Name string `json:"name"` + PostCount int64 `json:"post_count"` + RelatedTags string `json:"related_tags"` + RelatedTagsUpdatedAt string `json:"related_tags_updated_at"` + Category TagCategory `json:"category"` + IsLocked bool `json:"is_locked"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` }