blockmason-link 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/blockmason/link/connection.rb +0 -2
- data/lib/blockmason/link/managed_session.rb +0 -2
- data/lib/blockmason/link/project.rb +16 -4
- data/lib/blockmason/link/session.rb +0 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e05fdfaec80f4ad60b46ff4c58286201ef5437425a133744f2ad0bb0c91765d
|
|
4
|
+
data.tar.gz: 0c9535870a0d3e8eb20421ea6c0642c5610a89fe124300da6bc27fd42792e542
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be157bcdd3b4a69afb5ded140b527e7d646d7ccceff030bf90c3ff08a0b282a94d6e7bf4edb60ed180bde6ffd8a46fb78112feefb26778f1cd60da47ede549d6
|
|
7
|
+
data.tar.gz: 432d3d0b77e51c65de2c56e63c129b0482e9405b72ce08e8ab92719ec73e6cf26daa7430c845aac68077bab747bff06406a9e9d42a50ba92e40eb1efda8f8347
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
|
@@ -2,24 +2,37 @@ require_relative './provider'
|
|
|
2
2
|
|
|
3
3
|
module Blockmason
|
|
4
4
|
module Link
|
|
5
|
+
##
|
|
6
|
+
# The entry-point for most apps to integrate with a \Blockmason \Link project.
|
|
5
7
|
class Project
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
##
|
|
9
|
+
# Initialize a \Project with your \Link project's +client_id+ and +client_secret+.
|
|
10
|
+
# Optionally, you can provide an alternative +base_url+ here. For example,
|
|
11
|
+
# if mocking server responses for an integration test suite, or if using
|
|
12
|
+
# a Link-compatible API provider.
|
|
8
13
|
def initialize(base_url: ::Blockmason::Link::Provider.default_url, client_id:, client_secret:)
|
|
9
14
|
@base_url = base_url
|
|
10
15
|
@client_id = client_id
|
|
11
16
|
@client_secret = client_secret
|
|
12
17
|
end
|
|
13
18
|
|
|
19
|
+
##
|
|
20
|
+
# Performs a GET request against a \Link project's API at the given +path+
|
|
21
|
+
# and with the given optional +inputs+. Returns the outputs returned for
|
|
22
|
+
# the API call.
|
|
14
23
|
def get(path, inputs = {})
|
|
15
24
|
session.get(path, inputs)
|
|
16
25
|
end
|
|
17
26
|
|
|
27
|
+
##
|
|
28
|
+
# Performs a POST request against a \Link project's API at the given +path+
|
|
29
|
+
# and with the given optional +inputs+. Returns the outputs returned for
|
|
30
|
+
# the API call.
|
|
18
31
|
def post(path, inputs = {})
|
|
19
32
|
session.post(path, inputs)
|
|
20
33
|
end
|
|
21
34
|
|
|
22
|
-
|
|
35
|
+
private
|
|
23
36
|
def connection
|
|
24
37
|
@connection ||= connection!
|
|
25
38
|
end
|
|
@@ -49,4 +62,3 @@ module Blockmason
|
|
|
49
62
|
end
|
|
50
63
|
end
|
|
51
64
|
end
|
|
52
|
-
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|