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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2693afc6e01dbd3701555cbb51711ea7c0feebd2
4
- data.tar.gz: 869ad50b056891ca6ec29e2efae55f7b65ef0605
3
+ metadata.gz: 45acbdd737833523a7aa35983d317cf1f937ec72
4
+ data.tar.gz: a5bbb8a67a09ee8a38e410862f26945d5452e465
5
5
  SHA512:
6
- metadata.gz: 89eeb6aa8e32af5e7caa3275b914381704644a89d5bb674db1090c6b2093b11c6a651f2ee083a4ecc875e195bc0f3ed9361fd09435961b4fa5344fe1508e9d4a
7
- data.tar.gz: 655aec7b9b3f79e7f9c251a5789332dc2a140866f3b4a10f42d27e7a4f8af513f3a67bc2861a84caa9778c0da733563662da6607afc4feb85c803a0a6a6bd2ec
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CrystalSDK
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
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.1
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.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!