arcgis-opendata 0.0.3 → 0.0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -11
  3. data/lib/client.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 657244bbd2f6ce7731fd11211271fa81cb9a4be1
4
- data.tar.gz: aeba9b4dde92f44bd9e8a93a8194ce747dd1d437
3
+ metadata.gz: 149324d284a0888b8bfbb57c28842b6e52bdc8d4
4
+ data.tar.gz: 442c429e07ee4606790fed1e4723769708c071d3
5
5
  SHA512:
6
- metadata.gz: cee5ea0f780f02322cc6c42cea65488b23f22b78090dd44c49088bd318bbd0a7fa586131b2c8cdc52428ba8a837ce92eb34561eeda59c50bd79031bc8f13b788
7
- data.tar.gz: 6a41c637b114144fb499e497d831bc568b16f2419fd66e0b3eacd4456baeb519c7293202a3616b4494f65dc687482cc0ef941c71e5ab460ae7526f8f5867d758
6
+ metadata.gz: 05274fb3bd8413a62fea7c865d470c3223a8bb872496dbed35c31724ac59077c2e7b7d2258c202464e5441e2531512541d0f567c90eec11208cf7ac8a6fd4529
7
+ data.tar.gz: 25998b84c58da249d6b5eacce49e04ce75d9d2b94ad179de8a01b3ccfdba436bcd0cb28458dcd6d16e8e562138462213b7ed7474c4edae98a41552a3d0ec159b
data/README.md CHANGED
@@ -1,19 +1,15 @@
1
1
  # Opendata
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/opendata`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
10
6
 
11
- Use this to reference the latest source directly
12
- ````ruby
7
+ Reference the latest source directly
8
+ ```ruby
13
9
  gem "arcgis-opendata", :git => "git://github.com/esridc/arcgis-opendata.rb.git", require: 'opendata'
14
- ````
10
+ ```
15
11
 
16
- Use this to pull the gem from rubygems.org
12
+ From rubygems.org
17
13
  ```ruby
18
14
  gem 'arcgis-opendata', require: 'opendata'
19
15
  ```
@@ -28,13 +24,40 @@ Or install it yourself as:
28
24
 
29
25
  ## Usage
30
26
 
31
- TODO: Write usage instructions here
27
+ The main class the gem provides is `Opendata::Client`, which can be used to query and fetch
28
+ resources from the ArcGIS Open Data API
29
+
30
+ Instantiate an Opendata::Client instance
31
+ ```ruby
32
+ client = Opendata::Client.new('https://opendata.arcgis.com')
33
+ ```
34
+
35
+ You can also instantiate an instance directly from the Opendata module
36
+ ```ruby
37
+ client = Opendata.new('https://opendata.arcgis.com')
38
+ ```
39
+
40
+ Make queries for datasets
41
+ ```ruby
42
+ client = Opendata.new('https://opendata.arcgis.com')
43
+
44
+ response = client.dataset_list(q: 'census', page: { size: 25}, include: 'organizations')
45
+ # => returns a Faraday::Response object
46
+ ```
47
+
48
+ Fetch a single dataset
49
+ ```ruby
50
+ client = Opendata.new('https://opendata.arcgis.com')
51
+
52
+ response = client.dataset_show('4df13_11', include: 'organizations,groups')
53
+ # => returns a Faraday::Response object
54
+ ```
32
55
 
33
56
  ## Development
34
57
 
35
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
58
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. ~~You can also run `bin/console` for an interactive prompt that will allow you to experiment.~~ `bin/console` is currently not working
36
59
 
37
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
60
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `client.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
61
 
39
62
  ## Contributing
40
63
 
data/lib/client.rb CHANGED
@@ -3,7 +3,7 @@ require 'uri'
3
3
 
4
4
  module Opendata
5
5
 
6
- VERSION = '0.0.3'.freeze
6
+ VERSION = '0.0.4.1'.freeze
7
7
 
8
8
  class Client
9
9
 
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.3
4
+ version: 0.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Harris