Swiftpack.co - Package - tosaka07/NarouAPI

NarouAPI

小説家になろうAPIクライアント

Feature

  • ☑ 小説API
  • ☑ ユーザー検索API
  • ☑ 小説ランキングAPI
  • ☑ 殿堂入りAPI

TODO

  • ☐ Error Handling
  • ☐ Request Parameter Validation
  • ☐ Support gzip

Installation

Carthage

github "tosaka07/NarouAPI"

Basic Usage

小説API

Official Documentation

NarouAPIClient.fetchNovels(options: [.limit(6)], filterOptions: [.wname(.init(word: "foo"))]) { result in
    switch result {
    case .success(let response):
    case .failure(let failure):
    }
}

ユーザー検索API

Official Documentation

NarouAPIClient.fetchUsers(options: [], filterOptions: [.userID(123)]) { result in
    switch result {
    case .success(let response):
    case .failure(let failure):
    }
}

小説ランキングAPI

Official Documentation

NarouAPIClient.fetchRankings(options: [.rankingType(.init(date: Date(), type: .daily))]) { result in
    switch result {
    case .success(let response):
    case .failure(let failure):
    }
}

殿堂入りAPI

Official Documentation

NarouAPIClient.fetchRanks(ncode: "xxx", options: []) { result in
    switch result {
    case .success(let response):
    case .failure(let failure):
    }
}

Link

Licence

NarouAPI is released under the MIT license.

Github

link
Stars: 0

Dependencies

Used By

Total: 0