echonest-ruby-api 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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|
@@ -1,3 +1,3 @@
1
1
  module Echonest
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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-09 00:00:00.000000000 Z
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
@@ -1,4 +0,0 @@
1
- module Echonest
2
- class News
3
- end
4
- end