seamapi 0.0.4 → 0.1.0
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
- data/Gemfile.lock +1 -1
- data/lib/seam/client.rb +4 -2
- data/lib/seam/clients/connected_accounts.rb +18 -2
- data/lib/seam/resources/connect_webview.rb +3 -3
- data/lib/seam/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b75624031efa404f2e8e77741924bd65f2ab53c1f863c5ce284af9c256fc7037
|
4
|
+
data.tar.gz: 1a305eb6484a18a3dcd2a97a2fa9750d7ebb6617ddcc27995141b72c105390bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24a3e47f02c7b3b919858c685b3699c52bf729d699fec20f0f007f50d9b5d8da60aaafaea5ee7d1d85dc5fffee5f0efb56b572e0c23fb386608255f0dda7756e
|
7
|
+
data.tar.gz: 1cb2af2c236959d902695a830f78b8db65725a30545a3f544062a1a2c6b01b1748a9f0bfdaaf55325d2a2c853fd69f71efdc9cc38c8b095d1e9584157de2a4e6
|
data/Gemfile.lock
CHANGED
data/lib/seam/client.rb
CHANGED
@@ -4,10 +4,12 @@ module Seam
|
|
4
4
|
class Client
|
5
5
|
attr_accessor :api_key, :base_uri, :debug
|
6
6
|
|
7
|
-
def initialize(api_key
|
8
|
-
@api_key = api_key
|
7
|
+
def initialize(api_key: nil, base_uri: "https://connect.getseam.com", debug: false)
|
8
|
+
@api_key = api_key || ENV.fetch("SEAM_API_KEY", nil)
|
9
9
|
@base_uri = base_uri
|
10
10
|
@debug = debug
|
11
|
+
|
12
|
+
raise ArgumentError, "SEAM_API_KEY not found in environment, and api_key not provided" unless @api_key
|
11
13
|
end
|
12
14
|
|
13
15
|
def health
|
@@ -3,13 +3,29 @@
|
|
3
3
|
module Seam
|
4
4
|
module Clients
|
5
5
|
class ConnectedAccounts < BaseClient
|
6
|
-
def get(
|
6
|
+
def get(connected_account_id_or_params)
|
7
|
+
params = if connected_account_id_or_params.is_a?(String)
|
8
|
+
{ connected_account_id: connected_account_id_or_params }
|
9
|
+
else
|
10
|
+
connected_account_id_or_params
|
11
|
+
end
|
12
|
+
|
7
13
|
request_seam_object(
|
8
14
|
:get,
|
9
15
|
"/connected_accounts/get",
|
10
16
|
Seam::ConnectedAccount,
|
11
17
|
"connected_account",
|
12
|
-
params:
|
18
|
+
params: params
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
def list(params = {})
|
23
|
+
request_seam_object(
|
24
|
+
:get,
|
25
|
+
"/connected_accounts/list",
|
26
|
+
Seam::ConnectedAccount,
|
27
|
+
"connected_accounts",
|
28
|
+
params: params
|
13
29
|
)
|
14
30
|
end
|
15
31
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
module Seam
|
4
4
|
class ConnectWebview < BaseResource
|
5
|
-
attr_accessor :connect_webview_id, :custom_redirect_url, :
|
6
|
-
:
|
7
|
-
:login_successful, :status
|
5
|
+
attr_accessor :connect_webview_id, :custom_redirect_url, :custom_redirect_failure_url, :url,
|
6
|
+
:workspace_id, :device_selection_mode, :accepted_providers, :accepted_devices,
|
7
|
+
:any_provider_allowed, :any_device_allowed, :login_successful, :status
|
8
8
|
|
9
9
|
date_accessor :created_at
|
10
10
|
end
|
data/lib/seam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seamapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abimael Martell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|