moonlogs-ruby 0.5.10 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/docs/DefaultApi.md +4 -4
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/OneOfRecordRequestLevel.md +6 -0
- data/docs/OneOfRecordResponseLevel.md +6 -0
- data/docs/RecordRequest.md +12 -0
- data/docs/RecordResponse.md +15 -0
- data/lib/moonlogs-ruby/api/default_api.rb +5 -5
- data/lib/moonlogs-ruby/api_client.rb +1 -1
- data/lib/moonlogs-ruby/api_error.rb +1 -1
- data/lib/moonlogs-ruby/configuration.rb +1 -1
- data/lib/moonlogs-ruby/models/api_token.rb +1 -1
- data/lib/moonlogs-ruby/models/credentials.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_1.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_10.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_11.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_12.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_13.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_2.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_3.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_4.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_5.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_6.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_7.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_8.rb +1 -1
- data/lib/moonlogs-ruby/models/inline_response_200_9.rb +1 -1
- data/lib/moonlogs-ruby/models/level.rb +1 -1
- data/lib/moonlogs-ruby/models/meta.rb +1 -1
- data/lib/moonlogs-ruby/models/one_of_record_level.rb +1 -1
- data/lib/moonlogs-ruby/models/one_of_record_request_level.rb +197 -0
- data/lib/moonlogs-ruby/models/one_of_record_response_level.rb +197 -0
- data/lib/moonlogs-ruby/models/one_of_user_role.rb +1 -1
- data/lib/moonlogs-ruby/models/record.rb +1 -1
- data/lib/moonlogs-ruby/models/record_request.rb +266 -0
- data/lib/moonlogs-ruby/models/record_response.rb +323 -0
- data/lib/moonlogs-ruby/models/role.rb +1 -1
- data/lib/moonlogs-ruby/models/schema.rb +1 -1
- data/lib/moonlogs-ruby/models/schema_field.rb +1 -1
- data/lib/moonlogs-ruby/models/schema_kind.rb +1 -1
- data/lib/moonlogs-ruby/models/session.rb +1 -1
- data/lib/moonlogs-ruby/models/tag.rb +1 -1
- data/lib/moonlogs-ruby/models/user.rb +1 -1
- data/lib/moonlogs-ruby/version.rb +2 -2
- data/lib/moonlogs-ruby.rb +5 -3
- data/moonlogs-ruby.gemspec +1 -1
- data/spec/models/one_of_record_request_level_spec.rb +34 -0
- data/spec/models/one_of_record_response_level_spec.rb +34 -0
- data/spec/models/record_request_spec.rb +70 -0
- data/spec/models/record_response_spec.rb +88 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd593fa4cb5eb2795e77fc9548f09ecb7a34b40bd147a3b59cec79a337809320
|
4
|
+
data.tar.gz: b0b8515ee2f6d476dbd8f1a0fd8d1b5a62eb1e78c351c828b7baba74bbebd248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30f73e997f9625ec178c71b69230b789f87b7c537aac4d27dd91fa5d6ca16abf565e42725c6735a0c60019ddaae917b2c19ebf9b4fe4a68c9235554a96db5dc
|
7
|
+
data.tar.gz: cb570a019903f02576b0b1548bcb47d2d25e3be385e1e83d462e6f3ea5a578c70f03b09ca1c63b8392b60a9be70b39890d8a43eb2f40af6ae95559c5bce805dd
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Moonlogs API
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
|
-
- API version: 0.5.
|
10
|
-
- Package version: 0.5.
|
9
|
+
- API version: 0.5.12
|
10
|
+
- Package version: 0.5.12
|
11
11
|
- Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build moonlogs-ruby.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./moonlogs-ruby-0.5.
|
26
|
+
gem install ./moonlogs-ruby-0.5.12.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./moonlogs-ruby-0.5.
|
28
|
+
(for development, run `gem install --dev ./moonlogs-ruby-0.5.12.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'moonlogs-ruby', '~> 0.5.
|
34
|
+
gem 'moonlogs-ruby', '~> 0.5.12'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -175,7 +175,7 @@ end
|
|
175
175
|
|
176
176
|
api_instance = MoonlogsRuby::DefaultApi.new
|
177
177
|
opts = {
|
178
|
-
body: MoonlogsRuby::
|
178
|
+
body: MoonlogsRuby::RecordRequest.new # RecordRequest |
|
179
179
|
}
|
180
180
|
|
181
181
|
begin
|
@@ -190,7 +190,7 @@ end
|
|
190
190
|
|
191
191
|
api_instance = MoonlogsRuby::DefaultApi.new
|
192
192
|
opts = {
|
193
|
-
body: MoonlogsRuby::
|
193
|
+
body: MoonlogsRuby::RecordRequest.new, # RecordRequest |
|
194
194
|
page: 56, # Integer |
|
195
195
|
limit: 56, # Integer |
|
196
196
|
from: 'from_example', # String | Time in format \"YYYY-DD-MMTHH:SS\"
|
@@ -506,9 +506,11 @@ Class | Method | HTTP request | Description
|
|
506
506
|
- [MoonlogsRuby::InlineResponse2009](docs/InlineResponse2009.md)
|
507
507
|
- [MoonlogsRuby::Level](docs/Level.md)
|
508
508
|
- [MoonlogsRuby::Meta](docs/Meta.md)
|
509
|
-
- [MoonlogsRuby::
|
509
|
+
- [MoonlogsRuby::OneOfRecordRequestLevel](docs/OneOfRecordRequestLevel.md)
|
510
|
+
- [MoonlogsRuby::OneOfRecordResponseLevel](docs/OneOfRecordResponseLevel.md)
|
510
511
|
- [MoonlogsRuby::OneOfUserRole](docs/OneOfUserRole.md)
|
511
|
-
- [MoonlogsRuby::
|
512
|
+
- [MoonlogsRuby::RecordRequest](docs/RecordRequest.md)
|
513
|
+
- [MoonlogsRuby::RecordResponse](docs/RecordResponse.md)
|
512
514
|
- [MoonlogsRuby::Role](docs/Role.md)
|
513
515
|
- [MoonlogsRuby::Schema](docs/Schema.md)
|
514
516
|
- [MoonlogsRuby::SchemaField](docs/SchemaField.md)
|
data/docs/DefaultApi.md
CHANGED
@@ -420,7 +420,7 @@ end
|
|
420
420
|
|
421
421
|
api_instance = MoonlogsRuby::DefaultApi.new
|
422
422
|
opts = {
|
423
|
-
body: MoonlogsRuby::
|
423
|
+
body: MoonlogsRuby::RecordRequest.new # RecordRequest |
|
424
424
|
}
|
425
425
|
|
426
426
|
begin
|
@@ -435,7 +435,7 @@ end
|
|
435
435
|
|
436
436
|
Name | Type | Description | Notes
|
437
437
|
------------- | ------------- | ------------- | -------------
|
438
|
-
**body** | [**
|
438
|
+
**body** | [**RecordRequest**](RecordRequest.md)| | [optional]
|
439
439
|
|
440
440
|
### Return type
|
441
441
|
|
@@ -467,7 +467,7 @@ end
|
|
467
467
|
|
468
468
|
api_instance = MoonlogsRuby::DefaultApi.new
|
469
469
|
opts = {
|
470
|
-
body: MoonlogsRuby::
|
470
|
+
body: MoonlogsRuby::RecordRequest.new # RecordRequest |
|
471
471
|
page: 56 # Integer |
|
472
472
|
limit: 56 # Integer |
|
473
473
|
from: 'from_example' # String | Time in format \"YYYY-DD-MMTHH:SS\"
|
@@ -486,7 +486,7 @@ end
|
|
486
486
|
|
487
487
|
Name | Type | Description | Notes
|
488
488
|
------------- | ------------- | ------------- | -------------
|
489
|
-
**body** | [**
|
489
|
+
**body** | [**RecordRequest**](RecordRequest.md)| | [optional]
|
490
490
|
**page** | **Integer**| | [optional]
|
491
491
|
**limit** | **Integer**| | [optional]
|
492
492
|
**from** | **String**| Time in format \"YYYY-DD-MMTHH:SS\" | [optional]
|
data/docs/InlineResponse2003.md
CHANGED
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
|
|
6
6
|
**success** | **BOOLEAN** | |
|
7
7
|
**code** | **Integer** | |
|
8
8
|
**error** | **String** | |
|
9
|
-
**data** | [**Array<
|
9
|
+
**data** | [**Array<RecordResponse>**](RecordResponse.md) | |
|
10
10
|
**meta** | [**Meta**](Meta.md) | |
|
11
11
|
|
data/docs/InlineResponse2004.md
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
# MoonlogsRuby::RecordRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**text** | **String** | |
|
7
|
+
**schema_name** | **String** | |
|
8
|
+
**schema_id** | **Integer** | | [optional]
|
9
|
+
**query** | **Object** | |
|
10
|
+
**kind** | **String** | | [optional]
|
11
|
+
**level** | [**OneOfRecordRequestLevel**](OneOfRecordRequestLevel.md) | | [optional]
|
12
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# MoonlogsRuby::RecordResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **Integer** | |
|
7
|
+
**text** | **String** | |
|
8
|
+
**schema_name** | **String** | |
|
9
|
+
**schema_id** | **Integer** | |
|
10
|
+
**query** | **Object** | |
|
11
|
+
**kind** | **String** | |
|
12
|
+
**created_at** | **String** | |
|
13
|
+
**group_hash** | **String** | |
|
14
|
+
**level** | [**OneOfRecordResponseLevel**](OneOfRecordResponseLevel.md) | |
|
15
|
+
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Moonlogs API
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.5.
|
6
|
+
OpenAPI spec version: 0.5.12
|
7
7
|
Contact: shalpack@gmail.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 3.0.52
|
@@ -435,7 +435,7 @@ module MoonlogsRuby
|
|
435
435
|
return data, status_code, headers
|
436
436
|
end
|
437
437
|
# @param [Hash] opts the optional parameters
|
438
|
-
# @option opts [
|
438
|
+
# @option opts [RecordRequest] :body
|
439
439
|
# @return [InlineResponse2004]
|
440
440
|
def api_logs_post(opts = {})
|
441
441
|
data, _status_code, _headers = api_logs_post_with_http_info(opts)
|
@@ -443,7 +443,7 @@ module MoonlogsRuby
|
|
443
443
|
end
|
444
444
|
|
445
445
|
# @param [Hash] opts the optional parameters
|
446
|
-
# @option opts [
|
446
|
+
# @option opts [RecordRequest] :body
|
447
447
|
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
448
448
|
def api_logs_post_with_http_info(opts = {})
|
449
449
|
if @api_client.config.debugging
|
@@ -485,7 +485,7 @@ module MoonlogsRuby
|
|
485
485
|
return data, status_code, headers
|
486
486
|
end
|
487
487
|
# @param [Hash] opts the optional parameters
|
488
|
-
# @option opts [
|
488
|
+
# @option opts [RecordRequest] :body
|
489
489
|
# @option opts [Integer] :page
|
490
490
|
# @option opts [Integer] :limit
|
491
491
|
# @option opts [String] :from Time in format \"YYYY-DD-MMTHH:SS\"
|
@@ -497,7 +497,7 @@ module MoonlogsRuby
|
|
497
497
|
end
|
498
498
|
|
499
499
|
# @param [Hash] opts the optional parameters
|
500
|
-
# @option opts [
|
500
|
+
# @option opts [RecordRequest] :body
|
501
501
|
# @option opts [Integer] :page
|
502
502
|
# @option opts [Integer] :limit
|
503
503
|
# @option opts [String] :from Time in format \"YYYY-DD-MMTHH:SS\"
|
@@ -0,0 +1,197 @@
|
|
1
|
+
=begin
|
2
|
+
#Moonlogs
|
3
|
+
|
4
|
+
#Moonlogs API
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.5.12
|
7
|
+
Contact: shalpack@gmail.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.52
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module MoonlogsRuby
|
15
|
+
class OneOfRecordRequestLevel
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Attribute type mapping.
|
23
|
+
def self.openapi_types
|
24
|
+
{
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# List of attributes with nullable: true
|
29
|
+
def self.openapi_nullable
|
30
|
+
Set.new([
|
31
|
+
])
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
if (!attributes.is_a?(Hash))
|
38
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::OneOfRecordRequestLevel` initialize method"
|
39
|
+
end
|
40
|
+
|
41
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
42
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
43
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
44
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::OneOfRecordRequestLevel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
45
|
+
end
|
46
|
+
h[k.to_sym] = v
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
51
|
+
# @return Array for valid properties with the reasons
|
52
|
+
def list_invalid_properties
|
53
|
+
invalid_properties = Array.new
|
54
|
+
invalid_properties
|
55
|
+
end
|
56
|
+
|
57
|
+
# Check to see if the all the properties in the model are valid
|
58
|
+
# @return true if the model is valid
|
59
|
+
def valid?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
# Checks equality by comparing each attribute.
|
64
|
+
# @param [Object] Object to be compared
|
65
|
+
def ==(o)
|
66
|
+
return true if self.equal?(o)
|
67
|
+
self.class == o.class
|
68
|
+
end
|
69
|
+
|
70
|
+
# @see the `==` method
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def eql?(o)
|
73
|
+
self == o
|
74
|
+
end
|
75
|
+
|
76
|
+
# Calculates hash code according to all attributes.
|
77
|
+
# @return [Integer] Hash code
|
78
|
+
def hash
|
79
|
+
[].hash
|
80
|
+
end
|
81
|
+
|
82
|
+
# Builds the object from hash
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
# @return [Object] Returns the model itself
|
85
|
+
def self.build_from_hash(attributes)
|
86
|
+
new.build_from_hash(attributes)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Builds the object from hash
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
# @return [Object] Returns the model itself
|
92
|
+
def build_from_hash(attributes)
|
93
|
+
return nil unless attributes.is_a?(Hash)
|
94
|
+
self.class.openapi_types.each_pair do |key, type|
|
95
|
+
if type =~ /\AArray<(.*)>/i
|
96
|
+
# check to ensure the input is an array given that the attribute
|
97
|
+
# is documented as an array but the input is not
|
98
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
99
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
100
|
+
end
|
101
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
102
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
103
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
104
|
+
self.send("#{key}=", nil)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :Boolean
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
MoonlogsRuby.const_get(type).build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
if value.nil?
|
171
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
172
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
173
|
+
end
|
174
|
+
|
175
|
+
hash[param] = _to_hash(value)
|
176
|
+
end
|
177
|
+
hash
|
178
|
+
end
|
179
|
+
|
180
|
+
# Outputs non-array value in the form of hash
|
181
|
+
# For object, use to_hash. Otherwise, just return the value
|
182
|
+
# @param [Object] value Any valid value
|
183
|
+
# @return [Hash] Returns the value in the form of hash
|
184
|
+
def _to_hash(value)
|
185
|
+
if value.is_a?(Array)
|
186
|
+
value.compact.map { |v| _to_hash(v) }
|
187
|
+
elsif value.is_a?(Hash)
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
190
|
+
end
|
191
|
+
elsif value.respond_to? :to_hash
|
192
|
+
value.to_hash
|
193
|
+
else
|
194
|
+
value
|
195
|
+
end
|
196
|
+
end end
|
197
|
+
end
|