├── .nojekyll ├── docs ├── .nojekyll ├── img │ ├── gh.png │ ├── carat.png │ └── dash.png ├── docsets │ ├── KKBOXOpenAPISwift.tgz │ └── KKBOXOpenAPISwift.docset │ │ └── Contents │ │ ├── Resources │ │ ├── docSet.dsidx │ │ └── Documents │ │ │ ├── img │ │ │ ├── dash.png │ │ │ ├── gh.png │ │ │ └── carat.png │ │ │ ├── undocumented.json │ │ │ ├── badge.svg │ │ │ ├── js │ │ │ └── jazzy.js │ │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ │ ├── Classes.html │ │ │ ├── Structs │ │ │ ├── KKSummary.html │ │ │ ├── KKImageInfo.html │ │ │ ├── KKAlbumList.html │ │ │ └── KKTrackList.html │ │ │ ├── Enums │ │ │ └── KKAPIResult.html │ │ │ └── Enums.html │ │ └── Info.plist ├── undocumented.json ├── badge.svg ├── js │ └── jazzy.js ├── css │ ├── highlight.css │ └── jazzy.css ├── Classes.html ├── Structs │ ├── KKSummary.html │ ├── KKImageInfo.html │ ├── KKAlbumList.html │ ├── KKTrackList.html │ ├── KKArtistList.html │ └── KKPlaylistList.html ├── Enums │ └── KKAPIResult.html └── Enums.html ├── .swift-version ├── Tests └── LinuxMain.swift ├── KKBOXOpenAPISwift.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── KKBOXOpenAPISwift_Info.plist ├── KKBOXOpenAPISwiftTests_Info.plist └── xcshareddata │ └── xcschemes │ └── KKBOXOpenAPISwift-Package.xcscheme ├── .github └── workflows │ ├── ci.yml │ └── jazzy.yml ├── Sources └── KKBOXOpenAPISwift │ └── KKBOXOpenAPIPrivateTypes.swift ├── .travis.yml ├── Package.swift ├── KKBOXOpenAPISwift.podspec ├── .gitignore └── README.md /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.2 2 | -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/img/gh.png -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/docsets/KKBOXOpenAPISwift.tgz -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import KKBOXOpenAPISwiftTests 3 | 4 | XCTMain([ 5 | testCase(KKBOXOpenAPISwiftTests.allTests), 6 | ]) 7 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/HEAD/docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: [push] 3 | 4 | jobs: 5 | build: 6 | name: Build 7 | runs-on: macOS-latest 8 | steps: 9 | - uses: actions/checkout@v1 10 | - name: Build 11 | run: swift build 12 | - name: Test 13 | run: swift test --parallel 14 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sources/KKBOXOpenAPISwift/KKBOXOpenAPIPrivateTypes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KKBOXOpenAPIPrivateTypes.swift 3 | // 4 | // Copyright (c) 2019 KKBOX Taiwan Co., Ltd. All Rights Reserved. 5 | // 6 | 7 | import Foundation 8 | 9 | struct KKLoginError: Codable { 10 | var error: String 11 | } 12 | 13 | struct KKAPIError: Codable { 14 | var code: Int 15 | var message: String? 16 | } 17 | 18 | struct KKAPIErrorResponse: Codable { 19 | var error: KKAPIError 20 | } 21 | 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | sudo: required 3 | dist: trusty 4 | osx_image: xcode11 5 | 6 | matrix: 7 | include: 8 | - os: osx 9 | osx_image: xcode11 10 | - os: osx 11 | osx_image: xcode10.3 12 | - os: osx 13 | osx_image: xcode10.1 14 | 15 | before_install: 16 | - gem install xcov 17 | - gem update fastlane 18 | script: 19 | - swift package generate-xcodeproj 20 | - xcodebuild test -scheme KKBOXOpenAPISwift-Package -enableCodeCoverage YES 21 | - xcov --scheme KKBOXOpenAPISwift-Package 22 | notifications: 23 | email: 24 | on_success: never 25 | on_failure: change 26 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "KKBOXOpenAPISwift", 6 | products: [ 7 | .library( 8 | name: "KKBOXOpenAPISwift", 9 | targets: ["KKBOXOpenAPISwift"]), 10 | ], 11 | dependencies: [ 12 | // .package(url: /* package url */, from: "1.0.0"), 13 | ], 14 | targets: [ 15 | .target( 16 | name: "KKBOXOpenAPISwift", 17 | dependencies: []), 18 | .testTarget( 19 | name: "KKBOXOpenAPISwiftTests", 20 | dependencies: ["KKBOXOpenAPISwift"]), 21 | ] 22 | ) 23 | -------------------------------------------------------------------------------- /docs/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/zonble/Work/OpenAPI-Swift/Sources/KKBOXOpenAPISwift/KKBOXOpenAPI.swift", 5 | "line": 83, 6 | "symbol": "KKSearchType.none", 7 | "symbol_kind": "source.lang.swift.decl.var.static", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/zonble/Work/OpenAPI-Swift/Sources/KKBOXOpenAPISwift/KKBOXOpenAPITypes.swift", 12 | "line": 125, 13 | "symbol": "KKTrackInfo", 14 | "symbol_kind": "source.lang.swift.decl.struct", 15 | "warning": "undocumented" 16 | } 17 | ], 18 | "source_directory": "/Users/zonble/Work/OpenAPI-Swift" 19 | } -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/zonble/Work/OpenAPI-Swift/Sources/KKBOXOpenAPISwift/KKBOXOpenAPI.swift", 5 | "line": 84, 6 | "symbol": "KKSearchType.none", 7 | "symbol_kind": "source.lang.swift.decl.var.static", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/zonble/Work/OpenAPI-Swift/Sources/KKBOXOpenAPISwift/KKBOXOpenAPITypes.swift", 12 | "line": 125, 13 | "symbol": "KKTrackInfo", 14 | "symbol_kind": "source.lang.swift.decl.struct", 15 | "warning": "undocumented" 16 | } 17 | ], 18 | "source_directory": "/Users/zonble/Work/OpenAPI-Swift" 19 | } -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.kkboxopenapiswift 7 | CFBundleName 8 | KKBOXOpenAPISwift 9 | DocSetPlatformFamily 10 | kkboxopenapiswift 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/KKBOXOpenAPISwift_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/KKBOXOpenAPISwiftTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/workflows/jazzy.yml: -------------------------------------------------------------------------------- 1 | name: Jazzy Docs 2 | on: 3 | push: 4 | branches: 5 | - master 6 | 7 | jobs: 8 | build: 9 | runs-on: macOS-latest 10 | env: 11 | DEVELOPER_DIR: /Applications/Xcode_11.app/Contents/Developer 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v1 15 | - name: Install Jazzy 16 | run: gem install jazzy 17 | - name: Run Jazzy 18 | run: jazzy 19 | - name: Deploy 20 | run: | 21 | cd docs 22 | git init 23 | git config user.name "CI" 24 | git config user.email "jazzy-ci@github.com" 25 | git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/KKBOX/OpenAPI-Swift.git 26 | git checkout -b gh-pages 27 | git add . 28 | git commit -m "Updated docs" 29 | git push --force secure-origin gh-pages 30 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "KKBOXOpenAPISwift" 3 | s.version = "1.1.7" 4 | s.license = {:type => 'Apache 2.0', :file => "LICENSE.txt"} 5 | s.summary = "KKBOX's Open API SDK for iOS, macOS, watchOS and tvOS in Swift." 6 | s.description = <<-DESC 7 | KKBOX's Open API SDK for developers working on Apple platforms such as iOS, macOS, watchOS and tvOS. 8 | DESC 9 | s.homepage = "https://github.com/KKBOX/OpenAPI-Swift/" 10 | s.documentation_url = 'https://kkbox.github.io/OpenAPI-Swift/' 11 | s.author = {"zonble" => "zonble@gmail.com"} 12 | s.source = {:git => "https://github.com/KKBOX/OpenAPI-Swift.git", :tag => s.version.to_s} 13 | 14 | s.platform = :ios, :tvos, :osx, :watchos 15 | s.ios.deployment_target = '9.0' 16 | s.osx.deployment_target = '10.9' 17 | s.tvos.deployment_target = '9.0' 18 | s.watchos.deployment_target = '2.0' 19 | s.requires_arc = true 20 | s.source_files = 'Sources/KKBOXOpenAPISwift/*.swift' 21 | s.ios.frameworks = 'UIKit' 22 | s.tvos.frameworks = 'UIKit' 23 | s.osx.frameworks = 'AppKit' 24 | s.swift_versions = ['4.2', '5.0', '5.1'] 25 | end 26 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 98% 23 | 24 | 25 | 98% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 98% 23 | 24 | 25 | 98% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | 69 | .idea 70 | .vscode 71 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | function toggleItem($link, $content) { 12 | var animationDuration = 300; 13 | $link.toggleClass('token-open'); 14 | $content.slideToggle(animationDuration); 15 | } 16 | 17 | function itemLinkToContent($link) { 18 | return $link.parent().parent().next(); 19 | } 20 | 21 | // On doc load + hash-change, open any targetted item 22 | function openCurrentItemIfClosed() { 23 | if (window.jazzy.docset) { 24 | return; 25 | } 26 | var $link = $(`.token[href="${location.hash}"]`); 27 | $content = itemLinkToContent($link); 28 | if ($content.is(':hidden')) { 29 | toggleItem($link, $content); 30 | } 31 | } 32 | 33 | $(openCurrentItemIfClosed); 34 | $(window).on('hashchange', openCurrentItemIfClosed); 35 | 36 | // On item link ('token') click, toggle its discussion 37 | $('.token').on('click', function(event) { 38 | if (window.jazzy.docset) { 39 | return; 40 | } 41 | var $link = $(this); 42 | toggleItem($link, itemLinkToContent($link)); 43 | 44 | // Keeps the document from jumping to the hash. 45 | var href = $link.attr('href'); 46 | if (history.pushState) { 47 | history.pushState({}, '', href); 48 | } else { 49 | location.hash = href; 50 | } 51 | event.preventDefault(); 52 | }); 53 | 54 | // Clicks on links to the current, closed, item need to open the item 55 | $("a:not('.token')").on('click', function() { 56 | if (location == this.href) { 57 | openCurrentItemIfClosed(); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /KKBOXOpenAPISwift.xcodeproj/xcshareddata/xcschemes/KKBOXOpenAPISwift-Package.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KKBOX Open API Swift Developer SDK for iOS/macOS/watchOS/tvOS 2 | 3 | 2019 © KKBOX. 4 | 5 | [![Actions Status](https://github.com/KKBOX/OpenAPI-Swift/workflows/Build/badge.svg)](https://github.com/KKBOX/OpenAPI-Swift/actions)  6 | [![build](https://travis-ci.org/KKBOX/OpenAPI-Swift.svg?branch=master)](https://travis-ci.org/KKBOX/OpenAPI-Swift)  7 | [![License Apache](https://img.shields.io/badge/license-Apache-green.svg?style=flat)](https://raw.githubusercontent.com/KKBOX/OpenAPI-Swift/master/LICENSE)  8 | [![CocoaPods](http://img.shields.io/cocoapods/v/KKBOXOpenAPISwift.svg?style=flat)](http://cocoapods.org/pods/KKBOXOpenAPISwift)  9 | [![Support](https://img.shields.io/badge/macOS-10.10-blue.svg)](https://www.apple.com/tw/macos)  10 | [![Support](https://img.shields.io/badge/iOS-9-blue.svg)](https://www.apple.com/tw/ios)  11 | [![Support](https://img.shields.io/badge/watchOS-2-blue.svg)](https://www.apple.com/tw/watchos)  12 | [![Support](https://img.shields.io/badge/tvOS-9-blue.svg)](https://www.apple.com/tw/tvos)  13 | 14 | KKBOX's Open API provides various data from KKBOX's rich music archive. It helps 15 | you to access data about KKBOX's song tracks, albums, artist playlist and so on. 16 | 17 | This is a pure Swift implementation of a client to access KKBOX's Open API. You 18 | can easily integrate the SDK into your iOS/macOS/watchOS/tvOS project using 19 | Swift Package Manager or CocoaPods. 20 | 21 | The SDK leverages lots of powerful features of Swift programming language, such 22 | as wrapping API responses into enums, and the JSON encoder / decoder since Swift 23 | 4. 24 | 25 | On the other hand, the SDK could not be called in your Objective-C code 26 | directly. If you need to work with KKBOX's Open API in your Objective-C code, 27 | you may need to wrap the SDK in your own bridging code, or, you may want to take 28 | a look of KKBOX's [Objective-C SDK](https://github.com/KKBOX/OpenAPI-ObjectiveC) 29 | 30 | For further information, please visit 31 | [KKBOX Developer Site](https://docs-en.kkbox.codes). 32 | 33 | ## Requirement 34 | 35 | The SDK supports 36 | 37 | - Swift 4.2 38 | - 📱 iOS 9.x or above 39 | - 💻 Mac OS X 10.10 or above 40 | - ⌚️ watchOS 2.x or above 41 | - 📺 tvOS 9.x or above 42 | 43 | Ths SDK uses 44 | [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) 45 | to do HTTP connections. Since NSURLSession has not been ported to Linux, you 46 | cannot run the Swift SDK on Linux yet, even Swift runs on Linux. 47 | 48 | ## Build ⚒ 49 | 50 | You need the latest Xcode and macOS. Xcode 9 and macOS 10.13 High 51 | Sierra are recommended. 52 | 53 | ## Installation 54 | 55 | The SDK supports both CocoaPods and Swift Package Manager. 56 | 57 | ### CocoaPods 58 | 59 | The SDK supports CocoaPods. Please add `pod 'KKBOXOpenAPISwift'` 60 | to your Podfile, and then call `pod install`. 61 | 62 | ### Carthage 63 | 64 | Add the following line to your `Cartfile` 65 | 66 | ``` 67 | github 'KKBOX/OpenAPI-Swift' 68 | ``` 69 | 70 | Then run `carthage update`. 71 | 72 | ### Swift Package Manager 73 | 74 | Add the SDK as a dependency to your Package.swift: 75 | 76 | ```swift 77 | // swift-tools-version:4.0 78 | 79 | import PackageDescription 80 | 81 | let package = Package( 82 | name: "KKBOXOpenAPI-test", 83 | products: [ 84 | .executable(name: "KKBOXOpenAPI-test", targets: ["YourTargetName"]) 85 | ], 86 | dependencies: [ 87 | .package(url: "https://github.com/KKBOX/OpenAPI-Swift", .upToNextMinor(from: "1.1.6")) 88 | ], 89 | targets: [ 90 | .target(name: "YourTargetName", dependencies: ["KKBOXOpenAPISwift"], path: "./Path/To/Your/Sources") 91 | ] 92 | ) 93 | ``` 94 | 95 | ## Usage 96 | 97 | To start using the SDK, you need to create an instance of KKBOXOpenAPI. 98 | 99 | ``` swift 100 | let API = KKBOXOpenAPI(clientID: "YOUR_CLIENT_ID", secret: "YOUR_CLIENT_SECRET") 101 | ``` 102 | 103 | Then, ask the instance to fetch an access token by passing a client credential. 104 | 105 | ``` swift 106 | _ = try? self.API.fetchAccessTokenByClientCredential { result in 107 | switch result { 108 | case .error(let error): 109 | // Handle error... 110 | case .success(_): 111 | // Successfully logged-in 112 | } 113 | } 114 | ``` 115 | 116 | Finally, you can start to do the API calls. For example, you can fetch the details 117 | of a song track by calling 'fetchTrack'. 118 | 119 | ``` swift 120 | _ = try? self.API.fetch(track: "4kxvr3wPWkaL9_y3o_") { result in 121 | switch result { 122 | case .error(let error): 123 | // Handle error... 124 | case .success(let track): 125 | // Handle the song track. 126 | } 127 | } 128 | ``` 129 | 130 | You can develop your app using the SDK with Swift or Objective-C programming 131 | language, although we have only Swift sample code here. 132 | 133 | ## API Documentation 📖 134 | 135 | - Documentation for the SDK is available at https://kkbox.github.io/OpenAPI-Swift/ . 136 | - KKBOX's Open API documentation is available at https://developer.kkbox.com/ . 137 | 138 | ## License 139 | 140 | Copyright 2019 KKBOX Technologies Limited 141 | 142 | Licensed under the Apache License, Version 2.0 (the "License"); 143 | you may not use this file except in compliance with the License. 144 | You may obtain a copy of the License at 145 | 146 | http://www.apache.org/licenses/LICENSE-2.0 147 | 148 | Unless required by applicable law or agreed to in writing, software 149 | distributed under the License is distributed on an "AS IS" BASIS, 150 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 151 | See the License for the specific language governing permissions and 152 | limitations under the License. 153 | -------------------------------------------------------------------------------- /docs/Classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Classes Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

Classes

129 |

The following classes are available globally.

130 | 131 |
132 |
133 |
134 |
    135 |
  • 136 |
    137 | 138 | 139 | 140 | KKBOXOpenAPI 141 | 142 |
    143 |
    144 |
    145 |
    146 |
    147 |
    148 |

    The class helps you to access KKBOX’s Open API in Swift programming 149 | language.

    150 | 151 |

    Please create an instance of the class by calling 152 | KKBOXOpenAPI.init(clientID:, secret:, scope:) and then fetch an access 153 | token by passing a client credential. Then you can do the other API calls.

    154 | 155 | See more 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public class KKBOXOpenAPI
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
169 |
170 |
171 |
172 | 176 |
177 |
178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Classes Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

Classes

129 |

The following classes are available globally.

130 | 131 |
132 |
133 |
134 |
    135 |
  • 136 |
    137 | 138 | 139 | 140 | KKBOXOpenAPI 141 | 142 |
    143 |
    144 |
    145 |
    146 |
    147 |
    148 |

    The class helps you to access KKBOX’s Open API in Swift programming 149 | language.

    150 | 151 |

    Please create an instance of the class by calling 152 | KKBOXOpenAPI.init(clientID:, secret:, scope:) and then fetch an access 153 | token by passing a client credential. Then you can do the other API calls.

    154 | 155 | See more 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public class KKBOXOpenAPI
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
169 |
170 |
171 |
172 | 176 |
177 |
178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/Structs/KKSummary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKSummary Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKSummary

129 |
130 |
131 |
public struct KKSummary : Codable
132 | 133 |
134 |
135 |

An overall summary for a list.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | total 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The total amount of the items matching to your criteria.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var total: Int
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
169 |
170 |
171 |
172 | 176 |
177 |
178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Structs/KKSummary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKSummary Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKSummary

129 |
130 |
131 |
public struct KKSummary : Codable
132 | 133 |
134 |
135 |

An overall summary for a list.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | total 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The total amount of the items matching to your criteria.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var total: Int
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
169 |
170 |
171 |
172 | 176 |
177 |
178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token, .item .direct-link { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; 223 | transition: all 300ms; } 224 | .item .token-open { 225 | margin-left: 0px; } 226 | .item .discouraged { 227 | text-decoration: line-through; } 228 | .item .declaration-note { 229 | font-size: .85em; 230 | color: gray; 231 | font-style: italic; } 232 | 233 | .pointer-container { 234 | border-bottom: 1px solid #e2e2e2; 235 | left: -23px; 236 | padding-bottom: 13px; 237 | position: relative; 238 | width: 110%; } 239 | 240 | .pointer { 241 | background: #f9f9f9; 242 | border-left: 1px solid #e2e2e2; 243 | border-top: 1px solid #e2e2e2; 244 | height: 12px; 245 | left: 21px; 246 | top: -7px; 247 | -webkit-transform: rotate(45deg); 248 | -moz-transform: rotate(45deg); 249 | -o-transform: rotate(45deg); 250 | transform: rotate(45deg); 251 | position: absolute; 252 | width: 12px; } 253 | 254 | .height-container { 255 | display: none; 256 | left: -25px; 257 | padding: 0 25px; 258 | position: relative; 259 | width: 100%; 260 | overflow: hidden; } 261 | .height-container .section { 262 | background: #f9f9f9; 263 | border-bottom: 1px solid #e2e2e2; 264 | left: -25px; 265 | position: relative; 266 | width: 100%; 267 | padding-top: 10px; 268 | padding-bottom: 5px; } 269 | 270 | .aside, .language { 271 | padding: 6px 12px; 272 | margin: 12px 0; 273 | border-left: 5px solid #dddddd; 274 | overflow-y: hidden; } 275 | .aside .aside-title, .language .aside-title { 276 | font-size: 9px; 277 | letter-spacing: 2px; 278 | text-transform: uppercase; 279 | padding-bottom: 0; 280 | margin: 0; 281 | color: #aaa; 282 | -webkit-user-select: none; } 283 | .aside p:last-child, .language p:last-child { 284 | margin-bottom: 0; } 285 | 286 | .language { 287 | border-left: 5px solid #cde9f4; } 288 | .language .aside-title { 289 | color: #4b8afb; } 290 | 291 | .aside-warning, .aside-deprecated, .aside-unavailable { 292 | border-left: 5px solid #ff6666; } 293 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 294 | color: #ff0000; } 295 | 296 | .graybox { 297 | border-collapse: collapse; 298 | width: 100%; } 299 | .graybox p { 300 | margin: 0; 301 | word-break: break-word; 302 | min-width: 50px; } 303 | .graybox td { 304 | border: 1px solid #e2e2e2; 305 | padding: 5px 25px 5px 10px; 306 | vertical-align: middle; } 307 | .graybox tr td:first-of-type { 308 | text-align: right; 309 | padding: 7px; 310 | vertical-align: top; 311 | word-break: normal; 312 | width: 40px; } 313 | 314 | .slightly-smaller { 315 | font-size: 0.9em; } 316 | 317 | #footer { 318 | position: relative; 319 | top: 10px; 320 | bottom: 0px; 321 | margin-left: 25px; } 322 | #footer p { 323 | margin: 0; 324 | color: #aaa; 325 | font-size: 0.8em; } 326 | 327 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 328 | display: none; } 329 | 330 | html.dash .main-content { 331 | width: 980px; 332 | margin-left: 0; 333 | border: none; 334 | width: 100%; 335 | top: 0; 336 | padding-bottom: 0; } 337 | 338 | html.dash .height-container { 339 | display: block; } 340 | 341 | html.dash .item .token { 342 | margin-left: 0; } 343 | 344 | html.dash .content-wrapper { 345 | width: auto; } 346 | 347 | html.dash #footer { 348 | position: static; } 349 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token, .item .direct-link { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; 223 | transition: all 300ms; } 224 | .item .token-open { 225 | margin-left: 0px; } 226 | .item .discouraged { 227 | text-decoration: line-through; } 228 | .item .declaration-note { 229 | font-size: .85em; 230 | color: gray; 231 | font-style: italic; } 232 | 233 | .pointer-container { 234 | border-bottom: 1px solid #e2e2e2; 235 | left: -23px; 236 | padding-bottom: 13px; 237 | position: relative; 238 | width: 110%; } 239 | 240 | .pointer { 241 | background: #f9f9f9; 242 | border-left: 1px solid #e2e2e2; 243 | border-top: 1px solid #e2e2e2; 244 | height: 12px; 245 | left: 21px; 246 | top: -7px; 247 | -webkit-transform: rotate(45deg); 248 | -moz-transform: rotate(45deg); 249 | -o-transform: rotate(45deg); 250 | transform: rotate(45deg); 251 | position: absolute; 252 | width: 12px; } 253 | 254 | .height-container { 255 | display: none; 256 | left: -25px; 257 | padding: 0 25px; 258 | position: relative; 259 | width: 100%; 260 | overflow: hidden; } 261 | .height-container .section { 262 | background: #f9f9f9; 263 | border-bottom: 1px solid #e2e2e2; 264 | left: -25px; 265 | position: relative; 266 | width: 100%; 267 | padding-top: 10px; 268 | padding-bottom: 5px; } 269 | 270 | .aside, .language { 271 | padding: 6px 12px; 272 | margin: 12px 0; 273 | border-left: 5px solid #dddddd; 274 | overflow-y: hidden; } 275 | .aside .aside-title, .language .aside-title { 276 | font-size: 9px; 277 | letter-spacing: 2px; 278 | text-transform: uppercase; 279 | padding-bottom: 0; 280 | margin: 0; 281 | color: #aaa; 282 | -webkit-user-select: none; } 283 | .aside p:last-child, .language p:last-child { 284 | margin-bottom: 0; } 285 | 286 | .language { 287 | border-left: 5px solid #cde9f4; } 288 | .language .aside-title { 289 | color: #4b8afb; } 290 | 291 | .aside-warning, .aside-deprecated, .aside-unavailable { 292 | border-left: 5px solid #ff6666; } 293 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 294 | color: #ff0000; } 295 | 296 | .graybox { 297 | border-collapse: collapse; 298 | width: 100%; } 299 | .graybox p { 300 | margin: 0; 301 | word-break: break-word; 302 | min-width: 50px; } 303 | .graybox td { 304 | border: 1px solid #e2e2e2; 305 | padding: 5px 25px 5px 10px; 306 | vertical-align: middle; } 307 | .graybox tr td:first-of-type { 308 | text-align: right; 309 | padding: 7px; 310 | vertical-align: top; 311 | word-break: normal; 312 | width: 40px; } 313 | 314 | .slightly-smaller { 315 | font-size: 0.9em; } 316 | 317 | #footer { 318 | position: relative; 319 | top: 10px; 320 | bottom: 0px; 321 | margin-left: 25px; } 322 | #footer p { 323 | margin: 0; 324 | color: #aaa; 325 | font-size: 0.8em; } 326 | 327 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 328 | display: none; } 329 | 330 | html.dash .main-content { 331 | width: 980px; 332 | margin-left: 0; 333 | border: none; 334 | width: 100%; 335 | top: 0; 336 | padding-bottom: 0; } 337 | 338 | html.dash .height-container { 339 | display: block; } 340 | 341 | html.dash .item .token { 342 | margin-left: 0; } 343 | 344 | html.dash .content-wrapper { 345 | width: auto; } 346 | 347 | html.dash #footer { 348 | position: static; } 349 | -------------------------------------------------------------------------------- /docs/Enums/KKAPIResult.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKAPIResult Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKAPIResult

129 |
130 |
131 |
public enum KKAPIResult<T>
132 | 133 |
134 |
135 |

The response of API calls

136 | 137 |
    138 |
  • error: the API returns an error with an error object.
  • 139 |
  • success: the API is successfully called and return an object.
  • 140 |
141 | 142 |
143 |
144 |
145 |
    146 |
  • 147 |
    148 | 149 | 150 | 151 | success(_:) 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 |

    The API is successfully called and return an object.

    160 | 161 |
    162 |
    163 |

    Declaration

    164 |
    165 |

    Swift

    166 |
    case success(T)
    167 | 168 |
    169 |
    170 |
    171 |
    172 |
  • 173 |
  • 174 |
    175 | 176 | 177 | 178 | error(_:) 179 | 180 |
    181 |
    182 |
    183 |
    184 |
    185 |
    186 |

    the API returns an error with an error object.

    187 | 188 |
    189 |
    190 |

    Declaration

    191 |
    192 |

    Swift

    193 |
    case error(Error)
    194 | 195 |
    196 |
    197 |
    198 |
    199 |
  • 200 |
201 |
202 |
203 |
204 | 208 |
209 |
210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Enums/KKAPIResult.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKAPIResult Enumeration Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKAPIResult

129 |
130 |
131 |
public enum KKAPIResult<T>
132 | 133 |
134 |
135 |

The response of API calls

136 | 137 |
    138 |
  • error: the API returns an error with an error object.
  • 139 |
  • success: the API is successfully called and return an object.
  • 140 |
141 | 142 |
143 |
144 |
145 |
    146 |
  • 147 |
    148 | 149 | 150 | 151 | success(_:) 152 | 153 |
    154 |
    155 |
    156 |
    157 |
    158 |
    159 |

    The API is successfully called and return an object.

    160 | 161 |
    162 |
    163 |

    Declaration

    164 |
    165 |

    Swift

    166 |
    case success(T)
    167 | 168 |
    169 |
    170 |
    171 |
    172 |
  • 173 |
  • 174 |
    175 | 176 | 177 | 178 | error(_:) 179 | 180 |
    181 |
    182 |
    183 |
    184 |
    185 |
    186 |

    the API returns an error with an error object.

    187 | 188 |
    189 |
    190 |

    Declaration

    191 |
    192 |

    Swift

    193 |
    case error(Error)
    194 | 195 |
    196 |
    197 |
    198 |
    199 |
  • 200 |
201 |
202 |
203 |
204 | 208 |
209 |
210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/Structs/KKImageInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKImageInfo Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKImageInfo

129 |
130 |
131 |
public struct KKImageInfo : Codable
132 | 133 |
134 |
135 |

A struct that represents an image.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | width 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The width of the image.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var width: Float
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | height 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The height of the image.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var height: Float
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | url 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The URL of the image.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var url: URL?
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Structs/KKImageInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKImageInfo Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKImageInfo

129 |
130 |
131 |
public struct KKImageInfo : Codable
132 | 133 |
134 |
135 |

A struct that represents an image.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | width 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The width of the image.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var width: Float
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | height 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The height of the image.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var height: Float
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | url 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The URL of the image.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var url: URL?
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

Enumerations

129 |

The following enumerations are available globally.

130 | 131 |
132 |
133 |
134 |
    135 |
  • 136 |
    137 | 138 | 139 | 140 | KKTerritory 141 | 142 |
    143 |
    144 |
    145 |
    146 |
    147 |
    148 |

    The territory that KKBOX provides services.

    149 | 150 |
      151 |
    • taiwan: Taiwan
    • 152 |
    • hongkong: Hong Kong
    • 153 |
    • singapore: Singapore
    • 154 |
    • malaysia: Malaysia
    • 155 |
    • japan: Japan
    • 156 |
    157 | 158 | See more 159 |
    160 |
    161 |

    Declaration

    162 |
    163 |

    Swift

    164 |
    public enum KKTerritory : String, Codable
    165 | 166 |
    167 |
    168 |
    169 |
    170 |
  • 171 |
  • 172 |
    173 | 174 | 175 | 176 | KKAPIResult 177 | 178 |
    179 |
    180 |
    181 |
    182 |
    183 |
    184 |

    The response of API calls

    185 | 186 |
      187 |
    • error: the API returns an error with an error object.
    • 188 |
    • success: the API is successfully called and return an object.
    • 189 |
    190 | 191 | See more 192 |
    193 |
    194 |

    Declaration

    195 |
    196 |

    Swift

    197 |
    public enum KKAPIResult<T>
    198 | 199 |
    200 |
    201 |
    202 |
    203 |
  • 204 |
  • 205 |
    206 | 207 | 208 | 209 | KKBOXOpenAPIError 210 | 211 |
    212 |
    213 |
    214 |
    215 |
    216 |
    217 |

    Errors used in KKBOX Open API SDK.

    218 | 219 | See more 220 |
    221 |
    222 |

    Declaration

    223 |
    224 |

    Swift

    225 |
    public enum KKBOXOpenAPIError : Error, LocalizedError
    226 | 227 |
    228 |
    229 |
    230 |
    231 |
  • 232 |
233 |
234 |
235 |
236 | 240 |
241 |
242 | 243 | 244 | 245 | -------------------------------------------------------------------------------- /docs/Structs/KKAlbumList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKAlbumList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKAlbumList

129 |
130 |
131 |
public struct KKAlbumList : Codable
132 | 133 |
134 |
135 |

A list of albums.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | albums 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The albums.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var albums: [KKAlbumInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/Structs/KKTrackList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKTrackList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKTrackList

129 |
130 |
131 |
public struct KKTrackList : Codable
132 | 133 |
134 |
135 |

A list of tracks.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | tracks 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The tracks.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var tracks: [KKTrackInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/Structs/KKArtistList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKArtistList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKArtistList

129 |
130 |
131 |
public struct KKArtistList : Codable
132 | 133 |
134 |
135 |

A list of artists.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | artists 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The artists.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var artists: [KKArtistInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

Enumerations

129 |

The following enumerations are available globally.

130 | 131 |
132 |
133 |
134 |
    135 |
  • 136 |
    137 | 138 | 139 | 140 | KKTerritory 141 | 142 |
    143 |
    144 |
    145 |
    146 |
    147 |
    148 |

    The territory that KKBOX provides services.

    149 | 150 |
      151 |
    • taiwan: Taiwan
    • 152 |
    • hongkong: Hong Kong
    • 153 |
    • singapore: Singapore
    • 154 |
    • malaysia: Malaysia
    • 155 |
    • japan: Japan
    • 156 |
    157 | 158 | See more 159 |
    160 |
    161 |

    Declaration

    162 |
    163 |

    Swift

    164 |
    public enum KKTerritory : String, Codable
    165 | 166 |
    167 |
    168 |
    169 |
    170 |
  • 171 |
  • 172 |
    173 | 174 | 175 | 176 | KKAPIResult 177 | 178 |
    179 |
    180 |
    181 |
    182 |
    183 |
    184 |

    The response of API calls

    185 | 186 |
      187 |
    • error: the API returns an error with an error object.
    • 188 |
    • success: the API is successfully called and return an object.
    • 189 |
    190 | 191 | See more 192 |
    193 |
    194 |

    Declaration

    195 |
    196 |

    Swift

    197 |
    public enum KKAPIResult<T>
    198 | 199 |
    200 |
    201 |
    202 |
    203 |
  • 204 |
  • 205 |
    206 | 207 | 208 | 209 | KKBOXOpenAPIError 210 | 211 |
    212 |
    213 |
    214 |
    215 |
    216 |
    217 |

    Errors used in KKBOX Open API SDK.

    218 | 219 | See more 220 |
    221 |
    222 |

    Declaration

    223 |
    224 |

    Swift

    225 |
    public enum KKBOXOpenAPIError : Error, LocalizedError
    226 | 227 |
    228 |
    229 |
    230 |
    231 |
  • 232 |
233 |
234 |
235 |
236 | 240 |
241 |
242 | 243 | 244 | 245 | -------------------------------------------------------------------------------- /docs/Structs/KKPlaylistList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKPlaylistList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKPlaylistList

129 |
130 |
131 |
public struct KKPlaylistList : Codable
132 | 133 |
134 |
135 |

A list of tracks.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | playlists 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The playlists.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var playlists: [KKPlaylistInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Structs/KKAlbumList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKAlbumList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKAlbumList

129 |
130 |
131 |
public struct KKAlbumList : Codable
132 | 133 |
134 |
135 |

A list of albums.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | albums 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The albums.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var albums: [KKAlbumInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /docs/docsets/KKBOXOpenAPISwift.docset/Contents/Resources/Documents/Structs/KKTrackList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | KKTrackList Structure Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

KKBOXOpenAPISwift Docs (98% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 125 |
126 |
127 |
128 |

KKTrackList

129 |
130 |
131 |
public struct KKTrackList : Codable
132 | 133 |
134 |
135 |

A list of tracks.

136 | 137 |
138 |
139 |
140 |
    141 |
  • 142 |
    143 | 144 | 145 | 146 | tracks 147 | 148 |
    149 |
    150 |
    151 |
    152 |
    153 |
    154 |

    The tracks.

    155 | 156 |
    157 |
    158 |

    Declaration

    159 |
    160 |

    Swift

    161 |
    public internal(set) var tracks: [KKTrackInfo]
    162 | 163 |
    164 |
    165 |
    166 |
    167 |
  • 168 |
  • 169 |
    170 | 171 | 172 | 173 | paging 174 | 175 |
    176 |
    177 |
    178 |
    179 |
    180 |
    181 |

    The pagination info.

    182 | 183 |
    184 |
    185 |

    Declaration

    186 |
    187 |

    Swift

    188 |
    public internal(set) var paging: KKPagingInfo
    189 | 190 |
    191 |
    192 |
    193 |
    194 |
  • 195 |
  • 196 |
    197 | 198 | 199 | 200 | summary 201 | 202 |
    203 |
    204 |
    205 |
    206 |
    207 |
    208 |

    The overall summary.

    209 | 210 |
    211 |
    212 |

    Declaration

    213 |
    214 |

    Swift

    215 |
    public internal(set) var summary: KKSummary
    216 | 217 |
    218 |
    219 |
    220 |
    221 |
  • 222 |
223 |
224 |
225 |
226 | 230 |
231 |
232 | 233 | 234 | 235 | --------------------------------------------------------------------------------