Download the PHP package utvarp/music-helper without Composer
On this page you can find all versions of the php package utvarp/music-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download utvarp/music-helper
More information about utvarp/music-helper
Files in utvarp/music-helper
Package music-helper
Short Description Trying to unify music sources into one handy package ?
License MIT
Homepage https://github.com/utvarp/music-helper
Informations about the package music-helper
Trying to unify music sources into one handy package 🎶
There is a lot of source for music information around. Maybe you just want to search one of them. Maybe you need to have many of the at the same time. This package is here for you!
Installation
You can install the package via composer:
Usage
At the moment, this package will only fetch basic informations:
- The track name and id from requested source;
- (If available) The artist name and id from requested source;
- (If available) The album name and id from requested source;
For now, you need to make extra call to the source API (with the ID) to fetch more detailed information.
In addition to the information from the source API, the package will also perform a string similarity check between a result's track and artist name against the actual searched for result. That way, you could decide not to trust the source' listing order and sort yourself by one of the smililarity score.
Here's how you could play with the package:
Wishlist / Roadmap / Help wanted 👷🚧👷♀️
- Caching search so we don't hit any API rate limit too quickly
- More source
- Gracenote (https://github.com/StukiOrg/GracenoteClient-PHP ?)
- Spotify (https://github.com/Shemahmforash/SpotifyWebApi ?)
- Discogs (https://github.com/ShaneCullinane/discogs ?)
- iTunes (https://github.com/jacoz/php-itunes-api ?)
- Musicbrainz (https://github.com/PBXg33k/MusicBrainz ?)
- Google Play Music
- Add more information to source (?)
- Add methods to make more precise search in sources' APIs (for ex.: searching by the ID returned by the basic search)?
Sources
How to create new source
This should be easy. Follow the next steps and check the corresponding files for the deezer
source and just build from there!
- Create a new search class in
src\Searches\{SourceName}.php
. This class should be only responsible to make the search to the source's api. - Create a new model class in
src\Models\{SourceName}Result.php
. This class should be only responsible to correctly format the results received by the API and set thetrack
,artist
andalbum
values using the corresponding methods you can find in the baseResult
model. - Add
sourceName
to thepossibleSources
collection in the constructor ofsrc\Music.php
. - (If required) Add a method to set the API key of the source and add the source to the
apiKeys
collection in the constructor ofsrc\Music.php
. - Test your things, but it should now be all ok!
Existing sources
- Deezer (API key required: NO)
- Musixmatch (API key required: YES)
Testing
Changelog
Changes can be found in the release pages of the repo.
Contributing
Contributions are welcome, thanks to everyone who sent something out way :)
License
The MIT License (MIT). Please see License File for more information.
All versions of music-helper with dependencies
atomescrochus/laravel-string-similarities Version ^1.1
deezer/deezer-php-sdk Version dev-master
illuminate/support Version ^5.4
akerbis/musixmatch Version dev-master