kkbox_openapi 0.9.4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new55

KKBOX Open API Dart Developer SDK

License Apache 

KKBOX's Open API provides various data from KKBOX's rich music archive. It helps you to access data about KKBOX's song tracks, albums, artist playlist and so on.

For further information, please visit KKBOX Developer Site.

Installation

To use the SDK, add kkbox_openapi to your pubspec.yaml file.

Then run pub get.

Usage

A simple usage example:

import 'package:kkbox_openapi/kkbox_openapi.dart';

main() {
  var clientID = "YOUR_CLIENT_ID";
  var clientSecret = "YOUR_CLIENT_SECRET";
  var api = new KKBOXOpenAPI(clientID, clientSecret);
  try {
    await api.fetchAccessTokenByClientCredential();
    var result = await api.fetchTrack('4kxvr3wPWkaL9_y3o_');
    print(result);
  } catch (err) {
    print(err);
  }
}

License

Copyright 2018 KKBOX Technologies Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0.9.4

  • Bug fixes.

0.9.3

  • Updates documentation.

0.9.0

  • Initial version, created by Stagehand

example/kkbox_openapi_example.dart

import 'package:kkbox_openapi/kkbox_openapi.dart';

main() async {
  var clientID = "YOUR_CLIENT_ID";
  var clientSecret = "YOUR_CLIENT_SECRET";
  var api = new KKBOXOpenAPI(clientID, clientSecret);
  try {
    await api.fetchAccessTokenByClientCredential();
    var result = await api.fetchTrack('4kxvr3wPWkaL9_y3o_');
    print(result);
  } catch (err) {
    print(err);
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  kkbox_openapi: ^0.9.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:kkbox_openapi/kkbox_openapi.dart';
  
Version Uploaded Documentation Archive
0.9.4 Jun 28, 2018 Go to the documentation of kkbox_openapi 0.9.4 Download kkbox_openapi 0.9.4 archive
0.9.3 Jun 27, 2018 Go to the documentation of kkbox_openapi 0.9.3 Download kkbox_openapi 0.9.3 archive
0.9.1 Jun 27, 2018 Go to the documentation of kkbox_openapi 0.9.1 Download kkbox_openapi 0.9.1 archive
0.9.0 Jun 27, 2018 Go to the documentation of kkbox_openapi 0.9.0 Download kkbox_openapi 0.9.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
40
Health:
Code health derived from static analysis. [more]
74
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
64
Overall:
Weighted score of the above. [more]
55
Learn more about scoring.

We analyzed this package on Jul 20, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.69.0
  • pana: 0.11.7

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:kkbox_openapi/kkbox_openapi.dart.

Issues and suggestions

Fix lib/src/base.dart.

Analysis of lib/src/base.dart failed with 1 error, 4 hints:

line 3 col 8: Target of URI doesn't exist: 'package:http/http.dart'.

line 88 col 19: 'UTF8' is deprecated and shouldn't be used.

line 89 col 14: 'BASE64' is deprecated and shouldn't be used.

line 104 col 24: 'JSON' is deprecated and shouldn't be used.

line 122 col 22: 'JSON' is deprecated and shouldn't be used.

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0
Dev dependencies
test ^0.12.0