SoraKit 0.0.2

SoraKit 0.0.2

测试测试过的
Lang语言 SwiftSwift
许可证 MIT
发布最后发布2017年8月
SwiftSwift 版本3.0
SPM支持 SPM

Maintained by Shingo Tamaki.



 
依赖项
APIKit~> 3.0
ObjectMapper~> 2.2
 

SoraKit 0.0.2

  • By
  • Shingo Tamaki

SoraKit

为 iOS 设备的 Sora (ShangriLa 动画 API 服务器) 客户端库

示例

要运行示例项目,请克隆仓库,然后从 Example 目录首次运行 pod install

安装

SoraKit 可通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 中

pod "SoraKit"

使用

Cours (cours api)

返回 ShangriLa api 服务器中每个动画季度信息的列表。《课程》通常指的是日本电视节目中三个月一季。

Cours api 返回 Cour 结构如下。

Sora.cours(success: { (cours) in
  // Success
}) { (error) in
  // Error
}

Cour 结构

name description
id cours id
year year(YYYY)
cours 一年的季度

AnimeTitles (year api)

返回任何年份的动画标题。

Sora.animeTitles(OfYear: year, success: { (titles) in
  // Success
}, failure: { (error) in
  // Error
})

year api 返回 AnimeTitle 结构如下。

AnimeTitle 结构

name description
id cours_id
title anime title

AnimeInfo (year/cour api)

返回任何年份任何季度的动画信息。

Sora.animeInfo(OfYear: year, season: season, success: { (animeInfoList) in
  // Success
}, failure: { (error) in
  // Error
})

year/cour api 返回 AnimeInfo 结构如下。

AnimeInfo 结构

name description
id unique id assigned to anime managed by Sora api
title anime title
title_short1 anime short title 1
title_short2 anime short title 2
title_short3 anime short title 3
public_url anime official site url
twitter_account anime official site twitter account
twitter_hash_tag anime twitter hashtag
cours_id cours id
创建时间 数据创建日期
更新时间 数据更新日期
性别 男性为0 / 女性为1
续编 如果存在续编,将返回1或更大的数字
城市代码 基于动漫构建的区域的城市代码
城市名称 基于动漫构建的区域的名称

作者

Shingo Tamaki

许可证

SoraKit 适用于MIT许可证。有关更多信息,请参阅LICENSE文件。