cleaned up user anilist functions
This commit is contained in:
@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
@ -37,12 +36,7 @@ func AniListQuery(body interface{}, login bool) (json.RawMessage, string) {
|
||||
}
|
||||
|
||||
func (a *App) GetAniListItem(aniId int, login bool) AniListGetSingleAnime {
|
||||
var user = a.GetAniListLoggedInUserId()
|
||||
// type Variables struct {
|
||||
// UserId int `json:"userId"`
|
||||
// MediaId int `json:"mediaId"`
|
||||
// ListType string `json:"listType"`
|
||||
// }
|
||||
var user = a.GetAniListLoggedInUser()
|
||||
|
||||
var neededVariables interface{}
|
||||
|
||||
@ -207,7 +201,7 @@ func (a *App) AniListSearch(query string) any {
|
||||
}
|
||||
|
||||
func (a *App) GetAniListUserWatchingList(page int, perPage int, sort string) AniListCurrentUserWatchList {
|
||||
var user = a.GetAniListLoggedInUserId()
|
||||
var user = a.GetAniListLoggedInUser()
|
||||
type Variables struct {
|
||||
Page int `json:"page"`
|
||||
PerPage int `json:"perPage"`
|
||||
@ -311,8 +305,6 @@ func (a *App) GetAniListUserWatchingList(page int, perPage int, sort string) Ani
|
||||
|
||||
returnedBody, _ := AniListQuery(body, true)
|
||||
|
||||
fmt.Println("ReturnedBody: ", string(returnedBody))
|
||||
|
||||
var post AniListCurrentUserWatchList
|
||||
err := json.Unmarshal(returnedBody, &post)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user