{"id":21201665,"url":"https://github.com/oleander/wimp-rb","last_synced_at":"2025-06-18T19:35:19.653Z","repository":{"id":15117709,"uuid":"17844667","full_name":"oleander/wimp-rb","owner":"oleander","description":"Ruby bindings for WiMP","archived":false,"fork":false,"pushed_at":"2014-03-18T22:02:53.000Z","size":335,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T02:48:59.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"OS2web/os2web_esdh_field","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oleander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-17T21:52:41.000Z","updated_at":"2020-06-09T18:31:52.000Z","dependencies_parsed_at":"2022-08-03T02:15:51.766Z","dependency_job_id":null,"html_url":"https://github.com/oleander/wimp-rb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fwimp-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fwimp-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fwimp-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fwimp-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oleander","download_url":"https://codeload.github.com/oleander/wimp-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225622846,"owners_count":17498168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T20:10:24.027Z","updated_at":"2024-11-20T20:10:24.658Z","avatar_url":"https://github.com/oleander.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WiMP\n\nRuby bindings for [WiMP](http://wimpmusic.com). The library uses WiMPs \ninternal RPC API. Take a look at the [FAQ](#faq) for frequently asked \nquestions and how to port this library to any language using \n[thrift](http://thrift.apache.org/).\n\n## Installation\n\n```\n$ gem install wimp\n```\n\n## Usage\n\nKeep in mind that you need premium acount for this to work.\n\n``` ruby\nWiMP.configure do |config|\n  config.username = \"email@example.com\"\n  config.password = \"my-password\"\nend\n```\n\n### WiMP::Track\n\n#### Search\n\n``` ruby\ntracks = WiMP::Track.search(query, {\n  limit: 10\n})\n```\n\n### WiMP::Playlist\n\nNote that you can only read and update your own playlists, \nnot someone else's.\n\n#### Find a playlist\n\n``` ruby\nplaylist = WiMP::Playlist.find(uuid)\n```\n\n#### Create a playlist\n\n``` ruby\nplaylist = WiMP::Playlist.create(title)\n```\n\n#### Add tracks to playlist\n\n``` ruby\nstatus = playlist.add_tracks(tracks, {\n  start_position: 1\n})\n```\n\n#### Add tracks to playlist using Track#id\n\n``` ruby\nstatus = playlist.add_tracks_by_id(track_ids, {\n  start_position: 1\n})\n```\n\n#### Remove tracks from playlist\n\n``` ruby\nstatus = playlist.remove_tracks_by_indices(tracks)\n```\n\n## Containers\n\n### WiMP::Track\n\n- title **String**\n- album_id **Integer**\n- duration **Integer**\n- id **Integer**\n- popularity **Integer**\n- artist **WiMP::SimpleArtist**\n- url **String**\n\n### WiMP::Playlist\n\n- count **Integer**\n- url **String**\n- tracks **Array\u003c WiMP::Track \u003e**\n- uuid **String**\n- id **Integer**\n\n### WiMP::SimpleArtist\n\n- id **Integer**\n- name **String**\n- url **String**\n\n## FAQ\n\n### Can I port this library to language X?\n\nProbably. WiMP uses [thrift](http://thrift.apache.org/) behind the scene, \nwhich means that code for C++, C#, Erlang, Haskell, Java, Objective \nC/Cocoa, OCaml, Perl, PHP, Python, and Squeak can be generated. Take a look \nat the `resources/thrift` folder and the `Rakefile` file for more \ninformation on how this could be done.\n\n[Here is a good thrift tutorial](http://diwakergupta.github.io/thrift-missing-guide/) \nthat explains the basics.\n\n### Can I stream music using this library?\n\nThe WiMP API has support for streaming, but I've chosen not to include \nthose methods.\n\n### Where is the rest of the implementation?\n\nTake a look at the `lib/gen` folder for more, undocumented code. Code\nexists for all 50 some methods in the thrift directory, but only a few are\nported to a Ruby-friendly syntax and documented above. You're more than\nwelcome to help me migrate all these methods.\n\nSome methods from the offical API isn't ported to thrift. You'll find a list\nof these in the `resources/skipped-methods.md` file.\n\n### I'm get an `Thrift::ApplicationException` error, why?\n\nThe `Thrift::ApplicationException` error indicates that the returning data\nfrom WiMP isn't what we think it is. It's usually caused by invalid data being passed\nto thrift. \n\nIn other words; check the data being passed from this library. Is it correct?\n\n## Notes\n\n1. Not all methods existing in the offical API are documented above, but \nthe code for all of them exists. Navigate the `lib` folder for more information.\n2. The first request to the API will be slower than the rest.\nThat's because a session is created.\n3. None of the credentials in this project are my own. They're \nonly created to be used in the specs. They might therefore already \nbe expired when you read this.\n4. This library has been created for educational purposes. You shouldn't\nuse it without first consulting WiMP.\n\n## Contributing\n\n1. Fork it ( http://github.com/oleander/wimp-rb/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fwimp-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleander%2Fwimp-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fwimp-rb/lists"}