Compare commits
No commits in common. "77dc48fcf20ab9fa185d3cb5009c2e344311fe9f" and "00930f611e78d98804d48ac49f35bec0dd77349c" have entirely different histories.
77dc48fcf2
...
00930f611e
@ -18,6 +18,7 @@ func MALHelper(method string, malUrl string, body url.Values) (json.RawMessage,
|
|||||||
|
|
||||||
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
|
||||||
req.Header.Add("Authorization", "Bearer "+myAnimeListJwt.AccessToken)
|
req.Header.Add("Authorization", "Bearer "+myAnimeListJwt.AccessToken)
|
||||||
|
fmt.Println(myAnimeListJwt.AccessToken)
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
|
|
||||||
@ -91,6 +92,7 @@ func (a *App) MyAnimeListUpdate(anime MALAnime, update MALUploadStatus) MalListS
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *App) GetMyAnimeListAnime(id int) MALAnime {
|
func (a *App) GetMyAnimeListAnime(id int) MALAnime {
|
||||||
|
fmt.Println(id)
|
||||||
malUrl := "https://api.myanimelist.net/v2/anime/" + strconv.Itoa(id) + "?fields=id,title,main_picture,alternative_titles,start_date,end_date,synopsis,mean,rank,popularity,num_list_users,num_scoring_users,nsfw,genres,created_at,updated_at,media_type,status,my_list_status,num_episodes,start_season,broadcast,source,average_episode_duration,rating,pictures,background,related_anime,recommendations,studios,statistics"
|
malUrl := "https://api.myanimelist.net/v2/anime/" + strconv.Itoa(id) + "?fields=id,title,main_picture,alternative_titles,start_date,end_date,synopsis,mean,rank,popularity,num_list_users,num_scoring_users,nsfw,genres,created_at,updated_at,media_type,status,my_list_status,num_episodes,start_season,broadcast,source,average_episode_duration,rating,pictures,background,related_anime,recommendations,studios,statistics"
|
||||||
respBody, respStatus := MALHelper("GET", malUrl, nil)
|
respBody, respStatus := MALHelper("GET", malUrl, nil)
|
||||||
var malAnime MALAnime
|
var malAnime MALAnime
|
||||||
|
@ -257,6 +257,7 @@ func (a *App) SimklSearch(aniListAnime MediaList) SimklAnime {
|
|||||||
err := json.Unmarshal(respBody, &anime)
|
err := json.Unmarshal(respBody, &anime)
|
||||||
|
|
||||||
if len(anime) == 0 {
|
if len(anime) == 0 {
|
||||||
|
fmt.Println("reached search by mal")
|
||||||
url = "https://api.simkl.com/search/id?mal=" + strconv.Itoa(aniListAnime.Media.IDMal)
|
url = "https://api.simkl.com/search/id?mal=" + strconv.Itoa(aniListAnime.Media.IDMal)
|
||||||
respBody = SimklHelper("GET", url, nil)
|
respBody = SimklHelper("GET", url, nil)
|
||||||
fmt.Println(string(respBody))
|
fmt.Println(string(respBody))
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Delete Media
|
|
||||||
type: graphql
|
|
||||||
seq: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: https://graphql.anilist.co
|
|
||||||
body: graphql
|
|
||||||
auth: none
|
|
||||||
}
|
|
||||||
|
|
||||||
headers {
|
|
||||||
Authorization: Bearer {{ANILIST_ACCESS_TOKEN}}
|
|
||||||
Content-Type: application/json
|
|
||||||
Accept: application/json
|
|
||||||
}
|
|
||||||
|
|
||||||
body:graphql {
|
|
||||||
mutation($id:Int){
|
|
||||||
DeleteMediaListEntry(id:$id){
|
|
||||||
deleted
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body:graphql:vars {
|
|
||||||
{
|
|
||||||
"id":430978266
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
meta {
|
|
||||||
name: Delete Entry
|
|
||||||
type: http
|
|
||||||
seq: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
url: https://api.simkl.com/sync/history/remove
|
|
||||||
body: json
|
|
||||||
auth: none
|
|
||||||
}
|
|
||||||
|
|
||||||
headers {
|
|
||||||
Authorization: Bearer {{SIMKL_AUTH_TOKEN}}
|
|
||||||
Content-Type: application/json
|
|
||||||
simkl-api-key: {{SIMKL_CLIENT_ID}}
|
|
||||||
}
|
|
||||||
|
|
||||||
body:json {
|
|
||||||
{
|
|
||||||
"shows": [
|
|
||||||
{
|
|
||||||
"ids": {
|
|
||||||
"simkl": 909121
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -30,6 +30,7 @@
|
|||||||
conditions: [
|
conditions: [
|
||||||
async () => await CheckIfAniListLoggedIn(),
|
async () => await CheckIfAniListLoggedIn(),
|
||||||
async (detail) => {
|
async (detail) => {
|
||||||
|
console.log("reached condition")
|
||||||
aniListAnime.update(value => {
|
aniListAnime.update(value => {
|
||||||
value = AniListGetSingleAnimeDefaultData
|
value = AniListGetSingleAnimeDefaultData
|
||||||
return value
|
return value
|
||||||
|
Loading…
Reference in New Issue
Block a user