├── .gitignore ├── ExampleClient ├── TestOpenAPI │ ├── TestOpenAPIClient │ │ ├── .gitignore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── layout │ │ │ │ │ │ └── activity_main.xml │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── kkbox │ │ │ │ │ │ └── testopenapi │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── test │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── kkbox │ │ │ │ │ └── testopenapi │ │ │ │ │ └── ExampleUnitTest.java │ │ │ └── androidTest │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── kkbox │ │ │ │ └── testopenapi │ │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── .idea │ │ ├── copyright │ │ │ └── profiles_settings.xml │ │ ├── markdown-navigator │ │ │ └── profiles_settings.xml │ │ ├── vcs.xml │ │ ├── markdown-exported-files.xml │ │ ├── runConfigurations.xml │ │ ├── modules.xml │ │ ├── compiler.xml │ │ ├── gradle.xml │ │ └── misc.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ ├── build.gradle │ └── gradle.properties ├── kkbox-open-api-smart-speaker │ ├── app │ │ ├── .gitignore │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── layout │ │ │ │ │ │ └── activity_main.xml │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── kkbox │ │ │ │ │ │ └── yunwenlin │ │ │ │ │ │ └── smart_speaker │ │ │ │ │ │ ├── SpeechRecognizeClient.kt │ │ │ │ │ │ └── HTTPRequestToKKbox.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── test │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── kkbox │ │ │ │ │ └── yunwenlin │ │ │ │ │ └── smart_speaker │ │ │ │ │ └── ExampleUnitTest.java │ │ │ └── androidTest │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── kkbox │ │ │ │ └── yunwenlin │ │ │ │ └── smart_speaker │ │ │ │ └── ExampleInstrumentedTest.java │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── settings.gradle │ ├── .idea │ │ ├── copyright │ │ │ └── profiles_settings.xml │ │ ├── markdown-navigator │ │ │ └── profiles_settings.xml │ │ ├── vcs.xml │ │ ├── inspectionProfiles │ │ │ ├── profiles_settings.xml │ │ │ └── Project_Default.xml │ │ ├── modules.xml │ │ ├── runConfigurations.xml │ │ ├── gradle.xml │ │ ├── compiler.xml │ │ └── misc.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── sync-request.json │ ├── build.gradle │ └── gradle.properties └── .DS_Store ├── SDK └── openapi_android_developer_sdk │ ├── OpenAPIDeveloperLibraryClient │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_main.xml │ │ │ │ │ └── track_list_row.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── kkbox │ │ │ │ │ └── openapideveloperlibraryclient │ │ │ │ │ └── tracks │ │ │ │ │ └── TrackInfo.kt │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── kkbox │ │ │ │ └── openapideveloperlibraryclienttest │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── kkbox │ │ │ └── openapideveloperlibraryclienttest │ │ │ └── ExampleInstrumentedTest.java │ ├── proguard-rules.pro │ └── build.gradle │ ├── settings.gradle │ ├── OpenAPIDeveloperLibrary │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── kkbox │ │ │ │ └── openapideveloper │ │ │ │ ├── auth │ │ │ │ ├── Auth.kt │ │ │ │ └── ClientCredentialsFlow.kt │ │ │ │ ├── Endpoint.kt │ │ │ │ └── api │ │ │ │ ├── Api.kt │ │ │ │ ├── TrackFetcher.kt │ │ │ │ ├── SearchFetcher.kt │ │ │ │ └── MoodStationFetcher.kt │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── kkbox │ │ │ │ └── openapitest │ │ │ │ └── ExampleUnitTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── kkbox │ │ │ └── openapidevelopertest │ │ │ ├── auth │ │ │ ├── ClientCredentialsFlowTest.kt │ │ │ ├── AuthTest.kt │ │ │ └── TokenFetcherTest.kt │ │ │ └── api │ │ │ ├── SearchFetcherTest.kt │ │ │ ├── TrackFetcherTest.kt │ │ │ ├── MoodStationFetcherTest.kt │ │ │ ├── GenreStationFetcherTest.kt │ │ │ ├── AlbumFetcherTest.kt │ │ │ ├── NewReleaseCategoryFetcherTest.kt │ │ │ ├── SharedPlaylistFetcherTest.kt │ │ │ ├── ArtistFetcherTest.kt │ │ │ ├── FeaturedPlaylistCategoryFetcherTest.kt │ │ │ └── ChartFetcherTest.kt │ └── proguard-rules.pro │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ └── build.gradle └── docs ├── package-list ├── com.kkbox.openapideveloper ├── -endpoint │ ├── -init-.md │ ├── -a-p-i │ │ ├── -search-type.md │ │ ├── uri.md │ │ ├── -m-e.md │ │ ├── -u-s-e-r-s.md │ │ ├── -a-l-b-u-m-s.md │ │ ├── -c-h-a-r-t-s.md │ │ ├── -s-e-a-r-c-h.md │ │ ├── -t-r-a-c-k-s.md │ │ ├── -a-r-t-i-s-t-s.md │ │ ├── -t-i-c-k-e-t-s.md │ │ ├── -p-l-a-y-l-i-s-t-s.md │ │ ├── -m-o-o-d_-s-t-a-t-i-o-n-s.md │ │ ├── -g-e-n-r-e_-s-t-a-t-i-o-n-s.md │ │ ├── -s-h-a-r-e-d_-p-l-a-y-l-i-s-t-s.md │ │ ├── -f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s.md │ │ ├── -n-e-w_-h-i-t-s_-p-l-a-y-l-i-s-t-s.md │ │ ├── -n-e-w_-r-e-l-e-a-s-e_-c-a-t-e-g-o-r-i-e-s.md │ │ ├── -f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s_-c-a-t-e-g-o-r-i-e-s.md │ │ └── index.md │ ├── -auth │ │ ├── uri.md │ │ ├── -t-o-k-e-n.md │ │ ├── -device-code.md │ │ ├── -t-o-k-e-n_-i-n-f-o.md │ │ ├── -authorization.md │ │ ├── -generate-q-r-code.md │ │ └── index.md │ └── index.md ├── -a-p-i_-d-o-m-a-i-n.md ├── -o-auth_-d-o-m-a-i-n.md └── index.md ├── com.kkbox.openapideveloper.api ├── -api │ ├── album-fetcher.md │ ├── chart-fetcher.md │ ├── track-fetcher.md │ ├── artist-fetcher.md │ ├── search-fetcher.md │ ├── mood-station-fetcher.md │ ├── genre-station-fetcher.md │ ├── hits-playlist-fetcher.md │ ├── featured-playlist-fetcher.md │ ├── release-category-fetcher.md │ ├── featured-playlist-category-fetcher.md │ └── -init-.md ├── -search-fetcher │ ├── q.md │ ├── type.md │ ├── -init-.md │ ├── set-search-criteria.md │ ├── fetch-search-result.md │ └── index.md ├── -album-fetcher │ ├── album-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── get-widget-uri.md │ ├── set-album-id.md │ ├── fetch-tracks.md │ └── index.md ├── -track-fetcher │ ├── track-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-track-id.md │ ├── get-widget-uri.md │ └── index.md ├── -artist-fetcher │ ├── artist-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-artist-id.md │ ├── fetch-albums.md │ ├── fetch-top-tracks.md │ └── index.md ├── -shared-playlist-fetcher │ ├── playlist-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── get-widget-uri.md │ ├── set-playlist-id.md │ ├── fetch-tracks.md │ └── index.md ├── -new-hits-playlist-fetcher │ ├── playlist-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-playlist-id.md │ ├── fetch-all-new-hits-playlists.md │ └── index.md ├── -mood-station-fetcher │ ├── mood-station-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-mood-station-id.md │ ├── fetch-all-mood-stations.md │ └── index.md ├── -genre-station-fetcher │ ├── genre-station-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-genre-station-id.md │ ├── fetch-all-genre-stations.md │ └── index.md ├── -new-release-category-fetcher │ ├── category-id.md │ ├── fetch-metadata.md │ ├── -init-.md │ ├── set-category-id.md │ ├── fetch-albums.md │ ├── fetch-all-new-release-categories.md │ └── index.md ├── -featured-playlist-category-fetcher │ ├── category-id.md │ ├── -init-.md │ ├── fetch-metadata.md │ ├── set-category-id.md │ ├── fetch-playlists.md │ ├── fetch-all-featured-playlist-categories.md │ └── index.md ├── -chart-fetcher │ ├── -init-.md │ ├── fetch-charts.md │ └── index.md ├── -http-client │ ├── -init-.md │ ├── post.md │ ├── get.md │ └── index.md └── -featured-playlist-fetcher │ ├── -init-.md │ ├── index.md │ └── fetch-all-featured-playlists.md ├── com.kkbox.openapideveloper.auth ├── -auth │ ├── token-fetcher.md │ ├── client-credentials-flow.md │ ├── -init-.md │ └── index.md ├── -token-fetcher │ ├── client-i-d.md │ ├── context.md │ ├── client-secret.md │ ├── -init-.md │ ├── refresh.md │ ├── fetch-access-token.md │ ├── fetch-info.md │ └── index.md ├── -client-credentials-flow │ ├── -init-.md │ ├── fetch-access-token.md │ └── index.md └── index.md └── index.md /.gitignore: -------------------------------------------------------------------------------- 1 | */.DS_Store 2 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ExampleClient/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/.DS_Store -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':OpenAPIDeveloperLibrary', ':OpenAPIDeveloperLibraryClient' 2 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | ClientInfo.kt 3 | 4 | /local.properties 5 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TestOpenAPI 3 | 4 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Smart-speaker 3 | 4 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OpenAPI 3 | 4 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /docs/package-list: -------------------------------------------------------------------------------- 1 | $dokka.format:jekyll 2 | $dokka.linkExtension:html 3 | 4 | com.kkbox.openapideveloper 5 | com.kkbox.openapideveloper.api 6 | com.kkbox.openapideveloper.auth 7 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | OpenAPI Developer Search 3 | 4 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':TestOpenAPIClient', ':openapilibrary' 2 | project(':openapilibrary').projectDir = new File(settingsDir, '../../SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/') -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/java/com/kkbox/yunwenlin/smart_speaker/SpeechRecognizeClient.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.yunwenlin.smart_speaker 2 | 3 | /** 4 | * Created by yunwenlin on 2017/8/29. 5 | */ 6 | class SpeechRecognizeClient { 7 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/markdown-exported-files.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KKBOX/OpenAPI-Android/HEAD/SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jan 10 18:58:39 CST 2018 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 6 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Feb 05 11:56:01 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Sep 26 16:11:11 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/sync-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "config": { 3 | "encoding":"FLAC", 4 | "sampleRateHertz": 16000, 5 | "languageCode": "en-US", 6 | "enableWordTimeOffsets": false 7 | }, 8 | "audio": { 9 | "uri": "gs://cloud-samples-tests/speech/brooklyn.flac" 10 | } 11 | } -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper](../index.html) / [Endpoint](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `Endpoint()` 10 | 11 | API Endpoint. 12 | 13 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-a-p-i_-d-o-m-a-i-n.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API_DOMAIN - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../index.html) / [com.kkbox.openapideveloper](index.html) / [API_DOMAIN](.) 6 | 7 | # API_DOMAIN 8 | 9 | `val API_DOMAIN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-search-type.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.SearchType - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [SearchType](.) 6 | 7 | # SearchType 8 | 9 | `enum class SearchType` -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/album-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.albumFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [albumFetcher](.) 6 | 7 | # albumFetcher 8 | 9 | `val albumFetcher: `[`AlbumFetcher`](../-album-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/chart-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.chartFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [chartFetcher](.) 6 | 7 | # chartFetcher 8 | 9 | `val chartFetcher: `[`ChartFetcher`](../-chart-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/track-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.trackFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [trackFetcher](.) 6 | 7 | # trackFetcher 8 | 9 | `val trackFetcher: `[`TrackFetcher`](../-track-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-o-auth_-d-o-m-a-i-n.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: OAuth_DOMAIN - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../index.html) / [com.kkbox.openapideveloper](index.html) / [OAuth_DOMAIN](.) 6 | 7 | # OAuth_DOMAIN 8 | 9 | `val OAuth_DOMAIN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/artist-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.artistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [artistFetcher](.) 6 | 7 | # artistFetcher 8 | 9 | `val artistFetcher: `[`ArtistFetcher`](../-artist-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/search-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.searchFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [searchFetcher](.) 6 | 7 | # searchFetcher 8 | 9 | `val searchFetcher: `[`SearchFetcher`](../-search-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-auth/token-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Auth.tokenFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [Auth](index.html) / [tokenFetcher](.) 6 | 7 | # tokenFetcher 8 | 9 | `val tokenFetcher: `[`TokenFetcher`](../-token-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/q.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher.q - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](index.html) / [q](.) 6 | 7 | # q 8 | 9 | `lateinit var q: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/type.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher.type - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](index.html) / [type](.) 6 | 7 | # type 8 | 9 | `var type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/uri.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.uri - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [uri](.) 6 | 7 | # uri 8 | 9 | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/uri.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.uri - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [uri](.) 6 | 7 | # uri 8 | 9 | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/mood-station-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.moodStationFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [moodStationFetcher](.) 6 | 7 | # moodStationFetcher 8 | 9 | `val moodStationFetcher: `[`MoodStationFetcher`](../-mood-station-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/album-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher.albumId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [albumId](.) 6 | 7 | # albumId 8 | 9 | `lateinit var albumId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/genre-station-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.genreStationFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [genreStationFetcher](.) 6 | 7 | # genreStationFetcher 8 | 9 | `val genreStationFetcher: `[`GenreStationFetcher`](../-genre-station-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/track-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher.trackId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](index.html) / [trackId](.) 6 | 7 | # trackId 8 | 9 | `lateinit var trackId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/artist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher.artistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [artistId](.) 6 | 7 | # artistId 8 | 9 | `lateinit var artistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/hits-playlist-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.hitsPlaylistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [hitsPlaylistFetcher](.) 6 | 7 | # hitsPlaylistFetcher 8 | 9 | `val hitsPlaylistFetcher: `[`NewHitsPlaylistFetcher`](../-new-hits-playlist-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-auth/client-credentials-flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Auth.clientCredentialsFlow - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [Auth](index.html) / [clientCredentialsFlow](.) 6 | 7 | # clientCredentialsFlow 8 | 9 | `val clientCredentialsFlow: `[`ClientCredentialsFlow`](../-client-credentials-flow/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/featured-playlist-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.featuredPlaylistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [featuredPlaylistFetcher](.) 6 | 7 | # featuredPlaylistFetcher 8 | 9 | `val featuredPlaylistFetcher: `[`FeaturedPlaylistFetcher`](../-featured-playlist-fetcher/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/release-category-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.releaseCategoryFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [releaseCategoryFetcher](.) 6 | 7 | # releaseCategoryFetcher 8 | 9 | `val releaseCategoryFetcher: `[`NewReleaseCategoryFetcher`](../-new-release-category-fetcher/index.html) -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/java/com/kkbox/yunwenlin/smart_speaker/HTTPRequestToKKbox.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.yunwenlin.smart_speaker 2 | 3 | import android.os.AsyncTask 4 | 5 | 6 | class HTTPRequestToKKbox: AsyncTask() { 7 | 8 | var kkboxClient = KKboxOpenAPIClient() 9 | override fun doInBackground(vararg p: String) { 10 | kkboxClient.doSearch(p[0], p[1], p[2]) 11 | } 12 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/playlist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher.playlistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [playlistId](.) 6 | 7 | # playlistId 8 | 9 | `lateinit var playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](.) 6 | 7 | ### Packages 8 | 9 | | [com.kkbox.openapideveloper](com.kkbox.openapideveloper/index.html) | | 10 | | [com.kkbox.openapideveloper.api](com.kkbox.openapideveloper.api/index.html) | | 11 | | [com.kkbox.openapideveloper.auth](com.kkbox.openapideveloper.auth/index.html) | | 12 | 13 | ### Index 14 | 15 | [All Types](alltypes/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/playlist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher.playlistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](index.html) / [playlistId](.) 6 | 7 | # playlistId 8 | 9 | `lateinit var playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/mood-station-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher.moodStationId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](index.html) / [moodStationId](.) 6 | 7 | # moodStationId 8 | 9 | `lateinit var moodStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/genre-station-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher.genreStationId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](index.html) / [genreStationId](.) 6 | 7 | # genreStationId 8 | 9 | `lateinit var genreStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/category-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher.categoryId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [categoryId](.) 6 | 7 | # categoryId 8 | 9 | `lateinit var categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/category-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher.categoryId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [categoryId](.) 6 | 7 | # categoryId 8 | 9 | `lateinit var categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/java/com/kkbox/testopenapi/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.testopenapi; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | 6 | public class MainActivity extends AppCompatActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | setContentView(R.layout.activity_main); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-m-e.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.ME - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [ME](.) 6 | 7 | # ME 8 | 9 | `ME` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/featured-playlist-category-fetcher.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api.featuredPlaylistCategoryFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [featuredPlaylistCategoryFetcher](.) 6 | 7 | # featuredPlaylistCategoryFetcher 8 | 9 | `val featuredPlaylistCategoryFetcher: `[`FeaturedPlaylistCategoryFetcher`](../-featured-playlist-category-fetcher/index.html) -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-u-s-e-r-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.USERS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [USERS](.) 6 | 7 | # USERS 8 | 9 | `USERS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/-t-o-k-e-n.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.TOKEN - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [TOKEN](.) 6 | 7 | # TOKEN 8 | 9 | `TOKEN` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-a-l-b-u-m-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.ALBUMS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [ALBUMS](.) 6 | 7 | # ALBUMS 8 | 9 | `ALBUMS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-c-h-a-r-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.CHARTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [CHARTS](.) 6 | 7 | # CHARTS 8 | 9 | `CHARTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-s-e-a-r-c-h.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.SEARCH - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [SEARCH](.) 6 | 7 | # SEARCH 8 | 9 | `SEARCH` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-t-r-a-c-k-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.TRACKS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [TRACKS](.) 6 | 7 | # TRACKS 8 | 9 | `TRACKS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-a-r-t-i-s-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.ARTISTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [ARTISTS](.) 6 | 7 | # ARTISTS 8 | 9 | `ARTISTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-t-i-c-k-e-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.TICKETS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [TICKETS](.) 6 | 7 | # TICKETS 8 | 9 | `TICKETS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-p-l-a-y-l-i-s-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.PLAYLISTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [PLAYLISTS](.) 6 | 7 | # PLAYLISTS 8 | 9 | `PLAYLISTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/-device-code.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.DeviceCode - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [DeviceCode](.) 6 | 7 | # DeviceCode 8 | 9 | `DeviceCode` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/-t-o-k-e-n_-i-n-f-o.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.TOKEN_INFO - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [TOKEN_INFO](.) 6 | 7 | # TOKEN_INFO 8 | 9 | `TOKEN_INFO` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/-authorization.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.Authorization - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [Authorization](.) 6 | 7 | # Authorization 8 | 9 | `Authorization` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper](../index.html) / [Endpoint](.) 6 | 7 | # Endpoint 8 | 9 | `class Endpoint` 10 | 11 | API Endpoint. 12 | 13 | ### Types 14 | 15 | | [API](-a-p-i/index.html) | `enum class API` | 16 | | [Auth](-auth/index.html) | `enum class Auth` | 17 | 18 | ### Constructors 19 | 20 | | [<init>](-init-.html) | `Endpoint()`
API Endpoint. | 21 | 22 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-m-o-o-d_-s-t-a-t-i-o-n-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.MOOD_STATIONS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [MOOD_STATIONS](.) 6 | 7 | # MOOD_STATIONS 8 | 9 | `MOOD_STATIONS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/-generate-q-r-code.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth.GenerateQRCode - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](index.html) / [GenerateQRCode](.) 6 | 7 | # GenerateQRCode 8 | 9 | `GenerateQRCode` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-g-e-n-r-e_-s-t-a-t-i-o-n-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.GENRE_STATIONS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [GENRE_STATIONS](.) 6 | 7 | # GENRE_STATIONS 8 | 9 | `GENRE_STATIONS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/client-i-d.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.clientID - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [clientID](.) 6 | 7 | # clientID 8 | 9 | `val clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) 10 | 11 | the client ID for accessing kkbox open api. 12 | 13 | ### Property 14 | 15 | `clientID` - the client ID for accessing kkbox open api. -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/context.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.context - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [context](.) 6 | 7 | # context 8 | 9 | `val context: `[`Context`](https://developer.android.com/reference/android/content/Context.html) 10 | 11 | the context needed for creating http connection. 12 | 13 | ### Property 14 | 15 | `context` - the context needed for creating http connection. -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/test/java/com/kkbox/testopenapi/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.testopenapi; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-client-credentials-flow/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ClientCredentialsFlow. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [ClientCredentialsFlow](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `ClientCredentialsFlow(tokenFetcher: `[`TokenFetcher`](../-token-fetcher/index.html)`)` 10 | 11 | Implements the client credentials flow. Used for accessing APIs that don't need any KKBOX user's personal data. 12 | 13 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetches metadata of an artist. 12 | 13 | ``` kotlin 14 | this.artistId = artistId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the artist's metadata object. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-s-h-a-r-e-d_-p-l-a-y-l-i-s-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.SHARED_PLAYLISTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [SHARED_PLAYLISTS](.) 6 | 7 | # SHARED_PLAYLISTS 8 | 9 | `SHARED_PLAYLISTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetches metadata of an album by given ID. 12 | 13 | ``` kotlin 14 | this.albumId = albumId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the album's metadata object. 20 | 21 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/test/java/com/kkbox/openapitest/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapitest; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch metadata of a track by given ID. 12 | 13 | ``` kotlin 14 | this.trackId = trackId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of the track's metadata. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.FEATURED_PLAYLISTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [FEATURED_PLAYLISTS](.) 6 | 7 | # FEATURED_PLAYLISTS 8 | 9 | `FEATURED_PLAYLISTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-n-e-w_-h-i-t-s_-p-l-a-y-l-i-s-t-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.NEW_HITS_PLAYLISTS - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [NEW_HITS_PLAYLISTS](.) 6 | 7 | # NEW_HITS_PLAYLISTS 8 | 9 | `NEW_HITS_PLAYLISTS` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/test/java/com/kkbox/yunwenlin/smart_speaker/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.yunwenlin.smart_speaker; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/client-secret.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.clientSecret - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [clientSecret](.) 6 | 7 | # clientSecret 8 | 9 | `val clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) 10 | 11 | the client secret for accessing kkbox open api. 12 | 13 | ### Property 14 | 15 | `clientSecret` - the client secret for accessing kkbox open api. -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `AlbumFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates an album fetcher. 12 | 13 | **Constructor** 14 | Creates an album fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-chart-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ChartFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ChartFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `ChartFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | creates a chart fetcher. 12 | 13 | **Constructor** 14 | creates a chart fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `TrackFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a track fetcher. 12 | 13 | **Constructor** 14 | Creates a track fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `ArtistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates an artist fetcher. 12 | 13 | **Constructor** 14 | Creates an artist fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/set-track-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher.setTrackId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](index.html) / [setTrackId](.) 6 | 7 | # setTrackId 8 | 9 | `fun setTrackId(trackId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`TrackFetcher`](index.html) 10 | 11 | Set the track ID. 12 | 13 | ### Parameters 14 | 15 | `trackId` - The track ID. 16 | 17 | **Return** 18 | the track ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-n-e-w_-r-e-l-e-a-s-e_-c-a-t-e-g-o-r-i-e-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.NEW_RELEASE_CATEGORIES - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [NEW_RELEASE_CATEGORIES](.) 6 | 7 | # NEW_RELEASE_CATEGORIES 8 | 9 | `NEW_RELEASE_CATEGORIES` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/java/com/kkbox/openapideveloperlibraryclient/tracks/TrackInfo.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloperlibraryclient.tracks 2 | 3 | /** 4 | * Created by sharonyang on 2017/9/26. 5 | */ 6 | 7 | class TrackInfo { 8 | var name: String = "" 9 | var artist: String = "" 10 | var albumImage: String = "" 11 | 12 | constructor() {} 13 | 14 | constructor(name: String, artist: String, albumImage: String) { 15 | this.name = name 16 | this.artist = artist 17 | this.albumImage = albumImage 18 | } 19 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/get-widget-uri.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher.getWidgetUri - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [getWidgetUri](.) 6 | 7 | # getWidgetUri 8 | 9 | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) 10 | 11 | Get the widget url of the album. 12 | 13 | ``` kotlin 14 | //Missing function name in @sample 15 | ``` 16 | 17 | **Return** 18 | the widget url of the album. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/set-album-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher.setAlbumId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [setAlbumId](.) 6 | 7 | # setAlbumId 8 | 9 | `fun setAlbumId(albumId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`AlbumFetcher`](index.html) 10 | 11 | Set the album ID. 12 | 13 | ### Parameters 14 | 15 | `albumId` - The album ID. 16 | 17 | **Return** 18 | the AlbumFetcher object. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/get-widget-uri.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher.getWidgetUri - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](index.html) / [getWidgetUri](.) 6 | 7 | # getWidgetUri 8 | 9 | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) 10 | 11 | Get the widget url of the track. 12 | 13 | ``` kotlin 14 | //Missing function name in @sample 15 | ``` 16 | 17 | **Return** 18 | the widget url of the track. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch metadata of a mood station by given ID. 12 | 13 | ``` kotlin 14 | this.moodStationId = moodStationId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of mood station metadata. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `FeaturedPlaylistCategoryFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | List featured playlist categories. 12 | 13 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch metadata of a genre station by given ID. 12 | 13 | ``` kotlin 14 | this.genreStationId = genreStationId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of genre stations metadata. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-http-client/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HttpClient. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [HttpClient](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `HttpClient(token: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)` 10 | 11 | Creates a http client instance 12 | 13 | **Constructor** 14 | Creates a http client instance 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch new hits playlist by given ID. 12 | 13 | ``` kotlin 14 | this.playlistId = playlistId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of new hits playlist's metadata. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch the shared playlist by given ID. 12 | 13 | ``` kotlin 14 | this.playlistId = playlistId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of the shared playlist's metadata. 20 | 21 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/test/java/com/kkbox/openapideveloperlibraryclienttest/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloperlibraryclienttest; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `MoodStationFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a mood station fetcher. 12 | 13 | **Constructor** 14 | Creates a mood station fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/set-artist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher.setArtistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [setArtistId](.) 6 | 7 | # setArtistId 8 | 9 | `fun setArtistId(artistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`ArtistFetcher`](index.html) 10 | 11 | Init the artist object. 12 | 13 | ### Parameters 14 | 15 | `artistId` - The id of an artist. 16 | 17 | **Return** 18 | the ArtistFetcher object. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `GenreStationFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a genre station fetcher. 12 | 13 | **Constructor** 14 | Creates a genre station fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch new release category by given ID. 12 | 13 | ``` kotlin 14 | this.categoryId = categoryId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the object of new release category's metadata. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-client-credentials-flow/fetch-access-token.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ClientCredentialsFlow.fetchAccessToken - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [ClientCredentialsFlow](index.html) / [fetchAccessToken](.) 6 | 7 | # fetchAccessToken 8 | 9 | `fun fetchAccessToken(): ResponseFuture` 10 | 11 | Fetch access token. 12 | 13 | ``` kotlin 14 | return tokenFetcher.fetchAccessToken(mapOf("grant_type" to listOf("client_credentials"))) 15 | ``` 16 | 17 | **Return** 18 | the access token. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/fetch-metadata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher.fetchMetadata - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [fetchMetadata](.) 6 | 7 | # fetchMetadata 8 | 9 | `fun fetchMetadata(): ResponseFuture` 10 | 11 | Fetch metadata of the category you init. 12 | 13 | ``` kotlin 14 | this.categoryId = categoryId 15 | return this 16 | ``` 17 | 18 | **Return** 19 | the category's metadata object. 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/-f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s_-c-a-t-e-g-o-r-i-e-s.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API.FEATURED_PLAYLISTS_CATEGORIES - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](index.html) / [FEATURED_PLAYLISTS_CATEGORIES](.) 6 | 7 | # FEATURED_PLAYLISTS_CATEGORIES 8 | 9 | `FEATURED_PLAYLISTS_CATEGORIES` 10 | 11 | ### Inherited Properties 12 | 13 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `SharedPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a shared playlist fetcher. 12 | 13 | **Constructor** 14 | Creates a shared playlist fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/get-widget-uri.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher.getWidgetUri - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [getWidgetUri](.) 6 | 7 | # getWidgetUri 8 | 9 | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) 10 | 11 | Get the widget url of the album. 12 | 13 | ``` kotlin 14 | //Missing function name in @sample 15 | ``` 16 | 17 | **Return** 18 | the widget url of the shared plalyist. 19 | 20 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `NewHitsPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a new hits playlist fetcher. 12 | 13 | **Constructor** 14 | Creates a new hits playlist fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `FeaturedPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a featured playlist fetcher. 12 | 13 | **Constructor** 14 | Creates a featured playlist fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-auth/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Auth. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [Auth](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `Auth(clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)` 10 | 11 | The instance of this class fetches the authorization. 12 | 13 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-http-client/post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HttpClient.post - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [HttpClient](index.html) / [post](.) 6 | 7 | # post 8 | 9 | `fun post(endpoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, data: JsonObject): ResponseFuture` 10 | 11 | Http post method. 12 | 13 | ### Parameters 14 | 15 | `endpoint` - 16 | * Uri endpoint. 17 | 18 | `data` - 19 | * Json body data. 20 | 21 | **Return** 22 | the Future object that will return the http response 23 | 24 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `NewReleaseCategoryFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Creates a new release category fetcher. 12 | 13 | **Constructor** 14 | Creates a new release category fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/set-mood-station-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher.setMoodStationId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](index.html) / [setMoodStationId](.) 6 | 7 | # setMoodStationId 8 | 9 | `fun setMoodStationId(moodStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`MoodStationFetcher`](index.html) 10 | 11 | Set a mood station ID. 12 | 13 | ### Parameters 14 | 15 | `moodStationId` - The station ID. 16 | 17 | **Return** 18 | the mood station ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/set-playlist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher.setPlaylistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [setPlaylistId](.) 6 | 7 | # setPlaylistId 8 | 9 | `fun setPlaylistId(playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`SharedPlaylistFetcher`](index.html) 10 | 11 | Set the shared playlist ID. 12 | 13 | ### Parameters 14 | 15 | `playlistId` - The playlist ID. 16 | 17 | **Return** 18 | the shared playlist ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/set-playlist-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher.setPlaylistId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](index.html) / [setPlaylistId](.) 6 | 7 | # setPlaylistId 8 | 9 | `fun setPlaylistId(playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`NewHitsPlaylistFetcher`](index.html) 10 | 11 | Set the new hits playlist ID. 12 | 13 | ### Parameters 14 | 15 | `playlistId` - The playlist ID. 16 | 17 | **Return** 18 | the new hit playlist ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/set-genre-station-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher.setGenreStationId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](index.html) / [setGenreStationId](.) 6 | 7 | # setGenreStationId 8 | 9 | `fun setGenreStationId(genreStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`GenreStationFetcher`](index.html) 10 | 11 | Set a genre station ID. 12 | 13 | ### Parameters 14 | 15 | `genreStationId` - The station ID. 16 | 17 | **Return** 18 | the genreStation ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/set-category-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher.setCategoryId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [setCategoryId](.) 6 | 7 | # setCategoryId 8 | 9 | `fun setCategoryId(categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`NewReleaseCategoryFetcher`](index.html) 10 | 11 | Set the category ID 12 | 13 | ### Parameters 14 | 15 | `categoryId` - the category ID. 16 | 17 | **Return** 18 | the new release category ID. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: com.kkbox.openapideveloper - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../index.html) / [com.kkbox.openapideveloper](.) 6 | 7 | ## Package com.kkbox.openapideveloper 8 | 9 | ### Types 10 | 11 | | [Endpoint](-endpoint/index.html) | `class Endpoint`
API Endpoint. | 12 | 13 | ### Properties 14 | 15 | | [API_DOMAIN](-a-p-i_-d-o-m-a-i-n.html) | `val API_DOMAIN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 16 | | [OAuth_DOMAIN](-o-auth_-d-o-m-a-i-n.html) | `val OAuth_DOMAIN: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 17 | 18 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/auth/Auth.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.auth 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * The instance of this class fetches the authorization. 7 | * 8 | * @property clientID the client ID for accessing kkbox open api. 9 | * @property clientSecret the client secret for accessing kkbox open api. 10 | * @property context the context needed for creating http connection. 11 | */ 12 | class Auth(clientID: String, clientSecret: String, context: Context) { 13 | val tokenFetcher = TokenFetcher(clientID, clientSecret, context) 14 | val clientCredentialsFlow = ClientCredentialsFlow(tokenFetcher) 15 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `SearchFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")` 10 | 11 | Search API, the types it can search includes artists, albums, tracks, or playlists. 12 | Default to search all types, use "," to separate types if you want to use multiple 13 | types to search at the same time. 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `TokenFetcher(clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)` 10 | 11 | creates a token fetcher. 12 | 13 | **Constructor** 14 | creates a token fetcher. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-auth/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.Auth - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [Auth](.) 6 | 7 | # Auth 8 | 9 | `enum class Auth` 10 | 11 | ### Enum Values 12 | 13 | | [TOKEN](-t-o-k-e-n.html) | | 14 | | [TOKEN_INFO](-t-o-k-e-n_-i-n-f-o.html) | | 15 | | [Authorization](-authorization.html) | | 16 | | [DeviceCode](-device-code.html) | | 17 | | [GenerateQRCode](-generate-q-r-code.html) | | 18 | 19 | ### Properties 20 | 21 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 22 | 23 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: com.kkbox.openapideveloper.auth - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../index.html) / [com.kkbox.openapideveloper.auth](.) 6 | 7 | ## Package com.kkbox.openapideveloper.auth 8 | 9 | ### Types 10 | 11 | | [Auth](-auth/index.html) | `class Auth`
The instance of this class fetches the authorization. | 12 | | [ClientCredentialsFlow](-client-credentials-flow/index.html) | `class ClientCredentialsFlow`
Implements the client credentials flow. Used for accessing APIs that don't need any KKBOX user's personal data. | 13 | | [TokenFetcher](-token-fetcher/index.html) | `class TokenFetcher`
The instance of this class fetches open api token. | 14 | 15 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/set-category-id.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher.setCategoryId - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [setCategoryId](.) 6 | 7 | # setCategoryId 8 | 9 | `fun setCategoryId(categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`FeaturedPlaylistCategoryFetcher`](index.html) 10 | 11 | Init the featured playlist category fetcher. 12 | 13 | ### Parameters 14 | 15 | `categoryId` - The category ID. 16 | 17 | **Return** 18 | the FeaturedPlaylistCategoryFetcher object. 19 | 20 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/set-search-criteria.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher.setSearchCriteria - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](index.html) / [setSearchCriteria](.) 6 | 7 | # setSearchCriteria 8 | 9 | `fun setSearchCriteria(q: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null): `[`SearchFetcher`](index.html) 10 | 11 | Search within KKBOX's database. 12 | 13 | ### Parameters 14 | 15 | `q` - The keyword. 16 | 17 | `type` - The search types. 18 | 19 | **Return** 20 | the API response. 21 | 22 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.1.4-3' 5 | repositories { 6 | jcenter() 7 | google() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | jcenter() 21 | google() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-chart-fetcher/fetch-charts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ChartFetcher.fetchCharts - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ChartFetcher](index.html) / [fetchCharts](.) 6 | 7 | # fetchCharts 8 | 9 | `fun fetchCharts(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetches all charts. 12 | 13 | ### Parameters 14 | 15 | `limit` - the size for one page. 16 | 17 | `offset` - the offset index for first element. 18 | 19 | **Return** 20 | the Future object that will return the response 21 | 22 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = "1.1.51" 5 | repositories { 6 | jcenter() 7 | google() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | jcenter() 21 | google() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/refresh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.refresh - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [refresh](.) 6 | 7 | # refresh 8 | 9 | `fun refresh(refreshToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): ResponseFuture` 10 | 11 | Refresh token when the token expired. 12 | 13 | ``` kotlin 14 | return this.fetchAccessToken( 15 | mapOf("grant_type" to listOf("refresh_token"), 16 | "refresh_token" to listOf(refreshToken))) 17 | ``` 18 | 19 | ### Parameters 20 | 21 | `refreshToken` - The refresh token you retrieved before. 22 | 23 | **Return** 24 | the refresh token. 25 | 26 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/fetch-tracks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher.fetchTracks - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](index.html) / [fetchTracks](.) 6 | 7 | # fetchTracks 8 | 9 | `fun fetchTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetches tracks in an album by given ID. 12 | 13 | ``` kotlin 14 | this.albumId = albumId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - The size for one page. 21 | 22 | `offset` - The offset index for first element. 23 | 24 | **Return** 25 | tracks of the album. 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/fetch-albums.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher.fetchAlbums - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [fetchAlbums](.) 6 | 7 | # fetchAlbums 8 | 9 | `fun fetchAlbums(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch albums belong to an artist. 12 | 13 | ``` kotlin 14 | this.artistId = artistId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - the size for one page. 21 | 22 | `offset` - the offset index for first element. 23 | 24 | **Return** 25 | albums belong to the Artist. 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/fetch-search-result.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher.fetchSearchResult - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](index.html) / [fetchSearchResult](.) 6 | 7 | # fetchSearchResult 8 | 9 | `fun fetchSearchResult(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch the search result. 12 | 13 | ``` kotlin 14 | this.q = q 15 | this.type = type 16 | return this 17 | ``` 18 | 19 | ### Parameters 20 | 21 | `limit` - The size for one page. 22 | 23 | `offset` - The offset index for first element. 24 | 25 | **Return** 26 | the API response. 27 | 28 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/fetch-top-tracks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher.fetchTopTracks - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](index.html) / [fetchTopTracks](.) 6 | 7 | # fetchTopTracks 8 | 9 | `fun fetchTopTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch top tracks belong to an artist. 12 | 13 | ``` kotlin 14 | this.artistId = artistId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - the size for one page. 21 | 22 | `offset` - the offset index for first element. 23 | 24 | **Return** 25 | top tracks belong to an artist. 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/fetch-access-token.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.fetchAccessToken - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [fetchAccessToken](.) 6 | 7 | # fetchAccessToken 8 | 9 | `fun fetchAccessToken(bodyParameters: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>>): ResponseFuture` 10 | 11 | Fetches the access token. 12 | 13 | **Return** 14 | the Future object that will return the token api response. 15 | 16 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/fetch-tracks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher.fetchTracks - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](index.html) / [fetchTracks](.) 6 | 7 | # fetchTracks 8 | 9 | `fun fetchTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch track list of a playlist by given ID. 12 | 13 | ``` kotlin 14 | this.playlistId = playlistId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - The size for one page. 21 | 22 | `offset` - The offset index for first element. 23 | 24 | **Return** 25 | the API response. 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-client-credentials-flow/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ClientCredentialsFlow - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [ClientCredentialsFlow](.) 6 | 7 | # ClientCredentialsFlow 8 | 9 | `class ClientCredentialsFlow` 10 | 11 | Implements the client credentials flow. Used for accessing APIs that don't need any KKBOX user's personal data. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `ClientCredentialsFlow(tokenFetcher: `[`TokenFetcher`](../-token-fetcher/index.html)`)`
Implements the client credentials flow. Used for accessing APIs that don't need any KKBOX user's personal data. | 16 | 17 | ### Functions 18 | 19 | | [fetchAccessToken](fetch-access-token.html) | `fun fetchAccessToken(): ResponseFuture`
Fetch access token. | 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/fetch-albums.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher.fetchAlbums - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [fetchAlbums](.) 6 | 7 | # fetchAlbums 8 | 9 | `fun fetchAlbums(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch albums of new release category by given ID 12 | 13 | ``` kotlin 14 | this.categoryId = categoryId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - The size for one page. 21 | 22 | `offset` - The offset index for first element. 23 | 24 | **Return** 25 | the API response. 26 | 27 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/auth/ClientCredentialsFlow.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.auth 2 | 3 | import com.google.gson.JsonObject 4 | import com.koushikdutta.ion.future.ResponseFuture 5 | 6 | /** 7 | * Implements the client credentials flow. Used for accessing APIs that don't need any KKBOX user's personal data. 8 | * 9 | * @property tokenFetcher 10 | * @see `https://docs.kkbox.codes/docs/client-credentials-flow` 11 | */ 12 | class ClientCredentialsFlow(private val tokenFetcher: TokenFetcher) { 13 | /** 14 | * Fetch access token. 15 | * 16 | * @return the access token. 17 | * @sample ClientCredentialsFlow.fetchAccessToken() 18 | */ 19 | fun fetchAccessToken(): ResponseFuture { 20 | return tokenFetcher.fetchAccessToken(mapOf("grant_type" to listOf("client_credentials"))) 21 | } 22 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/fetch-info.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher.fetchInfo - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](index.html) / [fetchInfo](.) 6 | 7 | # fetchInfo 8 | 9 | `fun fetchInfo(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): ResponseFuture` 10 | 11 | Fetches information about a access token. 12 | 13 | ``` kotlin 14 | return Ion.with(context) 15 | .load(Endpoint.Auth.TOKEN_INFO.uri+"?access_token=$accessToken") 16 | .setHeader("User-Agent", "KKBOX Openapi Android SDK") 17 | .asJsonObject() 18 | ``` 19 | 20 | ### Parameters 21 | 22 | `accessToken` - Access token authorized by a user, need to be URL encoded before using. 23 | 24 | **Return** 25 | the token info object. 26 | 27 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/fetch-all-genre-stations.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher.fetchAllGenreStations - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](index.html) / [fetchAllGenreStations](.) 6 | 7 | # fetchAllGenreStations 8 | 9 | `fun fetchAllGenreStations(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch all genre stations. 12 | 13 | ``` kotlin 14 | this.genreStationId = genreStationId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - The size for one page. 21 | 22 | `offset` - The offset index for first element. 23 | 24 | **Return** 25 | the API response. 26 | 27 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-chart-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ChartFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ChartFetcher](.) 6 | 7 | # ChartFetcher 8 | 9 | `class ChartFetcher` 10 | 11 | Fetches various kkbox charts. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `ChartFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
creates a chart fetcher. | 16 | 17 | ### Functions 18 | 19 | | [fetchCharts](fetch-charts.html) | `fun fetchCharts(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetches all charts. | 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-http-client/get.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HttpClient.get - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [HttpClient](index.html) / [get](.) 6 | 7 | # get 8 | 9 | `fun get(endpoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?> = emptyMap()): ResponseFuture` 10 | 11 | Get the result from the passed in url. 12 | 13 | ### Parameters 14 | 15 | `endpoint` - The api endpoint 16 | 17 | `params` - The query part of the url 18 | 19 | **Return** 20 | the Future object that will return the http response 21 | 22 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | tasks.getByPath(":OpenAPIDeveloperLibrary:releaseAndroidJavadocs").enabled = false 3 | 4 | buildscript { 5 | repositories { 6 | jcenter() 7 | maven { url 'https://maven.google.com' } 8 | google() 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.0.1' 12 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' 13 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' 14 | // NOTE: Do not place your application dependencies here; they belong 15 | // in the individual module build.gradle files 16 | } 17 | } 18 | 19 | allprojects { 20 | repositories { 21 | jcenter() 22 | google() 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/androidTest/java/com/kkbox/yunwenlin/smart_speaker/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.yunwenlin.smart_speaker; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.kkbox.yunwenlin.smart_speaker", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/fetch-playlists.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher.fetchPlaylists - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [fetchPlaylists](.) 6 | 7 | # fetchPlaylists 8 | 9 | `fun fetchPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch featured playlists of the category with the category fetcher you init. Result will be paged. 12 | 13 | ``` kotlin 14 | this.categoryId = categoryId 15 | return this 16 | ``` 17 | 18 | ### Parameters 19 | 20 | `limit` - The size of one page. 21 | 22 | `offset` - The offset index for first element. 23 | 24 | **Return** 25 | playlists of the category. 26 | 27 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/androidTest/java/com/kkbox/openapideveloperlibraryclienttest/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloperlibraryclienttest; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.kkbox.openapiclient", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/fetch-all-mood-stations.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher.fetchAllMoodStations - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](index.html) / [fetchAllMoodStations](.) 6 | 7 | # fetchAllMoodStations 8 | 9 | `fun fetchAllMoodStations(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch all mood stations. 12 | 13 | ``` kotlin 14 | return httpClient.get(endpoint, 15 | mapOf("territory" to territory, 16 | "limit" to limit?.toString(), 17 | "offset" to offset?.toString())) 18 | ``` 19 | 20 | ### Parameters 21 | 22 | `limit` - The size for one page. 23 | 24 | `offset` - The offset index for first element. 25 | 26 | **Return** 27 | the API response. 28 | 29 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-auth/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Auth - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [Auth](.) 6 | 7 | # Auth 8 | 9 | `class Auth` 10 | 11 | The instance of this class fetches the authorization. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `Auth(clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)`
The instance of this class fetches the authorization. | 16 | 17 | ### Properties 18 | 19 | | [clientCredentialsFlow](client-credentials-flow.html) | `val clientCredentialsFlow: `[`ClientCredentialsFlow`](../-client-credentials-flow/index.html) | 20 | | [tokenFetcher](token-fetcher.html) | `val tokenFetcher: `[`TokenFetcher`](../-token-fetcher/index.html) | 21 | 22 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/fetch-all-featured-playlist-categories.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher.fetchAllFeaturedPlaylistCategories - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](index.html) / [fetchAllFeaturedPlaylistCategories](.) 6 | 7 | # fetchAllFeaturedPlaylistCategories 8 | 9 | `fun fetchAllFeaturedPlaylistCategories(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch all featured playlist categories. 12 | 13 | ``` kotlin 14 | return httpClient.get(endpoint, 15 | mapOf("territory" to territory, 16 | "limit" to limit?.toString(), 17 | "offset" to offset?.toString())) 18 | ``` 19 | 20 | **Return** 21 | all featured playlist categories. 22 | 23 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistFetcher](.) 6 | 7 | # FeaturedPlaylistFetcher 8 | 9 | `class FeaturedPlaylistFetcher` 10 | 11 | List all featured playlists metadata. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `FeaturedPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a featured playlist fetcher. | 16 | 17 | ### Functions 18 | 19 | | [fetchAllFeaturedPlaylists](fetch-all-featured-playlists.html) | `fun fetchAllFeaturedPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch featured playlists. | 20 | 21 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/fetch-all-new-hits-playlists.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher.fetchAllNewHitsPlaylists - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](index.html) / [fetchAllNewHitsPlaylists](.) 6 | 7 | # fetchAllNewHitsPlaylists 8 | 9 | `fun fetchAllNewHitsPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch all new hits playlists. 12 | 13 | ``` kotlin 14 | return httpClient.get(endpoint, 15 | mapOf("territory" to territory, 16 | "limit" to limit?.toString(), 17 | "offset" to offset?.toString())) 18 | ``` 19 | 20 | ### Parameters 21 | 22 | `limit` - The size for one page. 23 | 24 | `offset` - The offset index for first element. 25 | 26 | **Return** 27 | the API response. 28 | 29 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-fetcher/fetch-all-featured-playlists.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistFetcher.fetchAllFeaturedPlaylists - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistFetcher](index.html) / [fetchAllFeaturedPlaylists](.) 6 | 7 | # fetchAllFeaturedPlaylists 8 | 9 | `fun fetchAllFeaturedPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch featured playlists. 12 | 13 | ``` kotlin 14 | return httpClient.get(endpoint, 15 | mapOf("territory" to territory, 16 | "limit" to limit?.toString(), 17 | "offset" to offset?.toString())) 18 | ``` 19 | 20 | ### Parameters 21 | 22 | `limit` - The size for one page. 23 | 24 | `offset` - The offset index for first element. 25 | 26 | **Return** 27 | the API response. 28 | 29 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/willyliu/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/yunwenlin/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/willyliu/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/willyliu/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/fetch-all-new-release-categories.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher.fetchAllNewReleaseCategories - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](index.html) / [fetchAllNewReleaseCategories](.) 6 | 7 | # fetchAllNewReleaseCategories 8 | 9 | `fun fetchAllNewReleaseCategories(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture` 10 | 11 | Fetch all new release categories. 12 | 13 | ``` kotlin 14 | return httpClient.get(endpoint, 15 | mapOf("territory" to territory, 16 | "limit" to limit?.toString(), 17 | "offset" to offset?.toString())) 18 | ``` 19 | 20 | ### Parameters 21 | 22 | `limit` - The size for one page. 23 | 24 | `offset` - The offset index for first element. 25 | 26 | **Return** 27 | the API response. 28 | 29 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/src/androidTest/java/com/kkbox/testopenapi/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.testopenapi 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import android.util.Log 7 | 8 | import com.google.gson.JsonObject 9 | import com.kkbox.openapi.TokenFetcher 10 | import com.koushikdutta.async.future.Future 11 | 12 | import org.junit.Test 13 | import org.junit.runner.RunWith 14 | 15 | import java.util.concurrent.TimeUnit 16 | 17 | import org.junit.Assert.* 18 | 19 | /** 20 | * Instrumentation test, which will execute on an Android device. 21 | * 22 | * @see [Testing documentation](http://d.android.com/tools/testing) 23 | */ 24 | @RunWith(AndroidJUnit4::class) 25 | class ExampleInstrumentedTest { 26 | @Test 27 | @Throws(Exception::class) 28 | fun useAppContext() { 29 | // Context of the app under test. 30 | val appContext = InstrumentationRegistry.getTargetContext() 31 | 32 | assertEquals("com.kkbox.testopenapi", appContext.packageName) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/auth/ClientCredentialsFlowTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.auth 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | import com.kkbox.openapideveloper.auth.ClientCredentialsFlow 6 | import com.kkbox.openapideveloper.auth.TokenFetcher 7 | import org.junit.Assert 8 | import org.junit.Test 9 | import org.junit.runner.RunWith 10 | import java.util.concurrent.TimeUnit 11 | 12 | @RunWith(AndroidJUnit4::class) 13 | class ClientCredentialsFlowTest { 14 | private val context = InstrumentationRegistry.getTargetContext() 15 | private val tokenFetcher: TokenFetcher = TokenFetcher(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 16 | private val clientCredentialsFlow: ClientCredentialsFlow = ClientCredentialsFlow(tokenFetcher) 17 | 18 | @Test 19 | fun fetchAccessToken() { 20 | Assert.assertTrue( 21 | clientCredentialsFlow.fetchAccessToken() 22 | .get(10, TimeUnit.SECONDS) 23 | .has("access_token")) 24 | } 25 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-track-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TrackFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [TrackFetcher](.) 6 | 7 | # TrackFetcher 8 | 9 | `class TrackFetcher` 10 | 11 | Fetch metadata of a track. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `TrackFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a track fetcher. | 16 | 17 | ### Properties 18 | 19 | | [trackId](track-id.html) | `lateinit var trackId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch metadata of a track by given ID. | 24 | | [getWidgetUri](get-widget-uri.html) | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Get the widget url of the track. | 25 | | [setTrackId](set-track-id.html) | `fun setTrackId(trackId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): TrackFetcher`
Set the track ID. | 26 | 27 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | compileSdkVersion 26 6 | buildToolsVersion "26.0.2" 7 | defaultConfig { 8 | applicationId "com.kkbox.yunwenlin.smart_speaker" 9 | minSdkVersion 15 10 | targetSdkVersion 26 11 | versionCode 1 12 | versionName "1.0" 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | compile fileTree(dir: 'libs', include: ['*.jar']) 25 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 26 | exclude group: 'com.android.support', module: 'support-annotations' 27 | }) 28 | compile 'com.android.support:appcompat-v7:26.1.0' 29 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 30 | testCompile 'junit:junit:4.12' 31 | compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 32 | compile 'com.squareup.okhttp:okhttp:2.5.0' 33 | } 34 | repositories { 35 | mavenCentral() 36 | } 37 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-http-client/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HttpClient - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [HttpClient](.) 6 | 7 | # HttpClient 8 | 9 | `class HttpClient` 10 | 11 | The http client instance will get response from specific url. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `HttpClient(token: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)`
Creates a http client instance | 16 | 17 | ### Functions 18 | 19 | | [get](get.html) | `fun get(endpoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, params: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?> = emptyMap()): ResponseFuture`
Get the result from the passed in url. | 20 | | [post](post.html) | `fun post(endpoint: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, data: JsonObject): ResponseFuture`
Http post method. | 21 | 22 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/SearchFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.HttpClient 7 | import com.kkbox.openapideveloper.api.SearchFetcher 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class SearchFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val searchFetcher: SearchFetcher = SearchFetcher(httpClient).setSearchCriteria("Linkin Park") 21 | 22 | @Test 23 | fun fetchSearchResult() { 24 | Assert.assertTrue(searchFetcher.fetchSearchResult().get(10, TimeUnit.SECONDS).has("summary")) 25 | } 26 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/src/main/res/layout/track_list_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 19 | 20 | 27 | 28 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper/-endpoint/-a-p-i/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Endpoint.API - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../../index.html) / [com.kkbox.openapideveloper](../../index.html) / [Endpoint](../index.html) / [API](.) 6 | 7 | # API 8 | 9 | `enum class API` 10 | 11 | ### Types 12 | 13 | | [SearchType](-search-type.html) | `enum class SearchType` | 14 | 15 | ### Enum Values 16 | 17 | | [SEARCH](-s-e-a-r-c-h.html) | | 18 | | [TRACKS](-t-r-a-c-k-s.html) | | 19 | | [ARTISTS](-a-r-t-i-s-t-s.html) | | 20 | | [ALBUMS](-a-l-b-u-m-s.html) | | 21 | | [SHARED_PLAYLISTS](-s-h-a-r-e-d_-p-l-a-y-l-i-s-t-s.html) | | 22 | | [MOOD_STATIONS](-m-o-o-d_-s-t-a-t-i-o-n-s.html) | | 23 | | [FEATURED_PLAYLISTS](-f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s.html) | | 24 | | [FEATURED_PLAYLISTS_CATEGORIES](-f-e-a-t-u-r-e-d_-p-l-a-y-l-i-s-t-s_-c-a-t-e-g-o-r-i-e-s.html) | | 25 | | [NEW_RELEASE_CATEGORIES](-n-e-w_-r-e-l-e-a-s-e_-c-a-t-e-g-o-r-i-e-s.html) | | 26 | | [NEW_HITS_PLAYLISTS](-n-e-w_-h-i-t-s_-p-l-a-y-l-i-s-t-s.html) | | 27 | | [GENRE_STATIONS](-g-e-n-r-e_-s-t-a-t-i-o-n-s.html) | | 28 | | [CHARTS](-c-h-a-r-t-s.html) | | 29 | | [TICKETS](-t-i-c-k-e-t-s.html) | | 30 | | [USERS](-u-s-e-r-s.html) | | 31 | | [ME](-m-e.html) | | 32 | | [PLAYLISTS](-p-l-a-y-l-i-s-t-s.html) | | 33 | 34 | ### Properties 35 | 36 | | [uri](uri.html) | `val uri: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 37 | 38 | -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/TestOpenAPIClient/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | compileSdkVersion 26 6 | buildToolsVersion "26.0.2" 7 | defaultConfig { 8 | applicationId "com.kkbox.testopenapi" 9 | minSdkVersion 14 10 | targetSdkVersion 26 11 | versionCode 1 12 | versionName "1.0" 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | compileOptions { 22 | sourceCompatibility JavaVersion.VERSION_1_8 23 | targetCompatibility JavaVersion.VERSION_1_8 24 | } 25 | } 26 | 27 | dependencies { 28 | compile fileTree(dir: 'libs', include: ['*.jar']) 29 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 30 | exclude group: 'com.android.support', module: 'support-annotations' 31 | }) 32 | compile 'com.android.support:appcompat-v7:26.1.0' 33 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 34 | testCompile 'junit:junit:4.12' 35 | implementation project(':openapilibrary') 36 | compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 37 | } 38 | repositories { 39 | mavenCentral() 40 | } 41 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/auth/AuthTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.auth 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.runner.AndroidJUnit4 5 | import android.util.Log 6 | import com.kkbox.openapideveloper.ClientInfo 7 | import com.kkbox.openapideveloper.auth.Auth 8 | import org.junit.Assert 9 | import org.junit.Test 10 | import org.junit.runner.RunWith 11 | import java.util.concurrent.TimeUnit 12 | 13 | /** 14 | * Instrumentation test, which will execute on an Android device. 15 | * 16 | * @see [Testing documentation](http://d.android.com/tools/testing) 17 | */ 18 | @RunWith(AndroidJUnit4::class) 19 | class AuthTest { 20 | private val context = InstrumentationRegistry.getTargetContext() 21 | private val auth = Auth(ClientInfo.CLIENT_ID, ClientInfo.CLIENT_SECRET, context) 22 | 23 | /* 24 | @Test 25 | fun testTokenFetcher() { 26 | auth.tokenFetcher 27 | } 28 | */ 29 | 30 | @Test 31 | fun testClientCredentialsFlow() { 32 | val responseFuture = auth.clientCredentialsFlow.fetchAccessToken() 33 | try { 34 | val `object` = responseFuture.get(10, TimeUnit.SECONDS) 35 | Assert.assertTrue(`object`.get("access_token").asString.isNotEmpty()) 36 | } catch (e: Exception) { 37 | Log.d("ERROR", e.toString()) 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/TrackFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.HttpClient 7 | import com.kkbox.openapideveloper.api.TrackFetcher 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class TrackFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val trackFetcher: TrackFetcher = TrackFetcher(httpClient).setTrackId("KpnEGVHEsGgkoB0MBk") 21 | 22 | @Test 23 | fun fetchMetadata() { 24 | Assert.assertTrue(trackFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 25 | } 26 | 27 | @Test 28 | fun getWidgetUri() { 29 | Assert.assertEquals(trackFetcher.getWidgetUri(), 30 | "https://widget.kkbox.com/v1/?id=${trackFetcher.trackId}&type=song") 31 | } 32 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/MoodStationFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.HttpClient 7 | import com.kkbox.openapideveloper.api.MoodStationFetcher 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class MoodStationFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val moodStationFetcher: MoodStationFetcher = MoodStationFetcher(httpClient).setMoodStationId("StGZp2ToWq92diPHS7") 21 | 22 | @Test 23 | fun fetchAllMoodStations() { 24 | Assert.assertTrue(moodStationFetcher.fetchAllMoodStations().get(10, TimeUnit.SECONDS).has("data")) 25 | } 26 | 27 | @Test 28 | fun fetchMetadata() { 29 | Assert.assertTrue(moodStationFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 30 | } 31 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/GenreStationFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.GenreStationFetcher 7 | import com.kkbox.openapideveloper.api.HttpClient 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class GenreStationFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val genreStationFetcher: GenreStationFetcher = GenreStationFetcher(httpClient).setGenreStationId("TYq3EHFTl-1EOvJM5Y") 21 | 22 | @Test 23 | fun fetchAllGenreStations() { 24 | Assert.assertTrue(genreStationFetcher.fetchAllGenreStations().get(10, TimeUnit.SECONDS).has("data")) 25 | } 26 | 27 | @Test 28 | fun fetchMetadata() { 29 | Assert.assertTrue(genreStationFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 30 | } 31 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-mood-station-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: MoodStationFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [MoodStationFetcher](.) 6 | 7 | # MoodStationFetcher 8 | 9 | `class MoodStationFetcher` 10 | 11 | Fetch mood stations and get tracks for a specific mood station. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `MoodStationFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a mood station fetcher. | 16 | 17 | ### Properties 18 | 19 | | [moodStationId](mood-station-id.html) | `lateinit var moodStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAllMoodStations](fetch-all-mood-stations.html) | `fun fetchAllMoodStations(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch all mood stations. | 24 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch metadata of a mood station by given ID. | 25 | | [setMoodStationId](set-mood-station-id.html) | `fun setMoodStationId(moodStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): MoodStationFetcher`
Set a mood station ID. | 26 | 27 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/Endpoint.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper 2 | 3 | val OAuth_DOMAIN = "https://account.kkbox.com/oauth2" 4 | val API_DOMAIN = "https://api.kkbox.com/v1.1" 5 | 6 | /** 7 | * API Endpoint. 8 | */ 9 | class Endpoint { 10 | enum class API(val uri: String) { 11 | SEARCH(API_DOMAIN + "/search"), 12 | TRACKS(API_DOMAIN + "/tracks"), 13 | ARTISTS(API_DOMAIN + "/artists"), 14 | ALBUMS(API_DOMAIN + "/albums"), 15 | SHARED_PLAYLISTS(API_DOMAIN + "/shared-playlists"), 16 | MOOD_STATIONS(API_DOMAIN + "/mood-stations"), 17 | FEATURED_PLAYLISTS(API_DOMAIN + "/featured-playlists"), 18 | FEATURED_PLAYLISTS_CATEGORIES(API_DOMAIN + "/featured-playlist-categories"), 19 | NEW_RELEASE_CATEGORIES(API_DOMAIN + "/new-release-categories"), 20 | NEW_HITS_PLAYLISTS(API_DOMAIN + "/new-hits-playlists"), 21 | GENRE_STATIONS(API_DOMAIN + "/genre-stations"), 22 | CHARTS(API_DOMAIN + "/charts"), 23 | TICKETS(API_DOMAIN + "/tickets"), 24 | USERS(API_DOMAIN + "/users"), 25 | ME(API_DOMAIN + "/me"), 26 | PLAYLISTS(API_DOMAIN + "/me/playlists"); 27 | 28 | enum class SearchType 29 | } 30 | 31 | enum class Auth(val uri: String) { 32 | TOKEN(OAuth_DOMAIN + "/token"), 33 | TOKEN_INFO(OAuth_DOMAIN + "/tokeninfo"), 34 | Authorization(OAuth_DOMAIN + "/authorize"), 35 | DeviceCode(OAuth_DOMAIN + "/device/code"), 36 | GenerateQRCode("https://qrcode.kkbox.com.tw/generator") 37 | } 38 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-genre-station-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GenreStationFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [GenreStationFetcher](.) 6 | 7 | # GenreStationFetcher 8 | 9 | `class GenreStationFetcher` 10 | 11 | Fetch genre stations and get tracks for a specific genre station. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `GenreStationFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a genre station fetcher. | 16 | 17 | ### Properties 18 | 19 | | [genreStationId](genre-station-id.html) | `lateinit var genreStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAllGenreStations](fetch-all-genre-stations.html) | `fun fetchAllGenreStations(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch all genre stations. | 24 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch metadata of a genre station by given ID. | 25 | | [setGenreStationId](set-genre-station-id.html) | `fun setGenreStationId(genreStationId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): GenreStationFetcher`
Set a genre station ID. | 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-hits-playlist-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewHitsPlaylistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewHitsPlaylistFetcher](.) 6 | 7 | # NewHitsPlaylistFetcher 8 | 9 | `class NewHitsPlaylistFetcher` 10 | 11 | List all new hits playlists and fetch tracks for specific new hit playlist. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `NewHitsPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a new hits playlist fetcher. | 16 | 17 | ### Properties 18 | 19 | | [playlistId](playlist-id.html) | `lateinit var playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAllNewHitsPlaylists](fetch-all-new-hits-playlists.html) | `fun fetchAllNewHitsPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch all new hits playlists. | 24 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch new hits playlist by given ID. | 25 | | [setPlaylistId](set-playlist-id.html) | `fun setPlaylistId(playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): NewHitsPlaylistFetcher`
Set the new hits playlist ID. | 26 | 27 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-album-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: AlbumFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [AlbumFetcher](.) 6 | 7 | # AlbumFetcher 8 | 9 | `class AlbumFetcher` 10 | 11 | Get metadata and tracks of an album. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `AlbumFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates an album fetcher. | 16 | 17 | ### Properties 18 | 19 | | [albumId](album-id.html) | `lateinit var albumId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetches metadata of an album by given ID. | 24 | | [fetchTracks](fetch-tracks.html) | `fun fetchTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetches tracks in an album by given ID. | 25 | | [getWidgetUri](get-widget-uri.html) | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Get the widget url of the album. | 26 | | [setAlbumId](set-album-id.html) | `fun setAlbumId(albumId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): AlbumFetcher`
Set the album ID. | 27 | 28 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/Api.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.api 2 | 3 | import android.content.Context 4 | 5 | /** 6 | * Fetch KKBOX resources. 7 | * 8 | * @param accessToken Get via Auth. 9 | * @param territory ['TW', 'HK', 'SG', 'MY', 'JP'] The territory for the fetcher. 10 | * @constructor need access token to initialize. 11 | * @sample Api(accessToken) 12 | */ 13 | class Api(private val accessToken: String, private val territory: String = "TW", context: Context) { 14 | private val httpClient: HttpClient = HttpClient(accessToken, context) 15 | val searchFetcher: SearchFetcher = SearchFetcher(httpClient, territory) 16 | val trackFetcher: TrackFetcher = TrackFetcher(httpClient, territory) 17 | val albumFetcher: AlbumFetcher = AlbumFetcher(httpClient, territory) 18 | val artistFetcher: ArtistFetcher = ArtistFetcher(httpClient, territory) 19 | val featuredPlaylistFetcher: FeaturedPlaylistFetcher = FeaturedPlaylistFetcher(httpClient, territory) 20 | val featuredPlaylistCategoryFetcher: FeaturedPlaylistCategoryFetcher = FeaturedPlaylistCategoryFetcher(httpClient, territory) 21 | val releaseCategoryFetcher: NewReleaseCategoryFetcher = NewReleaseCategoryFetcher(httpClient, territory) 22 | val hitsPlaylistFetcher: NewHitsPlaylistFetcher = NewHitsPlaylistFetcher(httpClient, territory) 23 | val genreStationFetcher: GenreStationFetcher = GenreStationFetcher(httpClient, territory) 24 | val moodStationFetcher: MoodStationFetcher = MoodStationFetcher(httpClient, territory) 25 | val chartFetcher: ChartFetcher = ChartFetcher(httpClient, territory) 26 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/auth/TokenFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.auth 2 | 3 | import android.support.test.InstrumentationRegistry 4 | import android.support.test.filters.FlakyTest 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.auth.TokenFetcher 7 | import org.junit.Assert 8 | import org.junit.Test 9 | import org.junit.runner.RunWith 10 | import java.util.concurrent.TimeUnit 11 | 12 | @RunWith(AndroidJUnit4::class) 13 | class TokenFetcherTest { 14 | private val context = InstrumentationRegistry.getTargetContext() 15 | private val accessToken: String = com.kkbox.openapideveloper.ClientInfo.ACCESS_TOKEN 16 | private val tokenFetcher: TokenFetcher = TokenFetcher(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 17 | 18 | @Test 19 | @FlakyTest 20 | fun fetchInfo() { 21 | Assert.assertTrue(tokenFetcher.fetchInfo(accessToken).get(10, TimeUnit.SECONDS).has("exp")) 22 | } 23 | 24 | @Test 25 | @FlakyTest 26 | fun fetchAccessToken() { 27 | Assert.assertTrue( 28 | tokenFetcher.fetchAccessToken( 29 | mapOf("grant_type" to listOf("client_credentials"))) 30 | .get(10, TimeUnit.SECONDS) 31 | .has("access_token")) 32 | } 33 | 34 | @Test 35 | @FlakyTest 36 | fun refresh() { 37 | Assert.assertTrue( 38 | tokenFetcher.refresh("") 39 | .get(10, TimeUnit.SECONDS) 40 | .has("error")) 41 | } 42 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/AlbumFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.AlbumFetcher 7 | import com.kkbox.openapideveloper.api.HttpClient 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class AlbumFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val albumFetcher: AlbumFetcher = AlbumFetcher(httpClient).setAlbumId("KmRKnW5qmUrTnGRuxF") 21 | 22 | @Test 23 | fun fetchMetadata() { 24 | Assert.assertTrue(albumFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 25 | } 26 | 27 | @Test 28 | fun getWidgetUri() { 29 | Assert.assertEquals(albumFetcher.getWidgetUri(), 30 | "https://widget.kkbox.com/v1/?id=${albumFetcher.albumId}&type=album") 31 | } 32 | 33 | @Test 34 | fun fetchTracks() { 35 | Assert.assertTrue(albumFetcher.fetchTracks().get(10, TimeUnit.SECONDS).has("data")) 36 | } 37 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-shared-playlist-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SharedPlaylistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SharedPlaylistFetcher](.) 6 | 7 | # SharedPlaylistFetcher 8 | 9 | `class SharedPlaylistFetcher` 10 | 11 | Fetch metadata and tracks of a specific shared playlist. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `SharedPlaylistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a shared playlist fetcher. | 16 | 17 | ### Properties 18 | 19 | | [playlistId](playlist-id.html) | `lateinit var playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch the shared playlist by given ID. | 24 | | [fetchTracks](fetch-tracks.html) | `fun fetchTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch track list of a playlist by given ID. | 25 | | [getWidgetUri](get-widget-uri.html) | `fun getWidgetUri(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Get the widget url of the album. | 26 | | [setPlaylistId](set-playlist-id.html) | `fun setPlaylistId(playlistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): SharedPlaylistFetcher`
Set the shared playlist ID. | 27 | 28 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-artist-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ArtistFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [ArtistFetcher](.) 6 | 7 | # ArtistFetcher 8 | 9 | `class ArtistFetcher` 10 | 11 | Get artist metadata. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `ArtistFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates an artist fetcher. | 16 | 17 | ### Properties 18 | 19 | | [artistId](artist-id.html) | `lateinit var artistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAlbums](fetch-albums.html) | `fun fetchAlbums(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch albums belong to an artist. | 24 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetches metadata of an artist. | 25 | | [fetchTopTracks](fetch-top-tracks.html) | `fun fetchTopTracks(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch top tracks belong to an artist. | 26 | | [setArtistId](set-artist-id.html) | `fun setArtistId(artistId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): ArtistFetcher`
Init the artist object. | 27 | 28 | -------------------------------------------------------------------------------- /ExampleClient/kkbox-open-api-smart-speaker/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/TrackFetcher.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.api 2 | 3 | import com.google.gson.JsonObject 4 | import com.kkbox.openapideveloper.Endpoint 5 | import com.koushikdutta.ion.future.ResponseFuture 6 | 7 | /** 8 | * Fetch metadata of a track. 9 | * 10 | * @property httpClient Get response from specific url. 11 | * @property territory The current territory. 12 | * @constructor Creates a track fetcher. 13 | * @see `https://docs.kkbox.codes/docs/tracks` 14 | */ 15 | class TrackFetcher(private val httpClient: HttpClient, private val territory: String = "TW") { 16 | private val endpoint: String = Endpoint.API.TRACKS.uri 17 | lateinit var trackId: String 18 | 19 | /** 20 | * Set the track ID. 21 | * 22 | * @param trackId The track ID. 23 | * @return the track ID. 24 | * @see `https://docs.kkbox.codes/docs/tracks` 25 | */ 26 | fun setTrackId(trackId: String): TrackFetcher { 27 | this.trackId = trackId 28 | return this 29 | } 30 | 31 | /** 32 | * Fetch metadata of a track by given ID. 33 | * 34 | * @return the object of the track's metadata. 35 | * @sample TrackFetcher.setTrackId('SkZOxSOGFd6eCbbVp4').fetchMetadata() 36 | */ 37 | fun fetchMetadata(): ResponseFuture { 38 | return httpClient.get(endpoint + "/$trackId", mapOf("territory" to territory)) 39 | } 40 | 41 | /** 42 | * Get the widget url of the track. 43 | * 44 | * @sample `https://widget.kkbox.com/v1/?id=XY8FPWBiJrx2FI6vgm&type=song` 45 | * @return the widget url of the track. 46 | */ 47 | fun getWidgetUri(): String { 48 | return "https://widget.kkbox.com/v1/?id=$trackId&type=song" 49 | } 50 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/NewReleaseCategoryFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.HttpClient 7 | import com.kkbox.openapideveloper.api.NewReleaseCategoryFetcher 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | 15 | @RunWith(AndroidJUnit4::class) 16 | class NewReleaseCategoryFetcherTest { 17 | private val context: Context = InstrumentationRegistry.getTargetContext() 18 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 19 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 20 | private val httpClient: HttpClient = HttpClient(accessToken, context) 21 | private val newReleaseCategoryFetcher: NewReleaseCategoryFetcher = NewReleaseCategoryFetcher(httpClient).setCategoryId("Cng5IUIQhxb8w1cbsz") 22 | 23 | @Test 24 | fun fetchAllNewHitsPlaylists() { 25 | Assert.assertTrue(newReleaseCategoryFetcher.fetchAllNewReleaseCategories().get(10, TimeUnit.SECONDS).has("data")) 26 | } 27 | 28 | @Test 29 | fun fetchMetadata() { 30 | Assert.assertTrue(newReleaseCategoryFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 31 | } 32 | 33 | @Test 34 | fun fetchAlbums() { 35 | Assert.assertTrue(newReleaseCategoryFetcher.fetchAlbums().get(10, TimeUnit.SECONDS).has("data")) 36 | } 37 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/SharedPlaylistFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.HttpClient 7 | import com.kkbox.openapideveloper.api.SharedPlaylistFetcher 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class SharedPlaylistFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val sharedPlaylistFetcher: SharedPlaylistFetcher = SharedPlaylistFetcher(httpClient).setPlaylistId("4nUZM-TY2aVxZ2xaA-") 21 | 22 | @Test 23 | fun fetchMetadata() { 24 | Assert.assertTrue(sharedPlaylistFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 25 | } 26 | 27 | @Test 28 | fun getWidgetUri() { 29 | Assert.assertEquals(sharedPlaylistFetcher.getWidgetUri(), 30 | "https://widget.kkbox.com/v1/?id=${sharedPlaylistFetcher.playlistId}&type=playlist") 31 | } 32 | 33 | @Test 34 | fun fetchTracks() { 35 | Assert.assertTrue(sharedPlaylistFetcher.fetchTracks().get(10, TimeUnit.SECONDS).has("data")) 36 | } 37 | } -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/ArtistFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.ArtistFetcher 7 | import com.kkbox.openapideveloper.api.HttpClient 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class ArtistFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val artistFetcher: ArtistFetcher = ArtistFetcher(httpClient).setArtistId("Cnv_K6i5Ft4y41SxLy") 21 | 22 | @Test 23 | fun fetchMetadata() { 24 | Assert.assertTrue(artistFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 25 | } 26 | 27 | @Test 28 | fun fetchAlbums() { 29 | Assert.assertTrue(artistFetcher.fetchAlbums().get(10, TimeUnit.SECONDS).has("data")) 30 | } 31 | 32 | @Test 33 | fun fetchTopTracks() { 34 | Assert.assertTrue(artistFetcher.fetchTopTracks().get(10, TimeUnit.SECONDS).has("data")) 35 | } 36 | 37 | @Test 38 | fun fetchRelatedArtists() { 39 | Assert.assertTrue(artistFetcher.fetchRelatedArtists().get(10, TimeUnit.SECONDS).has("data")) 40 | } 41 | } -------------------------------------------------------------------------------- /ExampleClient/TestOpenAPI/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/FeaturedPlaylistCategoryFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.api.FeaturedPlaylistCategoryFetcher 7 | import com.kkbox.openapideveloper.api.HttpClient 8 | import com.kkbox.openapideveloper.auth.Auth 9 | import org.junit.Assert 10 | import org.junit.Test 11 | import org.junit.runner.RunWith 12 | import java.util.concurrent.TimeUnit 13 | 14 | @RunWith(AndroidJUnit4::class) 15 | class FeaturedPlaylistCategoryFetcherTest { 16 | private val context: Context = InstrumentationRegistry.getTargetContext() 17 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 18 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 19 | private val httpClient: HttpClient = HttpClient(accessToken, context) 20 | private val featuredPlaylistCategoryFetcher: FeaturedPlaylistCategoryFetcher = FeaturedPlaylistCategoryFetcher(httpClient).setCategoryId("LXUR688EBKRRZydAWb") 21 | 22 | @Test 23 | fun fetchAllFeaturedPlaylistCategories() { 24 | Assert.assertTrue(featuredPlaylistCategoryFetcher.fetchAllFeaturedPlaylistCategories().get(10, TimeUnit.SECONDS).has("data")) 25 | } 26 | 27 | @Test 28 | fun fetchMetadata() { 29 | Assert.assertTrue(featuredPlaylistCategoryFetcher.fetchMetadata().get(10, TimeUnit.SECONDS).has("id")) 30 | } 31 | 32 | @Test 33 | fun fetchPlaylists() { 34 | Assert.assertTrue(featuredPlaylistCategoryFetcher.fetchPlaylists().get(10, TimeUnit.SECONDS).has("data")) 35 | } 36 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-search-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: SearchFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [SearchFetcher](.) 6 | 7 | # SearchFetcher 8 | 9 | `class SearchFetcher` 10 | 11 | Search API, the types it can search includes artists, albums, tracks, or playlists. 12 | Default to search all types, use "," to separate types if you want to use multiple 13 | types to search at the same time. 14 | 15 | ### Constructors 16 | 17 | | [<init>](-init-.html) | `SearchFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Search API, the types it can search includes artists, albums, tracks, or playlists. Default to search all types, use "," to separate types if you want to use multiple types to search at the same time. | 18 | 19 | ### Properties 20 | 21 | | [q](q.html) | `lateinit var q: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 22 | | [type](type.html) | `var type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` | 23 | 24 | ### Functions 25 | 26 | | [fetchSearchResult](fetch-search-result.html) | `fun fetchSearchResult(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch the search result. | 27 | | [setSearchCriteria](set-search-criteria.html) | `fun setSearchCriteria(q: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null): SearchFetcher`
Search within KKBOX's database. | 28 | 29 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibraryClient/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | //def minSdk = hasProperty('minSdk') ? minSdk : 14 5 | 6 | buildscript { 7 | ext.kotlin_version = '1.1.51' 8 | repositories { 9 | jcenter() 10 | maven { url 'https://maven.google.com' } 11 | } 12 | dependencies { 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | 18 | android { 19 | compileSdkVersion 25 20 | buildToolsVersion '26.0.2' 21 | 22 | defaultConfig { 23 | applicationId "com.kkbox.openapiclient" 24 | minSdkVersion 14 25 | targetSdkVersion 25 26 | versionCode 1 27 | versionName "1.0" 28 | 29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 30 | 31 | } 32 | buildTypes { 33 | release { 34 | minifyEnabled false 35 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 36 | } 37 | } 38 | } 39 | 40 | dependencies { 41 | implementation fileTree(dir: 'libs', include: ['*.jar']) 42 | 43 | implementation 'com.android.support:appcompat-v7:25.3.1' 44 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 45 | implementation 'com.android.support.constraint:constraint-layout-solver:1.0.2' 46 | testImplementation 'junit:junit:4.12' 47 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 48 | exclude group: 'com.android.support', module: 'support-annotations' 49 | }) 50 | //implementation project(':OpenAPIDeveloperLibrary') 51 | api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 52 | implementation 'com.koushikdutta.ion:ion:2.2.1' 53 | implementation "com.google.code.gson:gson:2.8.0" 54 | implementation 'com.kkbox:openapideveloper:1.0.0' 55 | } 56 | 57 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-new-release-category-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: NewReleaseCategoryFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [NewReleaseCategoryFetcher](.) 6 | 7 | # NewReleaseCategoryFetcher 8 | 9 | `class NewReleaseCategoryFetcher` 10 | 11 | List categories of new release category and get metadata of specific new release category. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `NewReleaseCategoryFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
Creates a new release category fetcher. | 16 | 17 | ### Properties 18 | 19 | | [categoryId](category-id.html) | `lateinit var categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAlbums](fetch-albums.html) | `fun fetchAlbums(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch albums of new release category by given ID | 24 | | [fetchAllNewReleaseCategories](fetch-all-new-release-categories.html) | `fun fetchAllNewReleaseCategories(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch all new release categories. | 25 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch new release category by given ID. | 26 | | [setCategoryId](set-category-id.html) | `fun setCategoryId(categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): NewReleaseCategoryFetcher`
Set the category ID | 27 | 28 | -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-featured-playlist-category-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FeaturedPlaylistCategoryFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [FeaturedPlaylistCategoryFetcher](.) 6 | 7 | # FeaturedPlaylistCategoryFetcher 8 | 9 | `class FeaturedPlaylistCategoryFetcher` 10 | 11 | List featured playlist categories. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `FeaturedPlaylistCategoryFetcher(httpClient: `[`HttpClient`](../-http-client/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW")`
List featured playlist categories. | 16 | 17 | ### Properties 18 | 19 | | [categoryId](category-id.html) | `lateinit var categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | 20 | 21 | ### Functions 22 | 23 | | [fetchAllFeaturedPlaylistCategories](fetch-all-featured-playlist-categories.html) | `fun fetchAllFeaturedPlaylistCategories(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch all featured playlist categories. | 24 | | [fetchMetadata](fetch-metadata.html) | `fun fetchMetadata(): ResponseFuture`
Fetch metadata of the category you init. | 25 | | [fetchPlaylists](fetch-playlists.html) | `fun fetchPlaylists(limit: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null, offset: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`? = null): ResponseFuture`
Fetch featured playlists of the category with the category fetcher you init. Result will be paged. | 26 | | [setCategoryId](set-category-id.html) | `fun setCategoryId(categoryId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): FeaturedPlaylistCategoryFetcher`
Init the featured playlist category fetcher. | 27 | 28 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/SearchFetcher.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.api 2 | 3 | import com.google.gson.JsonObject 4 | import com.kkbox.openapideveloper.Endpoint 5 | import com.koushikdutta.ion.future.ResponseFuture 6 | 7 | /** 8 | * Search API, the types it can search includes artists, albums, tracks, or playlists. 9 | * Default to search all types, use "," to separate types if you want to use multiple 10 | * types to search at the same time. 11 | * 12 | * @property httpClient Get response from specific url. 13 | * @property territory The current territory. 14 | * @see `https://docs.kkbox.codes/docs/search` 15 | */ 16 | class SearchFetcher(private val httpClient: HttpClient, private val territory: String = "TW") { 17 | private val endpoint: String = Endpoint.API.SEARCH.uri 18 | lateinit var q: String 19 | var type: String? = null 20 | 21 | /** 22 | * Search within KKBOX's database. 23 | * 24 | * @param q The keyword. 25 | * @param type The search types. 26 | * @return the API response. 27 | * @see `https://docs.kkbox.codes/docs/search` 28 | */ 29 | fun setSearchCriteria(q: String, type: String? = null): SearchFetcher { 30 | this.q = q 31 | this.type = type 32 | return this 33 | } 34 | 35 | /** 36 | * Fetch the search result. 37 | * 38 | * @param limit The size for one page. 39 | * @param offset The offset index for first element. 40 | * @return the API response. 41 | * @sample SearchFetcher.setSearchCriteria('hello', 'track').fetchSearchResult() 42 | * @see `https://docs.kkbox.codes/docs/search` 43 | */ 44 | fun fetchSearchResult(limit: Int? = null, offset: Int? = null): ResponseFuture { 45 | return this.httpClient.get(endpoint, 46 | mapOf("q" to q, 47 | "type" to type, 48 | "territory" to territory, 49 | "limit" to limit?.toString(), 50 | "offset" to offset?.toString())) 51 | } 52 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.api/-api/-init-.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Api. - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.api](../index.html) / [Api](index.html) / [<init>](.) 6 | 7 | # <init> 8 | 9 | `Api(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, territory: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` = "TW", context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)` 10 | 11 | need access token to initialize. 12 | 13 | ``` kotlin 14 | /** 15 | * Fetch KKBOX resources. 16 | * 17 | * @param accessToken Get via Auth. 18 | * @param territory ['TW', 'HK', 'SG', 'MY', 'JP'] The territory for the fetcher. 19 | * @constructor need access token to initialize. 20 | * @sample Api(accessToken) 21 | */ 22 | class Api(private val accessToken: String, private val territory: String = "TW", context: Context) { 23 | private val httpClient: HttpClient = HttpClient(accessToken, context) 24 | val searchFetcher: SearchFetcher = SearchFetcher(httpClient, territory) 25 | val trackFetcher: TrackFetcher = TrackFetcher(httpClient, territory) 26 | val albumFetcher: AlbumFetcher = AlbumFetcher(httpClient, territory) 27 | val artistFetcher: ArtistFetcher = ArtistFetcher(httpClient, territory) 28 | val featuredPlaylistFetcher: FeaturedPlaylistFetcher = FeaturedPlaylistFetcher(httpClient, territory) 29 | val featuredPlaylistCategoryFetcher: FeaturedPlaylistCategoryFetcher = FeaturedPlaylistCategoryFetcher(httpClient, territory) 30 | val releaseCategoryFetcher: NewReleaseCategoryFetcher = NewReleaseCategoryFetcher(httpClient, territory) 31 | val hitsPlaylistFetcher: NewHitsPlaylistFetcher = NewHitsPlaylistFetcher(httpClient, territory) 32 | val genreStationFetcher: GenreStationFetcher = GenreStationFetcher(httpClient, territory) 33 | val moodStationFetcher: MoodStationFetcher = MoodStationFetcher(httpClient, territory) 34 | val chartFetcher: ChartFetcher = ChartFetcher(httpClient, territory) 35 | } 36 | ``` 37 | 38 | **Constructor** 39 | need access token to initialize. 40 | 41 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/androidTest/java/com/kkbox/openapidevelopertest/api/ChartFetcherTest.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapidevelopertest.api 2 | 3 | import android.content.Context 4 | import android.support.test.InstrumentationRegistry 5 | import android.support.test.runner.AndroidJUnit4 6 | import com.kkbox.openapideveloper.ClientInfo 7 | import com.kkbox.openapideveloper.api.ChartFetcher 8 | import com.kkbox.openapideveloper.api.HttpClient 9 | import com.kkbox.openapideveloper.auth.Auth 10 | import org.junit.Assert 11 | import org.junit.Test 12 | import org.junit.runner.RunWith 13 | import java.util.concurrent.TimeUnit 14 | 15 | @RunWith(AndroidJUnit4::class) 16 | class ChartFetcherTest { 17 | private val context: Context = InstrumentationRegistry.getTargetContext() 18 | private val auth: Auth = Auth(com.kkbox.openapideveloper.ClientInfo.CLIENT_ID, com.kkbox.openapideveloper.ClientInfo.CLIENT_SECRET, context) 19 | private val accessToken: String = auth.clientCredentialsFlow.fetchAccessToken().get().get("access_token").asString 20 | private val httpClient: HttpClient = HttpClient(accessToken, context) 21 | private val chartFetcher: ChartFetcher = ChartFetcher(httpClient) 22 | 23 | @Test 24 | fun fetchCharts() { 25 | Assert.assertTrue(chartFetcher.fetchCharts().get(10, TimeUnit.SECONDS).has("data")) 26 | } 27 | 28 | fun getFirstPlaylistID() : String { 29 | val data = chartFetcher.fetchCharts().get(10, TimeUnit.SECONDS) 30 | val playlists = data.getAsJsonArray("data") 31 | val playlist = playlists[0].asJsonObject 32 | val playlistID = playlist.get("id").asString 33 | Assert.assertTrue(playlistID.isNotEmpty()) 34 | return playlistID 35 | } 36 | 37 | @Test 38 | fun fetchChartsPlaylist() { 39 | val playlistID = this.getFirstPlaylistID() 40 | Assert.assertTrue(chartFetcher.setPlaylistId(playlistID).fetchChartsPlaylist().get(10, TimeUnit.SECONDS).has("tracks")) 41 | } 42 | 43 | @Test 44 | fun fetchChartsPlaylistTracks() { 45 | val playlistID = this.getFirstPlaylistID() 46 | Assert.assertTrue(chartFetcher.setPlaylistId(playlistID).fetchChartsPlaylistTracks().get(10, TimeUnit.SECONDS).has("data")) 47 | } 48 | } -------------------------------------------------------------------------------- /docs/com.kkbox.openapideveloper.auth/-token-fetcher/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: TokenFetcher - com.kkbox.openapideveloper 3 | --- 4 | 5 | [com.kkbox.openapideveloper](../../index.html) / [com.kkbox.openapideveloper.auth](../index.html) / [TokenFetcher](.) 6 | 7 | # TokenFetcher 8 | 9 | `class TokenFetcher` 10 | 11 | The instance of this class fetches open api token. 12 | 13 | ### Constructors 14 | 15 | | [<init>](-init-.html) | `TokenFetcher(clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)`)`
creates a token fetcher. | 16 | 17 | ### Properties 18 | 19 | | [clientID](client-i-d.html) | `val clientID: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the client ID for accessing kkbox open api. | 20 | | [clientSecret](client-secret.html) | `val clientSecret: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
the client secret for accessing kkbox open api. | 21 | | [context](context.html) | `val context: `[`Context`](https://developer.android.com/reference/android/content/Context.html)
the context needed for creating http connection. | 22 | 23 | ### Functions 24 | 25 | | [fetchAccessToken](fetch-access-token.html) | `fun fetchAccessToken(bodyParameters: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`List`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>>): ResponseFuture`
Fetches the access token. | 26 | | [fetchInfo](fetch-info.html) | `fun fetchInfo(accessToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): ResponseFuture`
Fetches information about a access token. | 27 | | [refresh](refresh.html) | `fun refresh(refreshToken: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): ResponseFuture`
Refresh token when the token expired. | 28 | 29 | -------------------------------------------------------------------------------- /SDK/openapi_android_developer_sdk/OpenAPIDeveloperLibrary/src/main/java/com/kkbox/openapideveloper/api/MoodStationFetcher.kt: -------------------------------------------------------------------------------- 1 | package com.kkbox.openapideveloper.api 2 | 3 | import com.google.gson.JsonObject 4 | import com.kkbox.openapideveloper.Endpoint 5 | import com.koushikdutta.ion.future.ResponseFuture 6 | 7 | /** 8 | * Fetch mood stations and get tracks for a specific mood station. 9 | * 10 | * @property httpClient Get response from specific url. 11 | * @property territory The current territory. 12 | * @constructor Creates a mood station fetcher. 13 | * @see `https://docs.kkbox.codes/docs/mood-stations-mood` 14 | */ 15 | class MoodStationFetcher(private val httpClient: HttpClient, private val territory: String = "TW") { 16 | private val endpoint: String = Endpoint.API.MOOD_STATIONS.uri 17 | lateinit var moodStationId: String 18 | 19 | /** 20 | * Fetch all mood stations. 21 | * 22 | * @param limit The size for one page. 23 | * @param offset The offset index for first element. 24 | * @return the API response. 25 | * @sample MoodStationFetcher.fetchAllMoodStations() 26 | * @see `https://docs.kkbox.codes/docs/mood-stations-mood` 27 | */ 28 | fun fetchAllMoodStations(limit: Int? = null, offset: Int? = null): ResponseFuture { 29 | return httpClient.get(endpoint, 30 | mapOf("territory" to territory, 31 | "limit" to limit?.toString(), 32 | "offset" to offset?.toString())) 33 | } 34 | 35 | /** 36 | * Set a mood station ID. 37 | * 38 | * @param moodStationId The station ID. 39 | * @return the mood station ID. 40 | * @see `https://docs.kkbox.codes/docs/mood-stations-station` 41 | */ 42 | fun setMoodStationId(moodStationId: String): MoodStationFetcher { 43 | this.moodStationId = moodStationId 44 | return this 45 | } 46 | 47 | /** 48 | * Fetch metadata of a mood station by given ID. 49 | * 50 | * @return the object of mood station metadata. 51 | * @sample MoodStationFetcher.setMoodStationId('-msVbZnpWLE4CpWBJo').fetchMetadata() 52 | */ 53 | fun fetchMetadata(): ResponseFuture { 54 | return httpClient.get(endpoint + "/$moodStationId", mapOf("territory" to territory)) 55 | } 56 | } --------------------------------------------------------------------------------