crystal_sdk 1.2.1 → 1.2.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
- data/README.md +11 -0
- data/lib/crystal_sdk.rb +3 -3
- data/lib/crystal_sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45acbdd737833523a7aa35983d317cf1f937ec72
|
4
|
+
data.tar.gz: a5bbb8a67a09ee8a38e410862f26945d5452e465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97de64cbc786de371329ee64d4c74d546f162c2fe4d44da4f9bbb0ebe699375cdaf1ad59b7b35ac39f1a4b586fd22095342b4614eaad4c0054fa4b7365308c56
|
7
|
+
data.tar.gz: baf7d035681a8c3f600a7547f6d0cb49c9fba6469923b46d3c1443219a582f140246802b58a2b3e32c195dbac293115d6879743c09b4d343aecc79ba0d5609ce
|
data/README.md
CHANGED
@@ -35,6 +35,7 @@ Here's how you use it:
|
|
35
35
|
|
36
36
|
## Synchronous Flow (Recommended)
|
37
37
|
|
38
|
+
### Profile
|
38
39
|
```ruby
|
39
40
|
require 'crystal_sdk'
|
40
41
|
|
@@ -89,6 +90,16 @@ rescue StandardError => e
|
|
89
90
|
|
90
91
|
end
|
91
92
|
```
|
93
|
+
### Email Samples
|
94
|
+
```ruby
|
95
|
+
request_id = '4969f4c3-6d5e-42e1-bf73-342fe8c8a3f1'
|
96
|
+
email_samples = CrystalSDK::EmailSample.all(request_id)
|
97
|
+
email_samples.each do |sample|
|
98
|
+
print "label: #{sample[:label]}"
|
99
|
+
print "description: #{sample[:description]}"
|
100
|
+
print "text: #{sample[:text]}"
|
101
|
+
end
|
102
|
+
```
|
92
103
|
|
93
104
|
## Asynchronous Flow (For bulk analysis)
|
94
105
|
|
data/lib/crystal_sdk.rb
CHANGED
@@ -7,9 +7,6 @@ module CrystalSDK
|
|
7
7
|
autoload :Profile, 'crystal_sdk/profile'
|
8
8
|
autoload :EmailSample, 'crystal_sdk/email_sample'
|
9
9
|
|
10
|
-
crystal_env_key = ENV['CRYSTAL_KEY']
|
11
|
-
CrystalSDK.key = crystal_env_key if crystal_env_key
|
12
|
-
|
13
10
|
class << self
|
14
11
|
def key
|
15
12
|
Base.key
|
@@ -27,4 +24,7 @@ module CrystalSDK
|
|
27
24
|
Base.key = value
|
28
25
|
end
|
29
26
|
end
|
27
|
+
|
28
|
+
crystal_env_key = ENV['CRYSTAL_KEY']
|
29
|
+
CrystalSDK.key = crystal_env_key if crystal_env_key
|
30
30
|
end
|
data/lib/crystal_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystal_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cory Finger
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.6.
|
123
|
+
rubygems_version: 2.6.14
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Access the largest and most accurate personality database!
|