moesif_api 1.2.3 → 1.2.4
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a24cfbdbbe33de56926a0649b0f273ff07757d307467d4b2045c2fb79ed344
|
4
|
+
data.tar.gz: 94454f17f189f05d2130a1e23a7ddb67b293c0fa11a4b9912e5bdd93a8ece779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6891179f717910897bac07f725839cd7ec08e0c19ae52e03a75169a274d435e7b0d42d1afea0aff4a0221721a9847cbcecf8fb3c979076d3986c2b8b1680ae36
|
7
|
+
data.tar.gz: 56aea775a0eee3cfad61d6421e43ad2255a59bd4830e4ef04509353807fba56c88b0d88d711298170202395917c29cdde81855ddb959b505b02d4f287807ce35
|
@@ -45,6 +45,9 @@ module MoesifApi
|
|
45
45
|
|
46
46
|
# Global error handling using HTTP status codes.
|
47
47
|
validate_response(_context)
|
48
|
+
|
49
|
+
# Return response headers
|
50
|
+
return _response.headers
|
48
51
|
end
|
49
52
|
|
50
53
|
# Add multiple API Events in a single batch (batch size must be less than 250kb)
|
@@ -84,6 +87,9 @@ module MoesifApi
|
|
84
87
|
|
85
88
|
# Global error handling using HTTP status codes.
|
86
89
|
validate_response(_context)
|
90
|
+
|
91
|
+
# Return response headers
|
92
|
+
return _response.headers
|
87
93
|
end
|
88
94
|
|
89
95
|
# Update Data for a Single User
|
@@ -165,7 +171,45 @@ module MoesifApi
|
|
165
171
|
validate_response(_context)
|
166
172
|
end
|
167
173
|
|
174
|
+
# Get Application configuration
|
175
|
+
# @param void Required parameter.
|
176
|
+
# @return response from the API call
|
177
|
+
def get_app_config()
|
178
|
+
# the base uri for api requests
|
179
|
+
_query_builder = Configuration.base_uri.dup
|
180
|
+
|
181
|
+
# prepare query string for API call
|
182
|
+
_query_builder << '/v1/config'
|
183
|
+
|
184
|
+
# validate and preprocess url
|
185
|
+
_query_url = APIHelper.clean_url _query_builder
|
186
|
+
|
187
|
+
# prepare headers
|
188
|
+
_headers = {
|
189
|
+
'content-type' => 'application/json; charset=utf-8',
|
190
|
+
'X-Moesif-Application-Id' => Configuration.application_id
|
191
|
+
}
|
168
192
|
|
193
|
+
# Create the HttpRequest object for the call
|
194
|
+
_request = @http_client.get _query_url, headers: _headers
|
169
195
|
|
196
|
+
# Call the on_before_request callback
|
197
|
+
@http_call_back.on_before_request(_request) if @http_call_back
|
198
|
+
|
199
|
+
# Invoke the API call and get the response
|
200
|
+
_response = @http_client.execute_as_string(_request)
|
201
|
+
|
202
|
+
# Wrap the request and response in an HttpContext object
|
203
|
+
_context = HttpContext.new(_request, _response)
|
204
|
+
|
205
|
+
# Call the on_after_response callback
|
206
|
+
@http_call_back.on_after_response(_context) if @http_call_back
|
207
|
+
|
208
|
+
# Global error handling using HTTP status codes.
|
209
|
+
validate_response(_context)
|
210
|
+
|
211
|
+
# Return the response
|
212
|
+
return _response
|
213
|
+
end
|
170
214
|
end
|
171
215
|
end
|
@@ -124,4 +124,14 @@ class ApiControllerTests < ControllerTestBase
|
|
124
124
|
assert_equal(@response_catcher.response.status_code, 201)
|
125
125
|
end
|
126
126
|
|
127
|
+
# Get the application configuration
|
128
|
+
def test_get_app_config()
|
129
|
+
|
130
|
+
# Perform the API call through the SDK function
|
131
|
+
app_config = self.class.controller.get_app_config()
|
132
|
+
|
133
|
+
# Test response code
|
134
|
+
assert_equal(@response_catcher.response.status_code, 200)
|
135
|
+
end
|
136
|
+
|
127
137
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moesif_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Moesif, Inc
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|