arcgis-opendata 0.0.1 → 0.0.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client.rb +12 -4
  3. data/lib/opendata.rb +5 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba6ceb9cbfbe7cb039b3ae16bdb3d1a72017b298
4
- data.tar.gz: 1d7152b866a38919b88f891da6204a45435fc186
3
+ metadata.gz: 2dc43e610cc33ebbdd228a80ac14d73cb7b06cca
4
+ data.tar.gz: 3a500b8608c83c8dcc4a7c0c7823c63c8eb7d867
5
5
  SHA512:
6
- metadata.gz: d5284c9a51dd63107f82cf263853e535680829a2eef263044d4d3053a490eefcd79723aa102e461865903e71bec7902fe70466093128d3c75c25fd651ba4c995
7
- data.tar.gz: 4ccda693138e0896ed12f37587b6da2bd57410ef5ea7257743dc79e50be67e60be4271459832304a01dc20b3f26871397b451efca3a219c2d557da69b2c36227
6
+ metadata.gz: 61621ee8e90785dba3e3391546f9331bf71128fa60f581add5925290186908243d19a39af2d75c7ea83836a142e8dd72cb73b0e6507f03b5d7b1f580beb121d8
7
+ data.tar.gz: 46d0888becf27bf9cd0256a3e8f5e6fd74c585468e367f1bc4ff2e8dfa5ef33f4eee4eaa1cbeb71d6088776d3feb0f9bb8856aa223087241e4bffecaffcc4708
data/lib/client.rb CHANGED
@@ -3,21 +3,29 @@ require 'uri'
3
3
 
4
4
  module Opendata
5
5
 
6
- VERSION = '0.0.1'.freeze
6
+ VERSION = '0.0.2'.freeze
7
7
 
8
8
  class Client
9
-
9
+
10
+ # Constructor for Opendata::Client instances
11
+ # @param url [String] the base url to the open data API
12
+ # @param options [Hash] assorted options for instantiating the Opendata::Client instance
13
+ # @return [Object] the Opendata::Client instance which is a simple wrapper around a Faraday::Connection instance
10
14
  def initialize(url = nil, options = {})
11
15
  opts = options.merge(DEFAULT_HEADERS)
12
16
  @connection = Faraday.new(url, opts)
13
17
  end
14
18
 
15
- # For making requets at /api/v2/datasets
19
+ # Makes requests for 'logical collections' of Dataset resources (zero-to-many potential dataset resources)
20
+ # @param params [Hash] query parameters for Dataset resources
21
+ # @return [Object] Faraday::Response object
16
22
  def dataset_list(params = {})
17
23
  connection.get(DATASETS_API_PATH + param_to_query_string(params))
18
24
  end
19
25
 
20
- # For making requests at /api/v2/datasets/{:id}
26
+ # Makes requests for a 'logical object' for a specific Dataset resource (zero-to-one potential dataset resources)
27
+ # @param id [String] The dataset id
28
+ # @param params [Hash] Additional request parameters
21
29
  def dataset_show(id, params = {})
22
30
  raise '#dataset_show must receive a dataset id' if id.nil?
23
31
 
data/lib/opendata.rb CHANGED
@@ -2,7 +2,11 @@ require "client"
2
2
 
3
3
  module Opendata
4
4
 
5
- # Factory method to instantiate an Opendata::Client instance
5
+ # Returns a new Opendata::Client instance
6
+ #
7
+ # @param url [String] the base url to the open data API
8
+ # @param options [Hash] assorted options for instantiating the Opendata::Client instance
9
+ # @return [Object] the Opendata::Client instance
6
10
  class << self
7
11
  def new(url, options={})
8
12
  Client.new(url, options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcgis-opendata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Harris