CiNii API client written in Swift.
A sample of CiNii Article search,
import CiNiiKit
let cinii: CiNiiKit = CiNiiKit.shared
cinii.register(key: "ENTER YOUR API KEY")
let keyword: String = "ENTER YOUR SEARCH WORD"
cinii.articles.search(keyword: keyword, success: { model in
// e.g. get first journal title
print(model.graph[0].items?[0].title)
}, failure: { error in
print(error)
})
Demo app is a sample of CiNii Articles.
It fully supports CiNii APIs!
Supports multiple query parameters in call methods,
-
Get a result of search articles from CiNii Articles.
-
Get a result of search authors from CiNii Articles.
-
Get a result of search full text from CiNii Articles.
-
Get a result of search books from CiNii Books.
-
Get a result of search for authors from CiNii Books.
-
Get a result of search for libraries from CiNii Books.
-
Get a result of search for holdings from CiNii Books.
-
Get a result of search dissertations from CiNii Dissertations.
Add this to your Podfile:
pod 'CiNiiKit'
and
$ pod install
Add this to your Cartfile:
github "YutoMizutani/CiNiiKit"
and
$ carthage update
CiNii API is using HTTP connection.
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
Write it into your Info.plist
.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>ci.nii.ac.jp</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
This API is required key(application ID). Register this page.
CiNiiKit is available under the MIT license.