Compare commits
2 Commits
00930f611e
...
77dc48fcf2
Author | SHA1 | Date | |
---|---|---|---|
77dc48fcf2 | |||
c7694900e3 |
@ -18,7 +18,6 @@ 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)
|
||||||
|
|
||||||
@ -92,7 +91,6 @@ 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,7 +257,6 @@ 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))
|
||||||
|
31
bruno/AniTrack/AniList/Set Items/Delete Media.bru
Normal file
31
bruno/AniTrack/AniList/Set Items/Delete Media.bru
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
29
bruno/AniTrack/Simkl/Post Items/Delete Entry.bru
Normal file
29
bruno/AniTrack/Simkl/Post Items/Delete Entry.bru
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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,7 +30,6 @@
|
|||||||
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