incognia_api 0.5.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +4 -12
- data/lib/incognia_api/api.rb +1 -10
- data/lib/incognia_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c92b64976c39bcd601a9a7aa6901c28a3ea41e773389e23274985372b261d45
|
4
|
+
data.tar.gz: 21c4bd2fc41170a8ab1d1962a2dc7be6c5fcbb7a52257743a2033af79662f16c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35919782b5b8f3182fb9130cf4c7c89c2f0f2b998c884ec173f8bbc41edded16885c3ce5a76fe0673a4eb675ba3ad1909ec087479bad85db7e25280cdedccca4
|
7
|
+
data.tar.gz: b23238db561ec59ce3992944c5311f3b712362d7294b02510e85eb15eb6f8514443a9bdab96039ceead59e58052d3cd0de72912ef78d0681674d7d6108d429c1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [1.0.0] - 2024-07-05
|
4
|
+
|
5
|
+
- Remove #get_signup_assessment, because the endpoint was discontinued
|
6
|
+
|
7
|
+
## [0.5.5] - 2024-04-01
|
8
|
+
|
9
|
+
- Fix datetime parcer to RFC3339 format
|
10
|
+
|
3
11
|
## [0.5.4] - 2024-03-19
|
4
12
|
|
5
13
|
- Allow registering feedback with expires_at parameter
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -80,17 +80,6 @@ assessment = api.register_signup(
|
|
80
80
|
# => #<OpenStruct id="...", device_id="...", risk_assessment="..", evidence=...>
|
81
81
|
```
|
82
82
|
|
83
|
-
### Getting a Signup
|
84
|
-
|
85
|
-
This method allows you to query the latest assessment for a given signup event, returning signup assessment, containing the risk assessment and supporting evidence:
|
86
|
-
|
87
|
-
```ruby
|
88
|
-
assessment = api.get_signup_assessment(signup_id: "95a9fc56-f65e-436b-a87f-a1338043678f")
|
89
|
-
|
90
|
-
# => #<OpenStruct id="...", request_id="...", device_id="...", risk_assessment="..", evidence=...>
|
91
|
-
|
92
|
-
```
|
93
|
-
|
94
83
|
### Registering a Login
|
95
84
|
|
96
85
|
This method registers a new login for the given installation and account, returning a login assessment, containing the risk assessment and supporting evidence:
|
@@ -255,8 +244,11 @@ If you have found a bug or if you have a feature request, please report them at
|
|
255
244
|
### Development
|
256
245
|
|
257
246
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
247
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
248
|
+
|
249
|
+
To release a new version, update the version number in `version.rb`, run `bundle` to update the `gemfile.lock`, add one description on `CHANGELOG.md` if necessary, and then after merging on master, run `bundle exec rake release`.
|
258
250
|
|
259
|
-
|
251
|
+
The `rake release` task will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
260
252
|
|
261
253
|
## License
|
262
254
|
|
data/lib/incognia_api/api.rb
CHANGED
@@ -29,15 +29,6 @@ module Incognia
|
|
29
29
|
SignupAssessment.from_hash(response.body) if response.success?
|
30
30
|
end
|
31
31
|
|
32
|
-
def get_signup_assessment(signup_id:)
|
33
|
-
response = connection.request(
|
34
|
-
:get,
|
35
|
-
"v2/onboarding/signups/#{signup_id}"
|
36
|
-
)
|
37
|
-
|
38
|
-
SignupAssessment.from_hash(response.body) if response.success?
|
39
|
-
end
|
40
|
-
|
41
32
|
def register_login(installation_id:, account_id:, **opts)
|
42
33
|
params = {
|
43
34
|
type: :login,
|
@@ -57,7 +48,7 @@ module Incognia
|
|
57
48
|
|
58
49
|
def register_feedback(event:, timestamp: nil, expires_at: nil, **ids)
|
59
50
|
timestamp = timestamp.strftime('%s%L') if timestamp.respond_to? :strftime
|
60
|
-
expires_at = expires_at.
|
51
|
+
expires_at = expires_at.to_datetime.rfc3339 if expires_at.respond_to? :to_datetime
|
61
52
|
|
62
53
|
params = { event: event, timestamp: timestamp&.to_i, expires_at: expires_at }.compact
|
63
54
|
params.merge!(ids)
|
data/lib/incognia_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incognia_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Cavalcanti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.4.19
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Official Ruby lib for communicating with Incognia API
|