Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awidegreen/detektorfm
lib for detektor.fm
https://github.com/awidegreen/detektorfm
Last synced: about 1 month ago
JSON representation
lib for detektor.fm
- Host: GitHub
- URL: https://github.com/awidegreen/detektorfm
- Owner: awidegreen
- License: other
- Created: 2013-09-26T17:27:07.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-09T20:48:07.000Z (over 11 years ago)
- Last Synced: 2024-12-01T12:41:32.812Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# detektorfm
Library for the **detektor.fm** website.
The gem includes the following executables:
* detektorfm.player
* detektorfm.playlistFeatures:
* querying last played songs
* most played artist in last 7 weeks
* ... to be extended ...## Installation
Add this line to your application's Gemfile:
gem 'detektorfm'
And then execute:
$ bundle
Or install it yourself as:
$ gem install detektorfm
## Library usage
Get an instance of `DetektorFm::MusikStream` or `DetektorFm::WortStream` and
start querying the playlist with `played()` or get specific stream url
`get_stream_url**Example** Query last 42 played songs from musikstream
```
require "detektorfm"
stream = DetektorFm::MusikStream.new
stream.played(42) do |time, artist, title|
printf " %20s %s - %s\n", time, artist, title
end
```## Executables
Some reference implementations.Use `-h` for help.
### detektorfm.playlist
Query last played songs (default 3) from wortstream and musikstream:
detektorfm.playlist -m -w
Query last 15 last played songs from musikstream:
detektorfm.playlist -m -l15
Query most played artists form the last 7 days, overall (both streams)
detektorfm.playlist -p
### detektorfm.player
Requires *mplayer* to be installed.
Play the musikstream
detektorfm.player musik
Play the wortstream
detektorfm.player wort
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request## License
Licensed under BSD (2-Clause), see LICENSE.txt[awidegreen](http://github.com/awidegreen)