frederick_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/README.md +15 -1
- data/lib/frederick_api.rb +7 -0
- data/lib/frederick_api/v2/contact.rb +10 -0
- data/lib/frederick_api/v2/contact_list.rb +10 -0
- data/lib/frederick_api/v2/contact_property.rb +10 -0
- data/lib/frederick_api/v2/contact_type.rb +10 -0
- data/lib/frederick_api/v2/interaction.rb +10 -0
- data/lib/frederick_api/v2/location.rb +1 -0
- data/lib/frederick_api/v2/user.rb +1 -0
- data/lib/frederick_api/version.rb +1 -1
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 639b7019e1919ed4998f737434166f9b401484fd
|
4
|
+
data.tar.gz: c793239bf2e75019ca1efe3b53fe2234bbc98fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e5bcddde1d02e42f58059e5f194fcd446eb0dad19fe8d111c6098025e8f77e95710c4654d40c279a46c62ca51ffde363cda35cfcc030b35bffaff1a6378404a
|
7
|
+
data.tar.gz: bd211000835b4b27f72d07841ef83899ae8c79d119ff8dbd402e18dcd3ec40ea8b83c46d3a446e3ccecc5a7a790cf9f0c8b0850a88f98ebe532a8695ab3762ca
|
data/README.md
CHANGED
@@ -67,7 +67,7 @@ location_id = '6fdf0530-3e4e-46f1-9d11-5f90c48a50dc'
|
|
67
67
|
access_token = '9jsdo320fjfkfdksls30dfdcd919bcaa1b7804dbbebda0'
|
68
68
|
FrederickAPI::V2::Location.with_access_token(access_token) do
|
69
69
|
# Fetch a location
|
70
|
-
location = FrederickAPI::V2::Location.find(location_id)
|
70
|
+
location = FrederickAPI::V2::Location.find(location_id).first
|
71
71
|
# => #<FrederickAPI::V2::Location:0x007fd2f29a7618>
|
72
72
|
|
73
73
|
location.name
|
@@ -84,3 +84,17 @@ FrederickAPI::V2::Location.with_access_token(access_token) do
|
|
84
84
|
# => true
|
85
85
|
end
|
86
86
|
```
|
87
|
+
|
88
|
+
### Nested Resources
|
89
|
+
|
90
|
+
Nested resources must be accessed using `where` to scope the request:
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
location_id = '6fdf0530-3e4e-46f1-9d11-5f90c48a50dc'
|
94
|
+
access_token = '9jsdo320fjfkfdksls30dfdcd919bcaa1b7804dbbebda0'
|
95
|
+
FrederickAPI::V2::Location.with_access_token(access_token) do
|
96
|
+
# Find contacts
|
97
|
+
contacts = FrederickAPI::V2::Contact.where(location_id: location_id).page(1).per(100).to_a
|
98
|
+
# => [...]
|
99
|
+
end
|
100
|
+
```
|
data/lib/frederick_api.rb
CHANGED
@@ -11,6 +11,13 @@ require 'frederick_api/v2/resource'
|
|
11
11
|
require 'frederick_api/v2/user'
|
12
12
|
require 'frederick_api/v2/location'
|
13
13
|
|
14
|
+
# Froldoex resources
|
15
|
+
require 'frederick_api/v2/contact'
|
16
|
+
require 'frederick_api/v2/contact_property'
|
17
|
+
require 'frederick_api/v2/contact_list'
|
18
|
+
require 'frederick_api/v2/contact_type'
|
19
|
+
require 'frederick_api/v2/interaction'
|
20
|
+
|
14
21
|
# Namespace for all Frederick API client methods/classes
|
15
22
|
module FrederickAPI
|
16
23
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frederick_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederick Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_api_client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.5.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.5.1
|
27
27
|
description: Ruby client for the Frederick API
|
@@ -35,6 +35,11 @@ files:
|
|
35
35
|
- README.md
|
36
36
|
- lib/frederick_api.rb
|
37
37
|
- lib/frederick_api/configuration.rb
|
38
|
+
- lib/frederick_api/v2/contact.rb
|
39
|
+
- lib/frederick_api/v2/contact_list.rb
|
40
|
+
- lib/frederick_api/v2/contact_property.rb
|
41
|
+
- lib/frederick_api/v2/contact_type.rb
|
42
|
+
- lib/frederick_api/v2/interaction.rb
|
38
43
|
- lib/frederick_api/v2/location.rb
|
39
44
|
- lib/frederick_api/v2/query_builder.rb
|
40
45
|
- lib/frederick_api/v2/resource.rb
|