Skip to content

subsonic_api.dart is a wrapper for the Subsonic API in Dart, with additional support for OpenSubsonic.

License

Notifications You must be signed in to change notification settings

RanKKI/opensubsonic_api.dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Open)Subsonic API Wrapper For Dart

opensubsonic_api.dart is a wrapper for the Subsonic API in Dart, with additional support for OpenSubsonic.

Usage

Define SubsonicApi

final client = SubsonicApi(
  baseUrl: 'https://example.com', // or 'http://localhost:3000'
  auth: SubsonicAuthModel.randomSalt(
    'admin', // your username
    'admin-password', // your password
  ),
);

final result = await client.api.getArtists();
print(result);

Note:

There are multiple ways to set up the authentication, for example:

If you don't want to expose your password in the code, you can use the [SubsonicAuthModel.token].

Alternatively, you may use [SubsonicAuthModel.password] to use your password directly; however, this should only be used for testing purposes.

About

subsonic_api.dart is a wrapper for the Subsonic API in Dart, with additional support for OpenSubsonic.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published