echonest-ruby-api 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/doc/Biography.html +368 -0
- data/doc/Blog.html +422 -0
- data/doc/Echonest.html +129 -0
- data/doc/Echonest/Artist.html +839 -0
- data/doc/Echonest/Base.html +471 -0
- data/doc/Echonest/Base/EchonestConnectionError.html +123 -0
- data/doc/_index.html +157 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +128 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +128 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +252 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/base.rb +19 -1
- data/lib/echonest-ruby-api/version.rb +1 -1
- data/pkg/echonest-ruby-api-0.0.4.gem +0 -0
- metadata +24 -4
- data/lib/echonest-ruby-api/news.rb +0 -26
- data/lib/news.rb +0 -4
data/lib/base.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'artist'
|
2
2
|
require 'biography'
|
3
3
|
require 'blog'
|
4
|
-
require 'news'
|
5
4
|
|
6
5
|
module Echonest
|
7
6
|
class Base
|
@@ -12,14 +11,33 @@ module Echonest
|
|
12
11
|
@base_uri = "http://developer.echonest.com/api/v4/"
|
13
12
|
end
|
14
13
|
|
14
|
+
# Gets the base URI for all API calls
|
15
|
+
#
|
16
|
+
# Returns a String
|
15
17
|
def self.base_uri
|
16
18
|
"http://developer.echonest.com/api/v#{ Base.version }/"
|
17
19
|
end
|
18
20
|
|
21
|
+
# The current version of the Echonest API to be supported.
|
22
|
+
#
|
23
|
+
# Returns a Fixnum
|
19
24
|
def self.version
|
20
25
|
4
|
21
26
|
end
|
22
27
|
|
28
|
+
# Performs a simple HTTP get on an API endpoint.
|
29
|
+
#
|
30
|
+
# Examples:
|
31
|
+
# get('artist/biographies', results: 10)
|
32
|
+
# #=> Array of Biography objects.
|
33
|
+
#
|
34
|
+
# Raises an +ArgumentError+ if the Echonest API responds with
|
35
|
+
# an error.
|
36
|
+
#
|
37
|
+
# * +endpoint+ - The name of an API endpoint as a String
|
38
|
+
# * +options+ - A Hash of options to pass to the end point.
|
39
|
+
#
|
40
|
+
# Returns a response as a Hash
|
23
41
|
def get(endpoint, options = {})
|
24
42
|
query_string = ""
|
25
43
|
options.each do |key, value|
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: echonest-ruby-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -105,17 +105,36 @@ files:
|
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
107
|
- Rakefile
|
108
|
+
- doc/Biography.html
|
109
|
+
- doc/Blog.html
|
110
|
+
- doc/Echonest.html
|
111
|
+
- doc/Echonest/Artist.html
|
112
|
+
- doc/Echonest/Base.html
|
113
|
+
- doc/Echonest/Base/EchonestConnectionError.html
|
114
|
+
- doc/_index.html
|
115
|
+
- doc/class_list.html
|
116
|
+
- doc/css/common.css
|
117
|
+
- doc/css/full_list.css
|
118
|
+
- doc/css/style.css
|
119
|
+
- doc/file.README.html
|
120
|
+
- doc/file_list.html
|
121
|
+
- doc/frames.html
|
122
|
+
- doc/index.html
|
123
|
+
- doc/js/app.js
|
124
|
+
- doc/js/full_list.js
|
125
|
+
- doc/js/jquery.js
|
126
|
+
- doc/method_list.html
|
127
|
+
- doc/top-level-namespace.html
|
108
128
|
- echonest-ruby-api.gemspec
|
109
129
|
- lib/artist.rb
|
110
130
|
- lib/base.rb
|
111
131
|
- lib/biography.rb
|
112
132
|
- lib/blog.rb
|
113
133
|
- lib/echonest-ruby-api.rb
|
114
|
-
- lib/echonest-ruby-api/news.rb
|
115
134
|
- lib/echonest-ruby-api/version.rb
|
116
|
-
- lib/news.rb
|
117
135
|
- pkg/echonest-ruby-api-0.0.1.gem
|
118
136
|
- pkg/echonest-ruby-api-0.0.3.gem
|
137
|
+
- pkg/echonest-ruby-api-0.0.4.gem
|
119
138
|
- spec/artist_spec.rb
|
120
139
|
- spec/base_spec.rb
|
121
140
|
- spec/spec_helper.rb
|
@@ -148,3 +167,4 @@ test_files:
|
|
148
167
|
- spec/artist_spec.rb
|
149
168
|
- spec/base_spec.rb
|
150
169
|
- spec/spec_helper.rb
|
170
|
+
has_rdoc:
|
@@ -1,26 +0,0 @@
|
|
1
|
-
class News
|
2
|
-
|
3
|
-
def initialize(options = {})
|
4
|
-
@name = options[:name]
|
5
|
-
@url = options[:url]
|
6
|
-
@date_posted = options[:date_posted]
|
7
|
-
@summary = options[:summary]
|
8
|
-
end
|
9
|
-
|
10
|
-
def name
|
11
|
-
@name
|
12
|
-
end
|
13
|
-
|
14
|
-
def url
|
15
|
-
@url
|
16
|
-
end
|
17
|
-
|
18
|
-
def date_posted
|
19
|
-
@date_posted
|
20
|
-
end
|
21
|
-
|
22
|
-
def summary
|
23
|
-
@summary
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
data/lib/news.rb
DELETED