Latest 1.0.1
Homepage https://github.com/pisces/KTourApi-iOS-SDK
License MIT
Platforms ios 8.0, requires ARC
Dependencies PSFoundation, w3action
Authors

KTourApi-iOS-SDK

KTourApiSDK는 한국관광공사 TourApi SDK 입니다.

KTourApiSDK is open source iOS SDK to use Korea Tour Api.

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Info.plist

아래 내용을 프로젝트 info.plist에 넣어 주세요.
KTourApiServiceKey는 한국관광공사 TourAPI(http://api.visitkorea.or.kr)에서 발급 받은 토큰입니다.

Add or replace node below to you app info plist.

<key>KTourApiServiceKey</key>
<string>Your Service Key</string>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>visitkorea.or.kr</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSThirdPartyExceptionMinimumTLSVersion</key>
            <string>TLSv1.1</string>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

Example for API Call

KTourApiAppCenter.defaultCenter().call(
    path: KTourApiPath.LocationBasedList,
    params: KTourApiParameterSet.LocationBasedList(numOfRows: 10, pageNo: 1, contentTypeId: nil, mapX: 126.981611, mapY: 37.568477),
    completion: {(result: KTourApiResult<KTourApiResultItem.POI>?, error:NSError?) -> Void in
        print("result, error ->", result?.description, error?.description)
})

API Paths

public enum KTourApiPath: String {
    case
    AreaCode            = "areaCode",
    AreaBasedList       = "areaBasedList",
    CategoryCode        = "categoryCode",
    DetailCommon        = "detailCommon",
    DetailImage         = "detailImage",
    DetailInfo          = "detailInfo",
    DetailIntro         = "detailIntro",
    LocationBasedList   = "locationBasedList",
    SearchFestival      = "searchFestival",
    SearchKeyword       = "searchKeyword",
    SearchStay          = "searchStay"
}

Change Language Type

KTourApiAppCenter.defaultCenter().languageType = KTourApiLanguageType.Chs

public enum KTourApiLanguageType: String {
    case
    Chs = "ChsService",
    Cht = "ChtService",
    Eng = "EngService",
    Ger = "GerService",
    Fre = "FreService",
    Jpn = "JpnService",
    Rus = "RusService",
    Spn = "SpnService"
}

Requirements

iOS Deployment Target 8.0 higher

Installation

KTourApiSDK is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "KTourApiSDK"

Author

Steve Kim, [email protected]

License

KTourApiSDK is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "KTourApiSDK",
    "version": "1.0.1",
    "summary": "Korea Tour Api iOS SDK.",
    "description": "KTourApiSDK is open source iOS sdk to use Korea Tour Api.",
    "homepage": "https://github.com/pisces/KTourApi-iOS-SDK",
    "license": "MIT",
    "authors": {
        "pisces": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pisces/KTourApi-iOS-SDK.git",
        "tag": "1.0.1"
    },
    "dependencies": {
        "PSFoundation": [],
        "w3action": []
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "KTourApiSDK/Classes/*.*"
}

Pin It on Pinterest

Share This