测试已测试 | ✗ |
Lang语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | Aug 2017 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
Maintained by nktn.
====
MyAnimeList(官方API)的Swift API客户端
https://myanimelist.net/modules.php?go=api
Xcode8.3.X(Swift3)
import MalKit
MalKit().setUserData(userId: "xxxxxx", passwd: "yyyyyy")
MalKit().searchAnime("naruto", completionHandler: { (items, status, err) in
//result is Data(XML). You need to parse XML.
//your process
})
MalKit().searchManga("naruto", completionHandler: { (items, status, err) in
//result is Data(XML). You need to parse XML.
//your process
})
MalKit().addAnime(20, params:["status": 1], completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//your process
})
MalKit().addManga(20, params:["status": 1], completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//your process
})
MalKit().updateAnime(20, params:["status": 0, "comments": "test"], completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//your process
})
MalKit().updateManga(20, params:["status": 0, "comments": "test"], completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//your process
})
MalKit().deleteAnime(20, completionHandler: { (result, status, err) in
//20 is anime_id
//result is Bool
//your process
})
MalKit().deleteManga(20, completionHandler: { (result, status, err) in
//20 is manga_id
//result is Bool
//your process
})
MalKit().verifyCredentials(completionHandler: { (result, status, err) in
//result is Data(XML). You need to parse XML.
//your process
})
github "nktn/MalKit"
carthage update
pod 'MalKit'
pod install
MIT