music_playce_sdk 0.2.5

  • Readme
  • Changelog
  • Installing
  • 68

MusicPlayce SDK #

MusicPlayce is the platform that fullfills the dream of those who want to make a living out of music.

This SDK encapsulates the requests made to the MusicPlayce API

Getting Started #

API Coverage #

  • [ ] /users
  • [x] /auth
  • [ ] /posts
  • [ ] /media
  • [ ] /tags
  • [ ] /playlists
  • [ ] /subscriptions
  • [ ] /terms
  • [ ] /places
  • [ ] /polls
  • [ ] /data
  • [ ] /releases
  • [ ] /auditions
  • [ ] /schedule
  • [ ] Other (search)

Changelog #

0.2.5 #

Fixed #

  • Policy model cast from int to string

0.2.4 #

Changed #

  • Adding lastResponse in http implementation

0.2.3 #

Changed #

  • Adding validate token endpoint to RefreshTokenInterceptor blacklist

0.2.2 #

Changed #

  • Adding Signup route to SetToken whitelist

0.2.1 #

Changed #

  • Fixing nullable map in signup

0.2.0 #

Added #

  • Adding more auth routes
  • Adding response interceptors support
  • Interceptor for setting token
  • MusicPlayce own Request class
  • MusicPlayce own send unstreamed responses method
  • Comments for improve readability
  • Http Layer improvements

Changed #

  • Refresh Token interceptor fixes

0.1.0+1 #

Added #

  • Initial version
  • Add auth routes

Use this package as a library

1. Depend on it

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


dependencies:
  music_playce_sdk: ^0.2.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:music_playce_sdk/core/api/endpoints/auth_endpoint.dart';
import 'package:music_playce_sdk/core/api/environment.dart';
import 'package:music_playce_sdk/core/api/interceptors/refresh_token_interceptor.dart';
import 'package:music_playce_sdk/core/api/interceptors/set_token_interceptor.dart';
import 'package:music_playce_sdk/core/api/models/auth/activity_request.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/activity_response.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/auth_credentials.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/auth_extra_body.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/forgot_password_request.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/policy_terms.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/refresh_token_request.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/refresh_token_response.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/signin_response.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/signout_response.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/signup_request.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/signup_response.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/spotify_login_request.model.dart';
import 'package:music_playce_sdk/core/api/models/auth/validate_token_response.model.dart';
import 'package:music_playce_sdk/core/api/repositories/auth_repository.dart';
import 'package:music_playce_sdk/core/api/repositories/impl/auth_repository_impl.dart';
import 'package:music_playce_sdk/core/api/services/auth_service.dart';
import 'package:music_playce_sdk/core/api/services/impl/auth_service_impl.dart';
import 'package:music_playce_sdk/core/http/impl/music_playce_http_impl.dart';
import 'package:music_playce_sdk/core/http/music_playce_http.dart';
import 'package:music_playce_sdk/core/http/music_playce_http_headers.dart';
import 'package:music_playce_sdk/core/http/music_playce_http_interceptor.dart';
import 'package:music_playce_sdk/core/http/music_playce_http_interceptor_wrapper.dart';
import 'package:music_playce_sdk/core/http/music_playce_http_request.dart';
import 'package:music_playce_sdk/core/utils/map_utils.dart';
import 'package:music_playce_sdk/core/utils/string_util.dart';
import 'package:music_playce_sdk/main.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform linux

Because:

  • package:music_playce_sdk/core/api/interceptors/refresh_token_interceptor.dart that imports:
  • package:flutter_secure_storage/flutter_secure_storage.dart that declares support for platforms: android, ios

Package does not support Flutter platform macos

Because:

  • package:music_playce_sdk/core/api/interceptors/refresh_token_interceptor.dart that imports:
  • package:flutter_secure_storage/flutter_secure_storage.dart that declares support for platforms: android, ios

Package does not support Flutter platform web

Because:

  • package:music_playce_sdk/core/api/interceptors/refresh_token_interceptor.dart that imports:
  • package:flutter_secure_storage/flutter_secure_storage.dart that declares support for platforms: android, ios

Package does not support Flutter platform windows

Because:

  • package:music_playce_sdk/core/api/interceptors/refresh_token_interceptor.dart that imports:
  • package:flutter_secure_storage/flutter_secure_storage.dart that declares support for platforms: android, ios

Package not compatible with SDK dart

Because:

  • music_playce_sdk that is a package requiring null.

Health suggestions

Fix lib/core/http/impl/music_playce_http_impl.dart. (-1.99 points)

Analysis of lib/core/http/impl/music_playce_http_impl.dart reported 4 hints:

line 146 col 7: Avoid wrapping fields in getters and setters just to be "safe".

line 150 col 16: Avoid wrapping fields in getters and setters just to be "safe".

line 152 col 7: Avoid wrapping fields in getters and setters just to be "safe".

line 156 col 11: Avoid wrapping fields in getters and setters just to be "safe".

Fix lib/core/api/models/auth/signout_response.model.dart. (-0.50 points)

Analysis of lib/core/api/models/auth/signout_response.model.dart reported 1 hint:

line 1 col 8: Unused import: 'package:music_playce_sdk/core/api/models/auth/auth_extra_body.model.dart'.

Fix lib/core/api/repositories/impl/auth_repository_impl.dart. (-0.50 points)

Analysis of lib/core/api/repositories/impl/auth_repository_impl.dart reported 1 hint:

line 5 col 8: Don't import implementation files from another package.

Fix additional 25 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/core/api/endpoints/auth_endpoint.dart (Run flutter format to format lib/core/api/endpoints/auth_endpoint.dart.)
  • lib/core/api/environment.dart (Run flutter format to format lib/core/api/environment.dart.)
  • lib/core/api/interceptors/refresh_token_interceptor.dart (Run flutter format to format lib/core/api/interceptors/refresh_token_interceptor.dart.)
  • lib/core/api/interceptors/set_token_interceptor.dart (Run flutter format to format lib/core/api/interceptors/set_token_interceptor.dart.)
  • lib/core/api/models/auth/activity_request.model.dart (Run flutter format to format lib/core/api/models/auth/activity_request.model.dart.)
  • lib/core/api/models/auth/activity_response.model.dart (Run flutter format to format lib/core/api/models/auth/activity_response.model.dart.)
  • lib/core/api/models/auth/auth_credentials.model.dart (Run flutter format to format lib/core/api/models/auth/auth_credentials.model.dart.)
  • lib/core/api/models/auth/auth_extra_body.model.dart (Run flutter format to format lib/core/api/models/auth/auth_extra_body.model.dart.)
  • lib/core/api/models/auth/refresh_token_request.model.dart (Run flutter format to format lib/core/api/models/auth/refresh_token_request.model.dart.)
  • lib/core/api/models/auth/refresh_token_response.model.dart (Run flutter format to format lib/core/api/models/auth/refresh_token_response.model.dart.)
  • lib/core/api/models/auth/signin_response.model.dart (Run flutter format to format lib/core/api/models/auth/signin_response.model.dart.)
  • lib/core/api/models/auth/signup_request.model.dart (Run flutter format to format lib/core/api/models/auth/signup_request.model.dart.)
  • lib/core/api/models/auth/signup_response.model.dart (Run flutter format to format lib/core/api/models/auth/signup_response.model.dart.)
  • lib/core/api/models/auth/validate_token_response.model.dart (Run flutter format to format lib/core/api/models/auth/validate_token_response.model.dart.)
  • lib/core/api/repositories/auth_repository.dart (Run flutter format to format lib/core/api/repositories/auth_repository.dart.)
  • lib/core/api/services/auth_service.dart (Run flutter format to format lib/core/api/services/auth_service.dart.)
  • lib/core/api/services/impl/auth_service_impl.dart (Run flutter format to format lib/core/api/services/impl/auth_service_impl.dart.)
  • lib/core/http/music_playce_http.dart (Run flutter format to format lib/core/http/music_playce_http.dart.)
  • lib/core/http/music_playce_http_headers.dart (Run flutter format to format lib/core/http/music_playce_http_headers.dart.)
  • lib/core/http/music_playce_http_interceptor.dart (Run flutter format to format lib/core/http/music_playce_http_interceptor.dart.)
  • lib/core/http/music_playce_http_interceptor_wrapper.dart (Run flutter format to format lib/core/http/music_playce_http_interceptor_wrapper.dart.)
  • lib/core/http/music_playce_http_request.dart (Run flutter format to format lib/core/http/music_playce_http_request.dart.)
  • lib/core/utils/map_utils.dart (Run flutter format to format lib/core/utils/map_utils.dart.)
  • lib/core/utils/string_util.dart (Run flutter format to format lib/core/utils/string_util.dart.)
  • lib/main.dart (Run flutter format to format lib/main.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (get_it).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and music_playce_sdk.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
crypto ^2.0.6 2.1.5
flutter 0.0.0
flutter_secure_storage ^3.3.3 3.3.3
get_it ^3.0.0+1 3.1.0 4.0.2
http ^0.12.1 0.12.1
http_parser ^3.1.4 3.1.4
rxdart ^0.24.0 0.24.1
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
convert 2.1.1
meta 1.1.8 1.2.2
path 1.7.0
pedantic 1.9.0 1.9.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test