TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | ✗ |
Maintained by pisces.
Depends on: | |
PSFoundation | >= 0 |
w3action | >= 0 |
KTourApiSDK는 한국관광공사 TourApi SDK 입니다.
KTourApiSDK is open source iOS SDK to use Korea Tour Api.
To run the example project, clone the repo, and run pod install
from the Example directory first.
아래 내용을 프로젝트 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>
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)
})
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"
}
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"
}
iOS Deployment Target 8.0 higher
KTourApiSDK is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KTourApiSDK"
Steve Kim, [email protected]
KTourApiSDK is available under the MIT license. See the LICENSE file for more info.