musicbrainz-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +47 -0
  2. data/lib/musicbrainz.rb +15 -0
  3. metadata +57 -0
data/README.markdown ADDED
@@ -0,0 +1,47 @@
1
+ MusicBrainz-ruby
2
+ ================
3
+
4
+ O hai, I HTTParty'd ur [web service][1].
5
+
6
+ No offence, RBrainz gem.
7
+
8
+ I have only done the artist call so far.
9
+
10
+ [1]: http://wiki.musicbrainz.org/XMLWebService
11
+
12
+ Install
13
+ -------
14
+
15
+ gem install musicbrainz-ruby
16
+
17
+ Examples
18
+ --------
19
+
20
+ require 'musicbrainz-ruby'
21
+ brainz = MusicBrainz.new
22
+
23
+ brainz.artist('45d15468-2918-4da4-870b-d6b880504f77', :inc => 'artist-rels')
24
+ brainz.artist(nil, :query => 'Diplo')
25
+
26
+ MIT License
27
+ ===========
28
+
29
+ (c) Robin Tweedie 2010
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in
39
+ all copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
47
+ THE SOFTWARE.
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'httparty'
3
+
4
+ class MusicBrainz
5
+ include HTTParty
6
+ base_uri 'musicbrainz.org'
7
+
8
+ def artist(musicbrainz_id, params = {})
9
+ options = {}
10
+ options[:query] = {:type => 'xml'}
11
+ options[:query].merge!(params)
12
+
13
+ self.class.get("/ws/1/artist/#{musicbrainz_id}", options)
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: musicbrainz-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Robin Tweedie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2011-01-12 00:00:00 +00:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description:
17
+ email: robin@songkick.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.markdown
24
+ files:
25
+ - README.markdown
26
+ - lib/musicbrainz.rb
27
+ has_rdoc: true
28
+ homepage: ""
29
+ licenses: []
30
+
31
+ post_install_message:
32
+ rdoc_options:
33
+ - --main
34
+ - README.markdown
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: "0"
42
+ version:
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: "0"
48
+ version:
49
+ requirements: []
50
+
51
+ rubyforge_project:
52
+ rubygems_version: 1.3.5
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: HTTParty wrapper for MusicBrainz XML Web Service
56
+ test_files: []
57
+