fathom_api 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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -8
- data/lib/fathom/objects/list.rb +2 -2
- data/lib/fathom/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2135fbb0e65011d59344ea4ade4ffc075b2b15611965011d5e5c2c8e08e7d111
|
4
|
+
data.tar.gz: 22eef7800e0b45c7f38514bdd11ea11e9f73fc3cdf2b8e683cf60fa4b54384e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae5a4867c8039e5d636d98908d6e53238ec32c8ebc3d7729f59fde6fa83a7d4a7e2e2c860027ea8f56bad26f2ed848347ed65c1e757158831543d7f09c121ce
|
7
|
+
data.tar.gz: c3519d4925bc3764670d96297008615c5cd7cef8b1b3a80617290917a418dc39e03aa3c06a7e9abf9f495223ec9dbf23355e2057f52baa6b040051805171a909
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
### Hello there! This gem is a placeholder and will be updated and working soon. Please do not install it yet.
|
2
|
-
|
3
1
|
# Fathom API
|
4
2
|
|
5
3
|
### 🛠 An easy to use client with the Fathom API
|
@@ -49,21 +47,24 @@ response.email
|
|
49
47
|
# => "you@starfleet.org"
|
50
48
|
```
|
51
49
|
|
52
|
-
###
|
50
|
+
### Pagination
|
53
51
|
|
54
52
|
When an API's response comes back with a object of "list", we automatically wrap that to attempt to provide some helper methods to ease your implementations.
|
55
53
|
|
56
54
|
```ruby
|
57
|
-
list = client.sites.list
|
55
|
+
list = client.sites.list(limit: 1)
|
58
56
|
# => Fathom::List
|
59
57
|
|
60
|
-
#
|
61
|
-
list.
|
62
|
-
|
63
|
-
list.prev_page
|
58
|
+
# We provide two helper methods to allow you to get the first or last id from the data response
|
59
|
+
list.first_id
|
60
|
+
list.last_id
|
64
61
|
|
65
62
|
# check if the list has more after it with
|
66
63
|
list.has_more?
|
64
|
+
# => true
|
65
|
+
|
66
|
+
# use the next page cursor in your next response
|
67
|
+
list2 = client.sites.list(limit: 1, starting_after: list.last_id)
|
67
68
|
```
|
68
69
|
|
69
70
|
### Sites
|
data/lib/fathom/objects/list.rb
CHANGED
data/lib/fathom/version.rb
CHANGED