yahoo-music 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,85 @@
1
+ = yahoo-music
2
+
3
+ A Ruby wrapper for the Yahoo! Music APIs.
4
+
5
+ == Example Usage
6
+
7
+ === Artists:
8
+
9
+ require 'yahoo-music'
10
+ include Yahoo::Music
11
+ Yahoo::Music.app_id = [Your App ID Here]
12
+
13
+ artist = Artist.new("Ben Folds Five")
14
+
15
+ puts artist.name
16
+ puts artist.website
17
+
18
+ puts '*' * 40
19
+ puts
20
+
21
+ puts 'Releases'
22
+ artist.releases.each do |release|
23
+ puts "\t- %s" % release.title
24
+ end
25
+
26
+ === Releases & Tracks:
27
+
28
+ require 'yahoo-music'
29
+ include Yahoo::Music
30
+ Yahoo::Music.app_id = [Your App ID Here]
31
+
32
+ album = Album.search("The White Album").first
33
+
34
+ puts album.title
35
+ puts album.artist
36
+ puts "Release Date:" + album.released_on.strftime("%m/%d/%Y")
37
+
38
+ puts '*' * 40
39
+ puts
40
+
41
+ puts 'Tracks'
42
+ artist.tracks.each_with_index do |track, i|
43
+ puts "\t%d %s \t%2d:%2d" % [i, track.title, track.duration / 60, track.duration % 60]
44
+ end
45
+
46
+
47
+ == REQUIREMENTS:
48
+
49
+ To use this library, you must have a valid Yahoo! App ID.
50
+ You can get one at http://developer.yahoo.com/wsregapp/
51
+
52
+ Additionally, yahoo-music has the following gem dependencies:
53
+
54
+ * Hpricot >= 0.6
55
+ * ActiveSupport >= 2.1.0
56
+ * FlexMock >= 0.8.2
57
+
58
+ == INSTALL:
59
+
60
+ * sudo gem install yahoo-music
61
+
62
+ == LICENSE:
63
+
64
+ (The MIT License)
65
+
66
+ Copyright (c) 2008 Mattt Thompson
67
+
68
+ Permission is hereby granted, free of charge, to any person obtaining
69
+ a copy of this software and associated documentation files (the
70
+ 'Software'), to deal in the Software without restriction, including
71
+ without limitation the rights to use, copy, modify, merge, publish,
72
+ distribute, sublicense, and/or sell copies of the Software, and to
73
+ permit persons to whom the Software is furnished to do so, subject to
74
+ the following conditions:
75
+
76
+ The above copyright notice and this permission notice shall be
77
+ included in all copies or substantial portions of the Software.
78
+
79
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
80
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
81
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
82
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
83
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
84
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
85
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
metadata ADDED
@@ -0,0 +1,103 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yahoo-music
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mattt Thompson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-09-02 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.7.0
24
+ version:
25
+ description: yahoo-music is a wrapper to the Y! Music REST APIs
26
+ email:
27
+ - mail@matttthompson.com
28
+ executables: []
29
+
30
+ extensions: []
31
+
32
+ extra_rdoc_files:
33
+ - History.txt
34
+ - License.txt
35
+ - Manifest.txt
36
+ - PostInstall.txt
37
+ - README.txt
38
+ - website/index.txt
39
+ files:
40
+ - History.txt
41
+ - License.txt
42
+ - Manifest.txt
43
+ - PostInstall.txt
44
+ - README.txt
45
+ - Rakefile
46
+ - config/hoe.rb
47
+ - config/requirements.rb
48
+ - lib/rest.rb
49
+ - lib/yahoo-music.rb
50
+ - lib/yahoo-music/base.rb
51
+ - lib/yahoo-music/artist.rb
52
+ - lib/yahoo-music/category.rb
53
+ - lib/yahoo-music/release.rb
54
+ - lib/yahoo-music/review.rb
55
+ - lib/yahoo-music/track.rb
56
+ - lib/yahoo-music/video.rb
57
+ - lib/yahoo-music/version.rb
58
+ - script/console
59
+ - script/destroy
60
+ - script/generate
61
+ - script/txt2html
62
+ - setup.rb
63
+ - tasks/deployment.rake
64
+ - tasks/environment.rake
65
+ - tasks/website.rake
66
+ - test/test_helper.rb
67
+ - test/fixtures/artist.xml
68
+ - test/fixtures/categories.xml
69
+ - test/fixtures/release.xml
70
+ - test/test_yahoo_music_artist.rb
71
+ - test/test_yahoo_music_release.rb
72
+ - website/index.txt
73
+ has_rdoc: true
74
+ homepage: http://yahoo-music.rubyforge.org
75
+ post_install_message: ""
76
+ rdoc_options:
77
+ - --main
78
+ - README.txt
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: "0"
86
+ version:
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: "0"
92
+ version:
93
+ requirements: []
94
+
95
+ rubyforge_project: yahoo-music
96
+ rubygems_version: 1.2.0
97
+ signing_key:
98
+ specification_version: 2
99
+ summary: yahoo-music is a wrapper to the Y! Music REST APIs
100
+ test_files:
101
+ - test/test_helper.rb
102
+ - test/test_yahoo_music_artist.rb
103
+ - test/test_yahoo_music_release.rb