CiNiiKit

master

CiNii API client written in Swift
YutoMizutani/CiNiiKit

CiNiiKit

Build Status CocoaPods MIT License CocoaPods Carthage compatible

CiNii API client written in Swift.

Get Started

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

Demo app is a sample of CiNii Articles.

Support

It fully supports CiNii APIs!

Supports multiple query parameters in call methods,

  1. search()

    Get a result of search articles from CiNii Articles.

  2. author()

    Get a result of search authors from CiNii Articles.

  3. fulltext()

    Get a result of search full text from CiNii Articles.

  1. search()

    Get a result of search books from CiNii Books.

  2. author()

    Get a result of search for authors from CiNii Books.

  3. library()

    Get a result of search for libraries from CiNii Books.

  4. holding()

    Get a result of search for holdings from CiNii Books.

  1. search()

    Get a result of search dissertations from CiNii Dissertations.

Installation

Cocoapods

Add this to your Podfile:

pod 'CiNiiKit'

and

$ pod install

Carthage

Add this to your Cartfile:

github "YutoMizutani/CiNiiKit"

and

$ carthage update

Usage HTTP

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>

Get API key

This API is required key(application ID). Register this page.

References

License

CiNiiKit is available under the MIT license.

Description

  • Swift Tools
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Oct 22 2024 19:47:15 GMT-0900 (Hawaii-Aleutian Daylight Time)