esp_sdk 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +11 -1
- data/README.md +287 -28
- data/bin/esp +15 -0
- data/esp_sdk.gemspec +2 -0
- data/lib/esp/aws_clients.rb +60 -0
- data/lib/esp/commands/add_external_account.rb +57 -0
- data/lib/esp/commands/commands_tasks.rb +106 -0
- data/lib/esp/commands/console.rb +68 -0
- data/lib/esp/extensions/active_resource/formats/json_api_format.rb +12 -4
- data/lib/esp/extensions/active_resource/paginated_collection.rb +5 -5
- data/lib/esp/extensions/active_resource/validations.rb +1 -1
- data/lib/esp/external_account_creator.rb +77 -0
- data/lib/esp/resources/alert.rb +30 -34
- data/lib/esp/resources/cloud_trail_event.rb +5 -0
- data/lib/esp/resources/contact_request.rb +6 -5
- data/lib/esp/resources/custom_signature.rb +32 -56
- data/lib/esp/resources/dashboard.rb +8 -1
- data/lib/esp/resources/external_account.rb +27 -19
- data/lib/esp/resources/organization.rb +27 -3
- data/lib/esp/resources/region.rb +15 -3
- data/lib/esp/resources/report.rb +28 -24
- data/lib/esp/resources/resource.rb +26 -10
- data/lib/esp/resources/service.rb +5 -0
- data/lib/esp/resources/signature.rb +28 -12
- data/lib/esp/resources/stat.rb +21 -2
- data/lib/esp/resources/stat_custom_signature.rb +30 -4
- data/lib/esp/resources/stat_region.rb +29 -3
- data/lib/esp/resources/stat_service.rb +29 -3
- data/lib/esp/resources/stat_signature.rb +29 -3
- data/lib/esp/resources/sub_organization.rb +27 -3
- data/lib/esp/resources/suppression/region.rb +14 -32
- data/lib/esp/resources/suppression/signature.rb +14 -40
- data/lib/esp/resources/suppression/unique_identifier.rb +8 -6
- data/lib/esp/resources/suppression.rb +43 -5
- data/lib/esp/resources/tag.rb +5 -0
- data/lib/esp/resources/team.rb +33 -9
- data/lib/esp/resources/user.rb +29 -3
- data/lib/esp/version.rb +1 -1
- data/lib/esp.rb +25 -5
- data/test/esp/aws_clients_test.rb +101 -0
- data/test/esp/extensions/active_resource/formats/json_api_format_test.rb +26 -12
- data/test/esp/extensions/active_resource/paginated_collection_test.rb +93 -72
- data/test/esp/extensions/active_resource/validations_test.rb +2 -12
- data/test/esp/external_account_creator_test.rb +153 -0
- data/test/esp/resources/alert_test.rb +71 -33
- data/test/esp/resources/cloud_trail_event_test.rb +9 -1
- data/test/esp/resources/contact_request_test.rb +8 -0
- data/test/esp/resources/custom_signature_test.rb +8 -0
- data/test/esp/resources/dashboard_test.rb +8 -0
- data/test/esp/resources/external_account_test.rb +8 -0
- data/test/esp/resources/metadata_test.rb +1 -1
- data/test/esp/resources/organization_test.rb +8 -0
- data/test/esp/resources/region_test.rb +12 -4
- data/test/esp/resources/report_test.rb +13 -4
- data/test/esp/resources/resource_test.rb +208 -64
- data/test/esp/resources/service_test.rb +8 -0
- data/test/esp/resources/signature_test.rb +15 -9
- data/test/esp/resources/stat_custom_signature_test.rb +9 -1
- data/test/esp/resources/stat_region_test.rb +23 -1
- data/test/esp/resources/stat_service_test.rb +23 -1
- data/test/esp/resources/stat_signature_test.rb +23 -1
- data/test/esp/resources/stat_test.rb +52 -8
- data/test/esp/resources/sub_organization_test.rb +8 -0
- data/test/esp/resources/suppression/region_test.rb +10 -2
- data/test/esp/resources/suppression/signature_test.rb +10 -2
- data/test/esp/resources/suppression/unique_identifier_test.rb +10 -2
- data/test/esp/resources/suppression_test.rb +74 -14
- data/test/esp/resources/tag_test.rb +9 -1
- data/test/esp/resources/team_test.rb +8 -0
- data/test/esp/resources/user_test.rb +49 -19
- data/test/esp_test.rb +19 -1
- data/test/factories/alerts.rb +70 -0
- data/test/factories/organizations.rb +2 -2
- data/test/factories/regions.rb +1 -1
- data/test/factories/sub_organizations.rb +1 -1
- data/test/factories/suppressions.rb +109 -3
- data/test/factories/users.rb +65 -2
- data/test/test_helper.rb +9 -8
- metadata +41 -69
- data/bin/esp_console +0 -67
- data/rdoc/ActiveResource/Formats.html +0 -178
- data/rdoc/ActiveResource/PaginatedCollection.html +0 -912
- data/rdoc/ActiveResource.html +0 -182
- data/rdoc/ESP/Alert.html +0 -808
- data/rdoc/ESP/CloudTrailEvent.html +0 -377
- data/rdoc/ESP/ContactRequest.html +0 -368
- data/rdoc/ESP/CustomSignature.html +0 -748
- data/rdoc/ESP/Dashboard.html +0 -357
- data/rdoc/ESP/ExternalAccount.html +0 -567
- data/rdoc/ESP/Metadata.html +0 -411
- data/rdoc/ESP/Organization.html +0 -592
- data/rdoc/ESP/Region.html +0 -401
- data/rdoc/ESP/Report.html +0 -624
- data/rdoc/ESP/Service.html +0 -382
- data/rdoc/ESP/Signature.html +0 -557
- data/rdoc/ESP/Stat.html +0 -1780
- data/rdoc/ESP/StatCustomSignature.html +0 -1601
- data/rdoc/ESP/StatRegion.html +0 -1600
- data/rdoc/ESP/StatService.html +0 -1600
- data/rdoc/ESP/StatSignature.html +0 -1600
- data/rdoc/ESP/SubOrganization.html +0 -542
- data/rdoc/ESP/Suppression/Region.html +0 -456
- data/rdoc/ESP/Suppression/Signature.html +0 -472
- data/rdoc/ESP/Suppression/UniqueIdentifier.html +0 -419
- data/rdoc/ESP/Suppression.html +0 -651
- data/rdoc/ESP/Tag.html +0 -373
- data/rdoc/ESP/Team.html +0 -586
- data/rdoc/ESP/User.html +0 -485
- data/rdoc/ESP.html +0 -549
- data/rdoc/README_md.html +0 -503
- data/rdoc/created.rid +0 -31
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +0 -136
- data/rdoc/js/darkfish.js +0 -155
- data/rdoc/js/jquery.js +0 -4
- data/rdoc/js/navigation.js +0 -142
- data/rdoc/js/search.js +0 -94
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/searcher.js +0 -228
- data/rdoc/rdoc.css +0 -595
- data/rdoc/table_of_contents.html +0 -942
data/rdoc/README_md.html
DELETED
@@ -1,503 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
-
|
7
|
-
<title>README - ESPSDK</title>
|
8
|
-
|
9
|
-
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
-
|
11
|
-
<script type="text/javascript">
|
12
|
-
var rdoc_rel_prefix = "./";
|
13
|
-
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
-
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
-
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
-
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
-
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
-
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
-
|
22
|
-
|
23
|
-
<body class="file">
|
24
|
-
<nav id="metadata">
|
25
|
-
<nav id="home-section" class="section">
|
26
|
-
<h3 class="section-header">
|
27
|
-
<a href="./index.html">Home</a>
|
28
|
-
<a href="./table_of_contents.html#classes">Classes</a>
|
29
|
-
<a href="./table_of_contents.html#methods">Methods</a>
|
30
|
-
</h3>
|
31
|
-
</nav>
|
32
|
-
|
33
|
-
|
34
|
-
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
-
<form action="#" method="get" accept-charset="utf-8">
|
36
|
-
<h3 class="section-header">
|
37
|
-
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
-
</h3>
|
40
|
-
</form>
|
41
|
-
|
42
|
-
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
-
</nav>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<div id="table-of-contents">
|
48
|
-
<nav class="section">
|
49
|
-
<h3 class="section-header">Table of Contents</h3>
|
50
|
-
<ul>
|
51
|
-
<li><a href="#label-Evident+Security+Platform+SDK">Evident Security Platform SDK</a>
|
52
|
-
<li><a href="#label-Installation">Installation</a>
|
53
|
-
<li><a href="#label-Configuration">Configuration</a>
|
54
|
-
<li><a href="#label-Set+your+HMAC+security+keys%3A">Set your HMAC security keys:</a>
|
55
|
-
<li><a href="#label-Appliance+Users">Appliance Users</a>
|
56
|
-
<li><a href="#label-Usage">Usage</a>
|
57
|
-
<li><a href="#label-Everything+is+an+Object">Everything is an Object</a>
|
58
|
-
<li><a href="#label-Errors">Errors</a>
|
59
|
-
<li><a href="#label-Pagination">Pagination</a>
|
60
|
-
<li><a href="#label-Associated+Objects">Associated Objects</a>
|
61
|
-
<li><a href="#label-Available+Objects">Available Objects</a>
|
62
|
-
<li><a href="#label-Console">Console</a>
|
63
|
-
<li><a href="#label-Contributing">Contributing</a>
|
64
|
-
</ul>
|
65
|
-
</nav>
|
66
|
-
</div>
|
67
|
-
|
68
|
-
|
69
|
-
<div id="project-metadata">
|
70
|
-
<nav id="fileindex-section" class="section project-section">
|
71
|
-
<h3 class="section-header">Pages</h3>
|
72
|
-
|
73
|
-
<ul>
|
74
|
-
|
75
|
-
<li class="file"><a href="./README_md.html">README</a>
|
76
|
-
|
77
|
-
</ul>
|
78
|
-
</nav>
|
79
|
-
|
80
|
-
<nav id="classindex-section" class="section project-section">
|
81
|
-
<h3 class="section-header">Class and Module Index</h3>
|
82
|
-
|
83
|
-
<ul class="link-list">
|
84
|
-
|
85
|
-
<li><a href="./ActiveResource.html">ActiveResource</a>
|
86
|
-
|
87
|
-
<li><a href="./ActiveResource/Formats.html">ActiveResource::Formats</a>
|
88
|
-
|
89
|
-
<li><a href="./ActiveResource/PaginatedCollection.html">ActiveResource::PaginatedCollection</a>
|
90
|
-
|
91
|
-
<li><a href="./ESP.html">ESP</a>
|
92
|
-
|
93
|
-
<li><a href="./ESP/Alert.html">ESP::Alert</a>
|
94
|
-
|
95
|
-
<li><a href="./ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a>
|
96
|
-
|
97
|
-
<li><a href="./ESP/ContactRequest.html">ESP::ContactRequest</a>
|
98
|
-
|
99
|
-
<li><a href="./ESP/CustomSignature.html">ESP::CustomSignature</a>
|
100
|
-
|
101
|
-
<li><a href="./ESP/Dashboard.html">ESP::Dashboard</a>
|
102
|
-
|
103
|
-
<li><a href="./ESP/ExternalAccount.html">ESP::ExternalAccount</a>
|
104
|
-
|
105
|
-
<li><a href="./ESP/Metadata.html">ESP::Metadata</a>
|
106
|
-
|
107
|
-
<li><a href="./ESP/Organization.html">ESP::Organization</a>
|
108
|
-
|
109
|
-
<li><a href="./ESP/Region.html">ESP::Region</a>
|
110
|
-
|
111
|
-
<li><a href="./ESP/Report.html">ESP::Report</a>
|
112
|
-
|
113
|
-
<li><a href="./ESP/Service.html">ESP::Service</a>
|
114
|
-
|
115
|
-
<li><a href="./ESP/Signature.html">ESP::Signature</a>
|
116
|
-
|
117
|
-
<li><a href="./ESP/Stat.html">ESP::Stat</a>
|
118
|
-
|
119
|
-
<li><a href="./ESP/StatCustomSignature.html">ESP::StatCustomSignature</a>
|
120
|
-
|
121
|
-
<li><a href="./ESP/StatRegion.html">ESP::StatRegion</a>
|
122
|
-
|
123
|
-
<li><a href="./ESP/StatService.html">ESP::StatService</a>
|
124
|
-
|
125
|
-
<li><a href="./ESP/StatSignature.html">ESP::StatSignature</a>
|
126
|
-
|
127
|
-
<li><a href="./ESP/SubOrganization.html">ESP::SubOrganization</a>
|
128
|
-
|
129
|
-
<li><a href="./ESP/Suppression.html">ESP::Suppression</a>
|
130
|
-
|
131
|
-
<li><a href="./ESP/Suppression/Region.html">ESP::Suppression::Region</a>
|
132
|
-
|
133
|
-
<li><a href="./ESP/Suppression/Signature.html">ESP::Suppression::Signature</a>
|
134
|
-
|
135
|
-
<li><a href="./ESP/Suppression/UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a>
|
136
|
-
|
137
|
-
<li><a href="./ESP/Tag.html">ESP::Tag</a>
|
138
|
-
|
139
|
-
<li><a href="./ESP/Team.html">ESP::Team</a>
|
140
|
-
|
141
|
-
<li><a href="./ESP/User.html">ESP::User</a>
|
142
|
-
|
143
|
-
</ul>
|
144
|
-
</nav>
|
145
|
-
|
146
|
-
</div>
|
147
|
-
</nav>
|
148
|
-
|
149
|
-
<div id="documentation" class="description">
|
150
|
-
|
151
|
-
<p><a
|
152
|
-
href="https://travis-ci.org/EvidentSecurity/esp_sdk.svg?branch=master">{Build
|
153
|
-
Status</a>]
|
154
|
-
<a
|
155
|
-
href="https://codeclimate.com/repos/546a526f6956800d2900e3fb/badges/841000b5295e533401c3/gpa.svg">{Code
|
156
|
-
Climate</a>]
|
157
|
-
<a
|
158
|
-
href="https://coveralls.io/repos/EvidentSecurity/esp_sdk/badge.svg">{Coverage
|
159
|
-
Status</a>]
|
160
|
-
<a href="https://badge.fury.io/rb/esp_sdk.svg">{Gem
|
161
|
-
Version</a>]</p>
|
162
|
-
|
163
|
-
<h1 id="label-Evident+Security+Platform+SDK">Evident Security Platform SDK<span><a href="#label-Evident+Security+Platform+SDK">¶</a> <a href="#documentation">↑</a></span></h1>
|
164
|
-
|
165
|
-
<p>A Ruby interface for calling the <a
|
166
|
-
href="https://www.evident.io">Evident.io</a> API.</p>
|
167
|
-
|
168
|
-
<p>This Readme is for the V2 version of the <a href="ESP.html">ESP</a> SDK.
|
169
|
-
For V1 information, see the <a
|
170
|
-
href="https://github.com/EvidentSecurity/esp_sdk/wiki">V1 WIKI</a>.</p>
|
171
|
-
|
172
|
-
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#documentation">↑</a></span></h2>
|
173
|
-
|
174
|
-
<p>Add this line to your application's Gemfile:</p>
|
175
|
-
|
176
|
-
<pre>gem 'esp_sdk'</pre>
|
177
|
-
|
178
|
-
<p>And then execute:</p>
|
179
|
-
|
180
|
-
<pre> bundle</pre>
|
181
|
-
|
182
|
-
<p>Or install it yourself as:</p>
|
183
|
-
|
184
|
-
<pre> gem install esp_sdk</pre>
|
185
|
-
|
186
|
-
<h1 id="label-Configuration">Configuration<span><a href="#label-Configuration">¶</a> <a href="#documentation">↑</a></span></h1>
|
187
|
-
|
188
|
-
<h2 id="label-Set+your+HMAC+security+keys%3A">Set your HMAC security keys:<span><a href="#label-Set+your+HMAC+security+keys%3A">¶</a> <a href="#documentation">↑</a></span></h2>
|
189
|
-
|
190
|
-
<p>You must set your access_key_id and your secret_access_key.<br>
|
191
|
-
You can set
|
192
|
-
these directly:</p>
|
193
|
-
|
194
|
-
<pre class="ruby"><span class="ruby-constant">ESP</span>.<span class="ruby-identifier">access_key_id</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">your</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
195
|
-
<span class="ruby-constant">ESP</span>.<span class="ruby-identifier">secret_access_key</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">your</span> <span class="ruby-identifier">secret</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
196
|
-
</pre>
|
197
|
-
|
198
|
-
<p>or with environment variables:</p>
|
199
|
-
|
200
|
-
<pre class="ruby"><span class="ruby-constant">ENV</span>[<span class="ruby-string">'ESP_ACCESS_KEY_ID'</span>] = <span class="ruby-operator"><</span><span class="ruby-identifier">you</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
201
|
-
<span class="ruby-constant">ENV</span>[<span class="ruby-string">'ESP_SECRET_ACCESS_KEY'</span>] = <span class="ruby-operator"><</span><span class="ruby-identifier">your</span> <span class="ruby-identifier">secret</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
202
|
-
</pre>
|
203
|
-
|
204
|
-
<p>or, if in a Rails application, you can use the configure block in an
|
205
|
-
initializer:</p>
|
206
|
-
|
207
|
-
<pre class="ruby"><span class="ruby-constant">ESP</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
208
|
-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">access_key_id</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">your</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
209
|
-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">secret_access_key</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">your</span> <span class="ruby-identifier">secret</span> <span class="ruby-identifier">key</span><span class="ruby-operator">></span>
|
210
|
-
<span class="ruby-keyword">end</span>
|
211
|
-
</pre>
|
212
|
-
|
213
|
-
<p>Get your HMAC keys from the Evident.io website, <a
|
214
|
-
href="https://esp.evident.io/settings/api_keys">esp.evident.io</a></p>
|
215
|
-
|
216
|
-
<h2 id="label-Appliance+Users">Appliance Users<span><a href="#label-Appliance+Users">¶</a> <a href="#documentation">↑</a></span></h2>
|
217
|
-
|
218
|
-
<p>Users of Evident.io's AWS marketplace appliance will need to set the
|
219
|
-
host for their appliance instance.
|
220
|
-
You can set this directly:</p>
|
221
|
-
|
222
|
-
<pre class="ruby"><span class="ruby-constant">ESP</span>.<span class="ruby-identifier">host</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">host</span> <span class="ruby-keyword">for</span> <span class="ruby-identifier">appliance</span> <span class="ruby-identifier">instance</span><span class="ruby-operator">></span>
|
223
|
-
</pre>
|
224
|
-
|
225
|
-
<p>or, if in a Rails application, you can use the configure block in an
|
226
|
-
initializer:</p>
|
227
|
-
|
228
|
-
<pre class="ruby"><span class="ruby-constant">ESP</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
229
|
-
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">host</span> = <span class="ruby-operator"><</span><span class="ruby-identifier">host</span> <span class="ruby-keyword">for</span> <span class="ruby-identifier">appliance</span> <span class="ruby-identifier">instance</span><span class="ruby-operator">></span>
|
230
|
-
<span class="ruby-keyword">end</span>
|
231
|
-
</pre>
|
232
|
-
|
233
|
-
<p>Alternatively, the site can also be set with an environment variable.</p>
|
234
|
-
|
235
|
-
<pre>export ESP_HOST=<host for appliance instance></pre>
|
236
|
-
|
237
|
-
<h1 id="label-Usage">Usage<span><a href="#label-Usage">¶</a> <a href="#documentation">↑</a></span></h1>
|
238
|
-
|
239
|
-
<h2 id="label-Everything+is+an+Object">Everything is an Object<span><a href="#label-Everything+is+an+Object">¶</a> <a href="#documentation">↑</a></span></h2>
|
240
|
-
|
241
|
-
<p>The Evident.io SDK uses Active Resource, so the DSL acts very much like
|
242
|
-
Active Record providing by default, the standard CRUD
|
243
|
-
actions
|
244
|
-
<code>find</code>, <code>all</code>, <code>create</code>,
|
245
|
-
<code>update</code>, <code>destroy</code>, only instead of a database as
|
246
|
-
the data store, it makes calls to the Evident.io API. Not all
|
247
|
-
methods are
|
248
|
-
available for all <a href="ESP.html">ESP</a> objects. See the <a
|
249
|
-
href="http://www.rubydoc.info/gems/esp_sdk">documentation</a> to see all
|
250
|
-
the methods
|
251
|
-
available for each object.
|
252
|
-
So, for instance, to get a report by
|
253
|
-
ID:</p>
|
254
|
-
|
255
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">report</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Report</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">234</span>)
|
256
|
-
</pre>
|
257
|
-
|
258
|
-
<p>And to get the alerts for that report:</p>
|
259
|
-
|
260
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span> = <span class="ruby-identifier">report</span>.<span class="ruby-identifier">alerts</span>
|
261
|
-
</pre>
|
262
|
-
|
263
|
-
<p>For objects that are creatable, updatable, and destroyable, you make the
|
264
|
-
exact same calls you would expect to use with Active Record.</p>
|
265
|
-
|
266
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Team</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-string">'MyTeam'</span>, <span class="ruby-identifier">organization_id</span><span class="ruby-operator">:</span> <span class="ruby-value">452</span>, <span class="ruby-identifier">sub_organization_id</span><span class="ruby-operator">:</span> <span class="ruby-value">599</span>)
|
267
|
-
|
268
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">'NewName'</span>
|
269
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span>.<span class="ruby-identifier">save</span>
|
270
|
-
|
271
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span>.<span class="ruby-identifier">destroy</span>
|
272
|
-
</pre>
|
273
|
-
|
274
|
-
<p>Use the <code>attributes</code> method to get a list of all available
|
275
|
-
attributes that each object has.</p>
|
276
|
-
|
277
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Team</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">1</span>)
|
278
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span>.<span class="ruby-identifier">attributes</span>
|
279
|
-
<span class="ruby-comment"># => {</span>
|
280
|
-
<span class="ruby-comment"># => "id" => "1",</span>
|
281
|
-
<span class="ruby-comment"># => "type" => "teams",</span>
|
282
|
-
<span class="ruby-comment"># => "relationships" => #<ESP::Team::Relationships:0x007fdf1b451710 @attributes={"sub_organization"=>#<ESP::SubOrganization:0x007fdf1b450d60 @attributes={"data"=>#<ESP::SubOrganization::Data:0x007fdf1b450978 @attributes={"id"=>"1", "type"=>"sub_organizations"}, @prefix_options={}, @persisted=true>, "links"=>#<ESP::SubOrganization::Links:0x007fdf1b4503b0 @attributes={"related"=>"http://localhost:3000/api/v2/sub_organizations/1.json"}, @prefix_options={}, @persisted=true>}, @prefix_options={}, @persisted=true>, "organization"=>#<ESP::Organization:0x007fdf1b45bbc0 @attributes={"data"=>#<ESP::Organization::Data:0x007fdf1b45b7d8 @attributes={"id"=>"1", "type"=>"organizations"}, @prefix_options={}, @persisted=true>, "links"=>#<ESP::Organization::Links:0x007fdf1b45b210 @attributes={"related"=>"http://localhost:3000/api/v2/organizations/1.json"}, @prefix_options={}, @persisted=true>}, @prefix_options={}, @persisted=true>, "external_accounts"=>#<ESP::Team::Relationships::ExternalAccounts:0x007fdf1b45a040 @attributes={"data"=>[#<ESP::Team::Relationships::ExternalAccounts::Datum:0x007fdf1b458830 @attributes={"id"=>"1", "type"=>"external_accounts"}, @prefix_options={}, @persisted=true>], "links"=>#<ESP::Team::Links:0x007fdf1b463e38 @attributes={"related"=>"http://localhost:3000/api/v2/external_accounts.json"}, @prefix_options={}, @persisted=true>}, @prefix_options={}, @persisted=true>}, @prefix_options={}, @persisted=true>,</span>
|
283
|
-
<span class="ruby-comment"># => "name" => "Default Team",</span>
|
284
|
-
<span class="ruby-comment"># => "created_at" => "2015-09-23T14:37:48.000Z",</span>
|
285
|
-
<span class="ruby-comment"># => "updated_at" => "2015-09-23T14:37:48.000Z",</span>
|
286
|
-
<span class="ruby-comment"># => "sub_organization_id" => "1",</span>
|
287
|
-
<span class="ruby-comment"># => "organization_id" => "1",</span>
|
288
|
-
<span class="ruby-comment"># => "external_account_ids" => [</span>
|
289
|
-
<span class="ruby-comment"># => [0] "1"</span>
|
290
|
-
<span class="ruby-comment"># => ]</span>
|
291
|
-
<span class="ruby-comment"># => }</span>
|
292
|
-
</pre>
|
293
|
-
|
294
|
-
<h2 id="label-Errors">Errors<span><a href="#label-Errors">¶</a> <a href="#documentation">↑</a></span></h2>
|
295
|
-
|
296
|
-
<p>Active Resource objects have an errors collection, just like Active Record
|
297
|
-
objects. If the API call returns a non fatal response, like
|
298
|
-
validation
|
299
|
-
issues, you can check the errors object to see what went wrong.</p>
|
300
|
-
|
301
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">t</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Team</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">name</span><span class="ruby-operator">:</span> <span class="ruby-string">''</span>)
|
302
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">errors</span>
|
303
|
-
<span class="ruby-comment"># => {</span>
|
304
|
-
<span class="ruby-comment"># => :base => [</span>
|
305
|
-
<span class="ruby-comment"># => [0] "Organization can't be blank",</span>
|
306
|
-
<span class="ruby-comment"># => [1] "Sub organization can't be blank"</span>
|
307
|
-
<span class="ruby-comment"># => ],</span>
|
308
|
-
<span class="ruby-comment"># => :name => [</span>
|
309
|
-
<span class="ruby-comment"># => [0] "can't be blank"</span>
|
310
|
-
<span class="ruby-comment"># => ]</span>
|
311
|
-
<span class="ruby-comment"># => }</span>
|
312
|
-
</pre>
|
313
|
-
|
314
|
-
<p>The errors will be in the :base key rather than the corresponding attribute
|
315
|
-
key, since we have not defined a schema for the objects
|
316
|
-
in order to stay
|
317
|
-
more loosely coupled to the API.</p>
|
318
|
-
|
319
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">full_messages</span>
|
320
|
-
<span class="ruby-comment"># => [</span>
|
321
|
-
<span class="ruby-comment"># => [0] "Organization can't be blank",</span>
|
322
|
-
<span class="ruby-comment"># => [1] "Sub organization can't be blank",</span>
|
323
|
-
<span class="ruby-comment"># => [2] "Name can't be blank"</span>
|
324
|
-
<span class="ruby-comment"># => ]</span>
|
325
|
-
</pre>
|
326
|
-
|
327
|
-
<p>When an error is thrown, you can rescue the error and check the error
|
328
|
-
message:</p>
|
329
|
-
|
330
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">c</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">CustomSignature</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">435</span>)
|
331
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">003</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">run!</span>(<span class="ruby-identifier">external_account_id</span><span class="ruby-operator">:</span> <span class="ruby-value">999</span>)
|
332
|
-
<span class="ruby-comment"># => ActiveResource::ResourceInvalid: Failed. Response code = 422. Response message = Couldn't find ExternalAccount. </span>
|
333
|
-
<span class="ruby-comment"># => from /Users/kevintyll/evident/esp_sdk/lib/esp/resources/custom_signature.rb:23:in `run!'</span>
|
334
|
-
|
335
|
-
<span class="ruby-keyword">begin</span>
|
336
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">run!</span>(<span class="ruby-identifier">external_account_id</span><span class="ruby-operator">:</span> <span class="ruby-value">999</span>)
|
337
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">ActiveResource</span><span class="ruby-operator">::</span><span class="ruby-constant">ResourceInvalid</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
338
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">message</span>
|
339
|
-
<span class="ruby-keyword">end</span>
|
340
|
-
<span class="ruby-comment"># => Failed. Response code = 422. Response message = Couldn't find ExternalAccount.</span>
|
341
|
-
</pre>
|
342
|
-
|
343
|
-
<p>All non get requests have a corresponding <code>!</code> version of the
|
344
|
-
method. These methods will throw an error rather than swallow
|
345
|
-
the error and
|
346
|
-
return an object with the errors object populated. For example, the
|
347
|
-
<code>run</code> and <code>run!</code> methods on CustomSignature.</p>
|
348
|
-
|
349
|
-
<h2 id="label-Pagination">Pagination<span><a href="#label-Pagination">¶</a> <a href="#documentation">↑</a></span></h2>
|
350
|
-
|
351
|
-
<p>Evident.io API endpoints that return a collection of objects allows for
|
352
|
-
paging and only returns a limited number of items at a time.
|
353
|
-
The Evident.io
|
354
|
-
SDK returns an ESP::PaginatedCollection object that provides methods for
|
355
|
-
paginating through the collection.
|
356
|
-
The methods with a <code>!</code> suffix
|
357
|
-
update the object, methods without the <code>!</code> suffix return a new
|
358
|
-
page object preserving the
|
359
|
-
original object.</p>
|
360
|
-
|
361
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">Alert</span>.<span class="ruby-identifier">for_report</span>(<span class="ruby-value">345</span>)
|
362
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "1"</span>
|
363
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page2</span> = <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">next_page</span>
|
364
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "1"</span>
|
365
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page2</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "2"</span>
|
366
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page2</span>.<span class="ruby-identifier">previous_page!</span>
|
367
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page2</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "1"</span>
|
368
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">last_page!</span>
|
369
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "25"</span>
|
370
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page4</span> = <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">page</span>(<span class="ruby-value">4</span>)
|
371
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">alerts</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "25"</span>
|
372
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">page4</span>.<span class="ruby-identifier">current_page_number</span> <span class="ruby-comment"># => "4"</span>
|
373
|
-
</pre>
|
374
|
-
|
375
|
-
<h2 id="label-Associated+Objects">Associated Objects<span><a href="#label-Associated+Objects">¶</a> <a href="#documentation">↑</a></span></h2>
|
376
|
-
|
377
|
-
<p>Most of the objects in the Evident.io SDK have a corresponding API call
|
378
|
-
associated with it. That means if you call an object's
|
379
|
-
association,
|
380
|
-
then that will make another API call. For example:</p>
|
381
|
-
|
382
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">external_account</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">ExternalAccount</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">3</span>)
|
383
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">organization</span> = <span class="ruby-identifier">external_account</span>.<span class="ruby-identifier">organization</span>
|
384
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">sub_organization</span> = <span class="ruby-identifier">external_account</span>.<span class="ruby-identifier">sub_organization</span>
|
385
|
-
<span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">team</span> = <span class="ruby-identifier">external_account</span>.<span class="ruby-identifier">team</span>
|
386
|
-
</pre>
|
387
|
-
|
388
|
-
<p>The above code will make 4 calls to the Evident.io API. 1 each for the
|
389
|
-
external account, organization, sub_organization and team.
|
390
|
-
The <a
|
391
|
-
href="http://jsonapi.org/format/#fetching-includes">JSON API
|
392
|
-
Specification</a>, which the Evident.io API tries to follow, provides
|
393
|
-
a
|
394
|
-
means for returning nested objects in a single call. With the SDK, that can
|
395
|
-
be done by providing a comma separated string
|
396
|
-
of the relations wanted in an
|
397
|
-
<code>include</code> option.</p>
|
398
|
-
|
399
|
-
<pre class="ruby"><span class="ruby-identifier">espsdk</span>:<span class="ruby-value">004</span><span class="ruby-operator">:</span><span class="ruby-value">0</span><span class="ruby-operator">></span> <span class="ruby-identifier">external_account</span> = <span class="ruby-constant">ESP</span><span class="ruby-operator">::</span><span class="ruby-constant">ExternalAccount</span>.<span class="ruby-identifier">find</span>(<span class="ruby-value">3</span>, <span class="ruby-identifier">include</span><span class="ruby-operator">:</span> <span class="ruby-string">'organization,sub_orgnanization,team'</span>)
|
400
|
-
</pre>
|
401
|
-
|
402
|
-
<p>With that call, organization, sub_organization and team will all come back
|
403
|
-
in the response, and calling,
|
404
|
-
<code>external_account.organization</code>,
|
405
|
-
<code>external_account.sub_organization</code>
|
406
|
-
and <code>external_account.team</code>, will not make another API call.
|
407
|
-
Most objects' find method accepts the
|
408
|
-
<code>include</code> option.</p>
|
409
|
-
|
410
|
-
<p>See the <a
|
411
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/ActiveResource/PaginatedCollection.html">Documentation</a>
|
412
|
-
for all the pagination methods available.</p>
|
413
|
-
|
414
|
-
<h2 id="label-Available+Objects">Available Objects<span><a href="#label-Available+Objects">¶</a> <a href="#documentation">↑</a></span></h2>
|
415
|
-
<ul><li>
|
416
|
-
<p><a
|
417
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Alert.html">ESP::Alert</a></p>
|
418
|
-
</li><li>
|
419
|
-
<p><a
|
420
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/CloudTrailEvent.html">ESP::CloudTrailEvent</a></p>
|
421
|
-
</li><li>
|
422
|
-
<p><a
|
423
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/ContactRequest.html">ESP::ContactRequest</a></p>
|
424
|
-
</li><li>
|
425
|
-
<p><a
|
426
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/CustomSignature.html">ESP::CustomSignature</a></p>
|
427
|
-
</li><li>
|
428
|
-
<p><a
|
429
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Dashboard.html">ESP::Dashboard</a></p>
|
430
|
-
</li><li>
|
431
|
-
<p><a
|
432
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/ExternalAccount.html">ESP::ExternalAccount</a></p>
|
433
|
-
</li><li>
|
434
|
-
<p><a
|
435
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Organization.html">ESP::Organization</a></p>
|
436
|
-
</li><li>
|
437
|
-
<p><a
|
438
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Region.html">ESP::Region</a></p>
|
439
|
-
</li><li>
|
440
|
-
<p><a
|
441
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Report.html">ESP::Report</a></p>
|
442
|
-
</li><li>
|
443
|
-
<p><a
|
444
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Service.html">ESP::Service</a></p>
|
445
|
-
</li><li>
|
446
|
-
<p><a
|
447
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Signature.html">ESP::Signature</a></p>
|
448
|
-
</li><li>
|
449
|
-
<p><a href="http://www.rubydoc.info/gems/esp_sdk/ESP/Stat.html">ESP::Stat</a></p>
|
450
|
-
</li><li>
|
451
|
-
<p><a
|
452
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/SubOrganization.html">ESP::SubOrganization</a></p>
|
453
|
-
</li><li>
|
454
|
-
<p><a
|
455
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Suppression.html">ESP::Suppression</a></p>
|
456
|
-
</li><li>
|
457
|
-
<p><a
|
458
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Suppression::Region.html">ESP::Suppression::Region</a></p>
|
459
|
-
</li><li>
|
460
|
-
<p><a
|
461
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Suppression::Signature.html">ESP::Suppression::Signature</a></p>
|
462
|
-
</li><li>
|
463
|
-
<p><a
|
464
|
-
href="http://www.rubydoc.info/gems/esp_sdk/ESP/Suppression::UniqueIdentifier.html">ESP::Suppression::UniqueIdentifier</a></p>
|
465
|
-
</li><li>
|
466
|
-
<p><a href="http://www.rubydoc.info/gems/esp_sdk/ESP/Tag.html">ESP::Tag</a></p>
|
467
|
-
</li><li>
|
468
|
-
<p><a href="http://www.rubydoc.info/gems/esp_sdk/ESP/Team.html">ESP::Team</a></p>
|
469
|
-
</li><li>
|
470
|
-
<p><a href="http://www.rubydoc.info/gems/esp_sdk/ESP/User.html">ESP::User</a></p>
|
471
|
-
</li></ul>
|
472
|
-
|
473
|
-
<h1 id="label-Console">Console<span><a href="#label-Console">¶</a> <a href="#documentation">↑</a></span></h1>
|
474
|
-
|
475
|
-
<p>The Evident.io SDK gem also provides an IRB console you can use if not
|
476
|
-
using it in a Rails app. Run it with <code>bin/esp_console</code></p>
|
477
|
-
|
478
|
-
<h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#documentation">↑</a></span></h2>
|
479
|
-
<ol><li>
|
480
|
-
<p>Fork it ( <a
|
481
|
-
href="http://my-github-username">href=“https://github.com/[my-github-username]/esp_sdk/fork”>github.com/</a>
|
482
|
-
)</p>
|
483
|
-
</li><li>
|
484
|
-
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
485
|
-
</li><li>
|
486
|
-
<p>Commit your changes (<code>git commit -am 'Add some
|
487
|
-
feature'</code>)</p>
|
488
|
-
</li><li>
|
489
|
-
<p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
|
490
|
-
</li><li>
|
491
|
-
<p>Create a new Pull Request</p>
|
492
|
-
</li></ol>
|
493
|
-
|
494
|
-
</div>
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
<footer id="validator-badges">
|
499
|
-
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
500
|
-
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
|
501
|
-
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
502
|
-
</footer>
|
503
|
-
|
data/rdoc/created.rid
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
Wed, 16 Dec 2015 12:51:35 -0500
|
2
|
-
README.md Wed, 16 Dec 2015 11:57:09 -0500
|
3
|
-
lib/esp/resources/alert.rb Wed, 16 Dec 2015 11:57:09 -0500
|
4
|
-
lib/esp/resources/cloud_trail_event.rb Wed, 16 Dec 2015 11:57:09 -0500
|
5
|
-
lib/esp/resources/concerns/stat_totals.rb Thu, 05 Nov 2015 11:49:42 -0500
|
6
|
-
lib/esp/resources/contact_request.rb Wed, 16 Dec 2015 11:57:09 -0500
|
7
|
-
lib/esp/resources/custom_signature.rb Wed, 16 Dec 2015 11:57:09 -0500
|
8
|
-
lib/esp/resources/dashboard.rb Wed, 16 Dec 2015 11:57:09 -0500
|
9
|
-
lib/esp/resources/external_account.rb Wed, 16 Dec 2015 11:57:09 -0500
|
10
|
-
lib/esp/resources/metadata.rb Thu, 10 Dec 2015 13:11:27 -0500
|
11
|
-
lib/esp/resources/organization.rb Wed, 16 Dec 2015 11:57:09 -0500
|
12
|
-
lib/esp/resources/region.rb Wed, 16 Dec 2015 11:57:09 -0500
|
13
|
-
lib/esp/resources/report.rb Wed, 16 Dec 2015 11:57:09 -0500
|
14
|
-
lib/esp/resources/resource.rb Wed, 16 Dec 2015 11:57:09 -0500
|
15
|
-
lib/esp/resources/service.rb Wed, 16 Dec 2015 11:57:09 -0500
|
16
|
-
lib/esp/resources/signature.rb Wed, 16 Dec 2015 12:43:01 -0500
|
17
|
-
lib/esp/resources/stat.rb Wed, 16 Dec 2015 11:57:09 -0500
|
18
|
-
lib/esp/resources/stat_custom_signature.rb Wed, 16 Dec 2015 11:57:09 -0500
|
19
|
-
lib/esp/resources/stat_region.rb Wed, 16 Dec 2015 11:57:09 -0500
|
20
|
-
lib/esp/resources/stat_service.rb Wed, 16 Dec 2015 11:57:09 -0500
|
21
|
-
lib/esp/resources/stat_signature.rb Wed, 16 Dec 2015 11:57:09 -0500
|
22
|
-
lib/esp/resources/sub_organization.rb Wed, 16 Dec 2015 11:57:09 -0500
|
23
|
-
lib/esp/resources/suppression.rb Wed, 16 Dec 2015 11:57:09 -0500
|
24
|
-
lib/esp/resources/suppression/region.rb Wed, 16 Dec 2015 11:57:09 -0500
|
25
|
-
lib/esp/resources/suppression/signature.rb Wed, 16 Dec 2015 11:57:09 -0500
|
26
|
-
lib/esp/resources/suppression/unique_identifier.rb Wed, 16 Dec 2015 11:57:09 -0500
|
27
|
-
lib/esp/resources/tag.rb Wed, 16 Dec 2015 11:57:09 -0500
|
28
|
-
lib/esp/resources/team.rb Wed, 16 Dec 2015 11:57:09 -0500
|
29
|
-
lib/esp/resources/user.rb Wed, 16 Dec 2015 11:57:09 -0500
|
30
|
-
lib/esp/extensions/active_resource/paginated_collection.rb Wed, 16 Dec 2015 11:57:09 -0500
|
31
|
-
lib/esp.rb Wed, 16 Dec 2015 12:50:54 -0500
|
data/rdoc/images/add.png
DELETED
Binary file
|
data/rdoc/images/arrow_up.png
DELETED
Binary file
|
data/rdoc/images/brick.png
DELETED
Binary file
|
data/rdoc/images/brick_link.png
DELETED
Binary file
|
data/rdoc/images/bug.png
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/rdoc/images/date.png
DELETED
Binary file
|
data/rdoc/images/delete.png
DELETED
Binary file
|
data/rdoc/images/find.png
DELETED
Binary file
|
Binary file
|
data/rdoc/images/macFFBgHack.png
DELETED
Binary file
|
data/rdoc/images/package.png
DELETED
Binary file
|
data/rdoc/images/page_green.png
DELETED
Binary file
|
Binary file
|
Binary file
|
data/rdoc/images/plugin.png
DELETED
Binary file
|
data/rdoc/images/ruby.png
DELETED
Binary file
|
data/rdoc/images/tag_blue.png
DELETED
Binary file
|
data/rdoc/images/tag_green.png
DELETED
Binary file
|
data/rdoc/images/transparent.png
DELETED
Binary file
|
data/rdoc/images/wrench.png
DELETED
Binary file
|
Binary file
|