====
Swift API Client for MyAnimeList(official API)
https://myanimelist.net/modules.php?go=api
Xcode9.0〜(Swift4)
import MalKit
let malkit = MalKit()
malkit.setUserData(userId: "xxxxxx", passwd: "yyyyyy")
malkit.searchAnime("naruto", completionHandler: { (items, status, err) in
//result is Data(XML). You need to parse XML.
//status is HTTPURLResponse
//your process
})
malkit.searchManga("naruto", completionHandler: { (items, status, err) in
//result is Data(XML). You need to parse XML.
//status is HTTPURLResponse
//your process
})
Add or Update anime/manga on your list. For additional Anime parameters, please refer here. For Manga, please refer here.
malkit.addAnime(20, params:["status": 1], completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.addManga(20, params:["status": 1], completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.updateAnime(20, params:["status": 0, "comments": "test"], completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.updateManga(20, params:["status": 0, "comments": "test"], completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.deleteAnime(20, completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.deleteManga(20, completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//status is HTTPURLResponse
//your process
})
malkit.verifyCredentials(completionHandler: { (result, status, err) in
//Check for MalKit().setUserData
//result is Data(XML). You need to parse XML.
//status is HTTPURLResponse
//your process
})
malkit.userAnimeList { (result, http_status, err) in
//Check for MalKit().setUserData
//result is Data(XML). You need to parse XML.
//status is HTTPURLResponse
//your process
})
malkit.userMangaList { (result, http_status, err) in
//Check for MalKit().setUserData
//result is Data(XML). You need to parse XML.
//status is HTTPURLResponse
//your process
})
github "nktn/MalKit"
carthage update
pod 'MalKit'
pod install
MIT