idigbio_client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c93a98a42c4cd9936bbca8f3b37dfbbf052590a0
4
- data.tar.gz: ef51fb9364dc76e6734ed92d9e21808cdf895272
3
+ metadata.gz: 62fa6773f6c3978b6f0178460be1ab11cbc74e0b
4
+ data.tar.gz: 306805ac056273c5a5f70776fc2796e9adb1444a
5
5
  SHA512:
6
- metadata.gz: 9118912a42a83674c8e7bcbbd378a5830e6955df18da2098d688cebd4fd5b668b18bb61b3b7d4d36d8bbfbf2199d61c7ea6ebd607511d1de655f34b0c0048df4
7
- data.tar.gz: 5d46747e2e78157907dc95230ad824366de95e36629cd5e726463207c55fe1d6514849c41ef8e256879f34e50356582d01c52e4b551cc4c061b859c7ab7e9fa6
6
+ metadata.gz: 3ff4f93d2833bbda8c75e810a997b9f37c90f88b21619aa4545dc33e0aced10ba5136279eadcf671f3e5cd0ad6ec115bfbdfc12cd573f7e3f57965a8bfd94937
7
+ data.tar.gz: 3be8cf4fc68036a5bdae33d5d4066d7357d9fba5dcadc0ac661d85323cdef563d5d266869ee82c954aeaa7dba3533388e16b8b517accaabfb97f511b5dd86c6e
@@ -1,6 +1,10 @@
1
1
  gn_crossmap CHANGELOG
2
2
  =====================
3
3
 
4
+ 0.1.1
5
+ -----
6
+ - [Dmitry Mozzherin][dimus] - fixes in README and gemfile
7
+
4
8
  0.1.0
5
9
  -----
6
10
  - [Dmitry Mozzherin][dimus] - initial version
data/README.md CHANGED
@@ -31,7 +31,7 @@ Or install it yourself as:
31
31
  Usage
32
32
  -----
33
33
 
34
- Client functions can be grouped in 4 catetories
34
+ Client functions can be grouped in 4 categories
35
35
 
36
36
  * [inspect][inspect] - introspective methods
37
37
  * [search][search] - search by provided parameters
@@ -51,9 +51,10 @@ Returns an array of types (resources) available via API.
51
51
  require "idigbio_client"
52
52
 
53
53
  IdigbioClient.types
54
+ # returns ["records", "mediarecords", "recordsets", "publishers"]
54
55
  ```
55
56
 
56
- #### Method `IdigbioClient.fields(type)
57
+ #### Method `IdigbioClient.fields(type)`
57
58
 
58
59
  Returns a hash with description of fields associated with a resource. Takes one
59
60
  optional parameter `type`. If type is not given it returns fields to all types
@@ -86,18 +87,22 @@ Takes a hash of opts, returns a hash with results of a search.
86
87
 
87
88
  ##### params
88
89
 
89
- | param.keys | Description |
90
- |------------|----------------------------------------------------|
91
- | :rq | search query hash, default `{}` |
92
- | :limit | how many records to return in total, default `100` |
93
- | :offset | from which record to start, default `0` |
90
+ | params.keys | Description |
91
+ |-------------|------------------------------------------------------|
92
+ | :rq | search query hash; *default* `{}` |
93
+ | :limit | how many records to return in total; *default* `100` |
94
+ | :offset | from which record to start; *default* `0` |
94
95
 
95
96
  ```ruby
96
97
  require "idigbio_client"
97
98
 
98
99
  # specimen records search
99
100
  params = { rq: { genus: "acer" }, limit: 15 }
100
- IdigbioClient.search(type: :records, params: params)
101
+ IdigbioClient.search(params: params)
102
+
103
+ # setting offset: will return only 5 records, assuming 10 were done before
104
+ params = { rq: { genus: "acer" }, limit: 15, offset: 10 }
105
+ IdigbioClient.search(params: params)
101
106
 
102
107
  # using non-default type
103
108
  IdigbioClient.search(type: :mediarecords, params: params)
@@ -128,7 +133,7 @@ Returns the number of records of a specified type
128
133
  | opts.keys | Type | Description |
129
134
  |------------|------------------|----------------------------------------|
130
135
  | :type | String or Symbol | resource type; *default* `:records` |
131
- | :params | search options hash; *default* `{}` |
136
+ | :params | Hash | search options hash; *default* `{}` |
132
137
 
133
138
  ```ruby
134
139
  require "idigbio_client"
@@ -4,6 +4,8 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require "idigbio_client/version"
5
5
 
6
6
  Gem::Specification.new do |gem|
7
+ gem.license = "MIT"
8
+ gem.required_ruby_version = ">= 1.9.0"
7
9
  gem.name = "idigbio_client"
8
10
  gem.version = IdigbioClient::VERSION
9
11
  gem.authors = ["Greg T.", "Dmitry Mozzherin"]
@@ -1,6 +1,6 @@
1
1
  # Ruby wrapper for iDigBio API
2
2
  module IdigbioClient
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
 
5
5
  def self.version
6
6
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idigbio_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg T.
@@ -135,7 +135,8 @@ files:
135
135
  - lib/idigbio_client/search.rb
136
136
  - lib/idigbio_client/version.rb
137
137
  homepage: https://github.com/GlobalNamesArchitecture/idigbio-ruby-client
138
- licenses: []
138
+ licenses:
139
+ - MIT
139
140
  metadata: {}
140
141
  post_install_message:
141
142
  rdoc_options: []
@@ -145,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
146
  requirements:
146
147
  - - ">="
147
148
  - !ruby/object:Gem::Version
148
- version: '0'
149
+ version: 1.9.0
149
150
  required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  requirements:
151
152
  - - ">="