widgit_accounts_sdk 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/widgit_accounts_sdk/client.rb +11 -2
- data/lib/widgit_accounts_sdk/configuration.rb +2 -0
- 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: b364cf8e9313f1f8bdaa1dc6151d88596330c051dfe4f0469d55060d95115fc9
|
4
|
+
data.tar.gz: a623561a5792d926aa9ed4b8c562e30f766cad36a548bec2d8b7c19bde59186c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b808013be4175d5000064892d07106c0869158b1acdc271706a4f15b32e883cd09f8e39ad406e2bd1d328329b6021a8ac1d2e4de6c24a171b94c8dd695f381a
|
7
|
+
data.tar.gz: 9eeae767b91a3ffeeb37afeb3a3962d097e2200cd73829ffee14983e9b8f6ff8bf9c158b05b05aaa9c56f4cd68a064fc9b484c6062adb0e20d273b8197ef642d
|
@@ -29,8 +29,11 @@ module WidgitAccountsSdk
|
|
29
29
|
return success.merge('exists' => response['exists'])
|
30
30
|
end
|
31
31
|
|
32
|
-
def invite(email, first_name, last_name)
|
33
|
-
|
32
|
+
def invite(email, first_name = nil, last_name = nil)
|
33
|
+
request_url = "/api/v1/accounts/invite?email=#{email}"
|
34
|
+
request_url += "&first_name=#{first_name}" if first_name
|
35
|
+
request_url += "&last_name=#{last_name}" if last_name
|
36
|
+
response = request(request_url, :post)
|
34
37
|
return failed(response['error']) if response['status'] == 'failure'
|
35
38
|
return response
|
36
39
|
end
|
@@ -53,6 +56,12 @@ module WidgitAccountsSdk
|
|
53
56
|
return response
|
54
57
|
end
|
55
58
|
|
59
|
+
def watch(uid, watcher_url = nil)
|
60
|
+
response = request("/api/v1/accounts/#{uid}/watch?address=#{watcher_url || WidgitAccountsSdk.configuration.watch_webhook_url}")
|
61
|
+
return failed(response['error']) if response['status'] == 'failure'
|
62
|
+
return response
|
63
|
+
end
|
64
|
+
|
56
65
|
private
|
57
66
|
def request(path, method = :get, params = {})
|
58
67
|
uri = URI.parse("#{WidgitAccountsSdk.configuration.host}#{path}")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: widgit_accounts_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stu Wright
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-06-
|
12
|
+
date: 2023-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Ruby client for interacting with the Widgit Accounts API
|
15
15
|
email: james.sherriff@widgit.com
|