petfinder 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +16 -1
- data/Rakefile +8 -0
- data/lib/petfinder/pet.rb +4 -0
- data/lib/petfinder/shelter.rb +4 -0
- data/lib/petfinder/version.rb +1 -1
- data/spec/pet_spec.rb +3 -0
- data/spec/shelter_spec.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5928d4748c4cdaad2d5b4bbe79d5aa687854a9ea
|
4
|
+
data.tar.gz: ccfee75e913be832d68e2dd13ad0b8e4f5afeac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bfc6c8849b64235a3ccefb6403c105bcae2098ea0ea9941b163d858db85d00babc49c7b13bb22e72118b0d0638fb771b820d0193c0404551ff1877c23e39a9a
|
7
|
+
data.tar.gz: 70246ee98b0e6615018cbac4d24644c7435534435c6c9e672dee6599f1c8075d36eb943f1147aeba2185f80ad41a628003f5fd894f06fdbc0902364d3324942d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -59,6 +59,21 @@ pets.first.shelterid
|
|
59
59
|
# => "CA123"
|
60
60
|
```
|
61
61
|
|
62
|
+
#### Returning paged results
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
petfinder.find_pets('dog', 77057, count: 25)
|
66
|
+
|
67
|
+
# page 2
|
68
|
+
petfinder.find_pets('dog', 77057, count: 25, offset: 25)
|
69
|
+
|
70
|
+
# page 3
|
71
|
+
petfinder.find_pets('dog', 77057, count: 25, offset: 50)
|
72
|
+
|
73
|
+
# page 4
|
74
|
+
petfinder.find_pets('dog', 77057, count: 25, offset: 75)
|
75
|
+
```
|
76
|
+
|
62
77
|
#### Return information about the shelter with id "CA123"
|
63
78
|
|
64
79
|
```ruby
|
@@ -82,7 +97,7 @@ pets = petfinder.find_pets(animal_type, location, options)
|
|
82
97
|
|
83
98
|
# Options available: status, offset, count
|
84
99
|
pets = shelter_pets(shelter_id, options)
|
85
|
-
|
100
|
+
|
86
101
|
# Options available: name, offset, count
|
87
102
|
shelters = petfinder.find_shelters(location, options)
|
88
103
|
shelters = petfinder.find_shelters_by_breed(animal_type, breed)
|
data/Rakefile
CHANGED
data/lib/petfinder/pet.rb
CHANGED
data/lib/petfinder/shelter.rb
CHANGED
data/lib/petfinder/version.rb
CHANGED
data/spec/pet_spec.rb
CHANGED
data/spec/shelter_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petfinder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hutzelman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.4.8
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Ruby gem wrapper for the Petfinder API.
|