subsonic_api 0.0.2 copy "subsonic_api: ^0.0.2" to clipboard
subsonic_api: ^0.0.2 copied to clipboard

Package that provides a simple API to interact with SubSonic API compatible servers.

SubSonic API Wrapper #

Package for interfacing with any SubSonic API compatible server.

Features #

- Fetch Artists and Albums from the server

Getting started #

Just add the package to your pubspec.yaml file:

dependencies:
  subsonic_api: ^0.0.2

Then import the package in your Dart code:

import 'package:subsonic_wrapper/subsonic_api.dart';

Usage #

To use this package, you'd need to generate your authentication token and salt.

String salt = SubSonicClient.createSalt();

String token = SubSonicClient.createToken('password', salt);

this is the preffered way to generate the token and salt, since it doen't expose the password anywhere in the application.

Then, you need to create a SubSonicClient object with the server URL, username, token, salt, client name and version.


SubSonicClient client = SubSonicClient(
    'http://server:port',
    'admin',
    token,
    salt,
    'Client Name',
    '1.0.0'
);

After that, you can use the client to fetch data from the server.

Future<void> fetch() async {
    SubSonicResponse response = await client.getArtists();
}
3
likes
0
points
34
downloads

Publisher

verified publishersoncore.net

Weekly Downloads

Package that provides a simple API to interact with SubSonic API compatible servers.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, http

More

Packages that depend on subsonic_api