package main
import (
"git.dragse.it/anthrove/e621-to-graph/pkg/e621/endpoints"
"git.dragse.it/anthrove/e621-to-graph/pkg/e621/model"
"log"
"net/http"
)
func main() {
requestContext := model.RequestContext{
Host: "https://e621.net",
UserAgent: "Go-e621-SDK (@username)",
Username: "",
APIKey: "",
}
log.Println("Getting single tag: ")
client := http.Client{}
tag, err := endpoints.GetTag(client, requestContext, "1530")
if err != nil {
log.Println(err)
log.Println(tag.Name)
log.Println("----------")
log.Println("Getting list of tags: ")
query := map[string]string{
"limit": "5",
tagList, err := endpoints.GetTags(client, requestContext, query)
log.Println(len(tagList))
log.Println("seach for tags containing cat: ")
query = map[string]string{
"search[name_matches]": "cat*",
tagList, err = endpoints.GetTags(client, requestContext, query)
log.Println(tagList)
log.Println("seach for tags with the category artist: ")
"search[category]": "1",