Latest 0.1.4
Homepage https://github.com/YutoMizutani/CiNiiKit
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Dependencies Alamofire
Authors

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.

CiNiiKit

Support

It fully supports CiNii APIs!

Supports multiple query parameters in call methods,

CiNii Articles

  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.

CiNii Books

  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.

CiNii Dissartations

  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.

CiNiiKit

<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.

Latest podspec

{
    "name": "CiNiiKit",
    "version": "0.1.4",
    "summary": "CiNii API client written in Swift",
    "description": "CiNii API client written in Swift.",
    "homepage": "https://github.com/YutoMizutani/CiNiiKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Yuto Mizutani": "[email protected]"
    },
    "source": {
        "git": "https://github.com/YutoMizutani/CiNiiKit.git",
        "tag": "0.1.4"
    },
    "social_media_url": "https://twitter.com/EXPENSIVE_MAN",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "requires_arc": true,
    "dependencies": {
        "Alamofire": []
    },
    "source_files": "Sources/**/*.swift"
}

Pin It on Pinterest

Share This