This library provides you with a nice interface to Genius API.
Use Genius Lyrics API with ease #
This library provides you with a nice interface to Genius API. It's not an official Genius product.
All the available API documentation is copied and adapted into comments for you to see the usage of classes/methods right from an IDE.
All the API-related classes are prefixed with
Core classes #
GeniusApiOptionsallows you to configure method calls.
GeniusApiTextFormatis the requested server response format.
GeniusApiResponsecontains the response of a successful method call.
GeniusApiExceptionwill be thrown when http status code differs from 2xx.
Main API classes #
GeniusApiAuthallows you to get an accessToken, both on server or client.
GeniusApiRawprovides all the other officially documented methods.
GeniusApiis basic abstract API class that you can extend to write your own implementations.
I'm planning to add some more Genius API implementations in the future
There's what I think I will eventually add in new implementations:
- some utility methods
- fully typed method calls and responses
- undocumented endpoints
For now the library only provides the comprehensive interface to Genius API
GeniusApiRaw implementation, nothing more.
Each method is documented fairly well and has pretty the same parameters, as listed in the official API doc.
You can find usage examples for each of them in tests folder.
A simple usage example:
final api = GeniusApiRaw( accessToken: 'token here', // Set all methods to return plain text instead of the default dom format. defaultOptions: GeniusApiOptions(textFormat: GeniusApiTextFormat.plain), ); // Get info about song "https://genius.com/Yxngxr1-riley-reid-lyrics". final res = await api.getSong(4585202); print(res.data['song']['full_title']); // Outputs "Riley Reid by yxngxr1"
Further Reading #
Check out the API docs for detailed information about all package members.
Features and bugs #
Please file feature requests and bugs at the issue tracker.
For folk seeing this on GitHub