citygrid_api 0.0.2 → 0.0.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/citygrid_api.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{citygrid_api}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Elpizo Choi"]
@@ -27,7 +27,7 @@ class CityGrid
27
27
  query = options.merge :publisher => publisher, :format => "json"
28
28
  response = get endpoint, :query => query
29
29
 
30
- if response["errors"].empty?
30
+ if !response["errors"] || response["errors"].empty?
31
31
  CityGrid::API::Response.new response
32
32
  else
33
33
  raise Error.new response["errors"], response
@@ -1,6 +1,10 @@
1
1
  class CityGrid
2
2
  class Listing < Abstraction::SuperHash
3
3
 
4
+ def self.load opts = {}
5
+ new({}).update Details.new(opts)
6
+ end
7
+
4
8
  def method_missing meth, *args, &block
5
9
  load unless @loaded
6
10
  send(meth, *args, &block) rescue super
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: citygrid_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Elpizo Choi