Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleander/webhallon_wrapper
The bridge between Webhallon and Ruby
https://github.com/oleander/webhallon_wrapper
Last synced: about 2 months ago
JSON representation
The bridge between Webhallon and Ruby
- Host: GitHub
- URL: https://github.com/oleander/webhallon_wrapper
- Owner: oleander
- Created: 2011-03-24T19:52:54.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-06-05T22:10:45.000Z (over 12 years ago)
- Last Synced: 2023-04-10T09:40:17.525Z (almost 2 years ago)
- Language: Ruby
- Homepage: http://github.com/oleander/webhallon_wrapper
- Size: 156 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webhallon Client
Used **_internally_** at [Radiofy.se](http://radiofy.se).
## How to use
### Initialize
```` ruby
socket = Webhallon::Client.new("http://server:8181")
````### Playlist
#### Create
Create a non collaborative playlist.
```` ruby
socket.playlists.create({
name: "My playlist",
collaborative: false
})
````### Wipe
``` ruby
socket.tracks.wipe("spotify:user:username:playlist:47JbGTR8wxJw0SX0G1CJcS")
```#### Information
```` ruby
socket.playlists.information("spotify:user:username:playlist:47JbGTR8wxJw0SX0G1CJcS")
````#### Update
```` ruby
socket.playlists.update({
playlist: "spotify:user:username:playlist:47JbGTR8wxJw0SX0G1CJcS",
name: "New name",
collaborative: false
})
````### Tracks
#### Add
``` ruby
socket.tracks.add({
playlist: "spotify:user:username:playlist:47JbGTR8wxJw0SX0G1CJcS",
tracks: ["spotify:track:2Huqz13a9lalQkSPeSk7Sy"],
index: 0
})
```#### Range
``` ruby
socket.tracks.keep({
playlist: "spotify:user:username:playlist:47JbGTR8wxJw0SX0G1CJcS",
range: 30..50
})
```### Webhallon::Playlist
- **name** (String) The name of the playlist.
- **link** (String) The spotify playlist url.
- **length** (Integer) The amount of tracks in the playlist.
- **tracks** (Array< String >) A list of spotify tracks.
- **collaborative?** (Boolean) Is the playlist collaborative?## Requirements
*Webhallon* is tested in *OS X 10.7.4* using Ruby *1.9.2*.
## License
*Webhallon* is released under the *MIT license*.