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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e878b2177d4d025330d342af91ac8d6f6840bcb84316cad87a95c13546edc34
4
- data.tar.gz: f1719d96fcbf0b6db4bac620ad4fa155660a32f001f5da6c38e0eb1799bab181
3
+ metadata.gz: 7e05fdfaec80f4ad60b46ff4c58286201ef5437425a133744f2ad0bb0c91765d
4
+ data.tar.gz: 0c9535870a0d3e8eb20421ea6c0642c5610a89fe124300da6bc27fd42792e542
5
5
  SHA512:
6
- metadata.gz: ce73ba8985b3048d6746f556470ed0a304e7985bc180d273af4c9d733bf65fbb25f781462b2b4d594845976f5dde462f618695604a80850a8f1dd22735c9ae5c
7
- data.tar.gz: caf4742a06e09f579d8aa57118b35f52d39f6c537971a9435e5737dfe995806b0718ad67cf73dd40c6184fd087f687b97d8fbf0f201559a50cb4d91eb6a3209c
6
+ metadata.gz: be157bcdd3b4a69afb5ded140b527e7d646d7ccceff030bf90c3ff08a0b282a94d6e7bf4edb60ed180bde6ffd8a46fb78112feefb26778f1cd60da47ede549d6
7
+ data.tar.gz: 432d3d0b77e51c65de2c56e63c129b0482e9405b72ce08e8ab92719ec73e6cf26daa7430c845aac68077bab747bff06406a9e9d42a50ba92e40eb1efda8f8347
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -7,8 +7,6 @@ require_relative './session'
7
7
  module Blockmason
8
8
  module Link
9
9
  class Connection
10
- attr_accessor :base_url, :http
11
-
12
10
  def initialize(base_url:, http:)
13
11
  @base_url = base_url
14
12
  @http = http
@@ -3,8 +3,6 @@ require_relative './session'
3
3
  module Blockmason
4
4
  module Link
5
5
  class ManagedSession
6
- attr_accessor :session
7
-
8
6
  def initialize(session:)
9
7
  @session = session
10
8
  end
@@ -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
- attr_accessor :base_url, :client_id, :client_secret, :connection, :provider, :session
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
- protected
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
-
@@ -5,8 +5,6 @@ require 'uri'
5
5
  module Blockmason
6
6
  module Link
7
7
  class Session
8
- attr_accessor :access_token, :base_url, :http, :refresh_token
9
-
10
8
  def initialize(access_token:, base_url:, http:, refresh_token:)
11
9
  @access_token = access_token
12
10
  @base_url = base_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockmason-link
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devin Canterberry
metadata.gz.sig CHANGED
Binary file