incident_io_api 1.1.0 → 1.2.0
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: 4418f1edbe148b7ac20242fa2de79d33c8774ba53ee9399d50a561465486df16
|
|
4
|
+
data.tar.gz: 7b3673422cfbb6aecf9402c5ee271f0ddb8fce19b71e1d5ed0fd0d62191c378f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e45f2d30a508cd436bb7ebc313ffbe493d6db9e21fbfc6970a7d71837d2e9e4d766c7b6b8b8ec7d20f52910cc3fdc5ac3e3b8bb98bdc371bd783b1e6f0488e5f
|
|
7
|
+
data.tar.gz: a5e2902405e8489918bf49d502a94b677fa6b8b62753b6e8ca66be4da26da0d6af9127cbf675357b701a33c53469e349572d788f6ea24c1d25ca08aecf757593
|
|
@@ -679,6 +679,69 @@ module IncidentIo
|
|
|
679
679
|
return data, status_code, headers
|
|
680
680
|
end
|
|
681
681
|
|
|
682
|
+
# ShowStatusPage Status Pages V2
|
|
683
|
+
# Show a single status page. This endpoint requires a valid API key but no specific scopes. Use ShowStatusPageStructure to see the components and groups configured on the page.
|
|
684
|
+
# @param status_page_id [String] ID of the status page. You can find this by calling the ListStatusPages endpoint.
|
|
685
|
+
# @param [Hash] opts the optional parameters
|
|
686
|
+
# @return [StatusPagesShowStatusPageResultV2]
|
|
687
|
+
def status_pages_v2_show_status_page(status_page_id, opts = {})
|
|
688
|
+
data, _status_code, _headers = status_pages_v2_show_status_page_with_http_info(status_page_id, opts)
|
|
689
|
+
data
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
# ShowStatusPage Status Pages V2
|
|
693
|
+
# Show a single status page. This endpoint requires a valid API key but no specific scopes. Use ShowStatusPageStructure to see the components and groups configured on the page.
|
|
694
|
+
# @param status_page_id [String] ID of the status page. You can find this by calling the ListStatusPages endpoint.
|
|
695
|
+
# @param [Hash] opts the optional parameters
|
|
696
|
+
# @return [Array<(StatusPagesShowStatusPageResultV2, Integer, Hash)>] StatusPagesShowStatusPageResultV2 data, response status code and response headers
|
|
697
|
+
def status_pages_v2_show_status_page_with_http_info(status_page_id, opts = {})
|
|
698
|
+
if @api_client.config.debugging
|
|
699
|
+
@api_client.config.logger.debug 'Calling API: StatusPagesV2Api.status_pages_v2_show_status_page ...'
|
|
700
|
+
end
|
|
701
|
+
# verify the required parameter 'status_page_id' is set
|
|
702
|
+
if @api_client.config.client_side_validation && status_page_id.nil?
|
|
703
|
+
fail ArgumentError, "Missing the required parameter 'status_page_id' when calling StatusPagesV2Api.status_pages_v2_show_status_page"
|
|
704
|
+
end
|
|
705
|
+
# resource path
|
|
706
|
+
local_var_path = '/v2/status_pages/{status_page_id}'.sub('{status_page_id}', CGI.escape(status_page_id.to_s))
|
|
707
|
+
|
|
708
|
+
# query parameters
|
|
709
|
+
query_params = opts[:query_params] || {}
|
|
710
|
+
|
|
711
|
+
# header parameters
|
|
712
|
+
header_params = opts[:header_params] || {}
|
|
713
|
+
# HTTP header 'Accept' (if needed)
|
|
714
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
715
|
+
|
|
716
|
+
# form parameters
|
|
717
|
+
form_params = opts[:form_params] || {}
|
|
718
|
+
|
|
719
|
+
# http body (model)
|
|
720
|
+
post_body = opts[:debug_body]
|
|
721
|
+
|
|
722
|
+
# return_type
|
|
723
|
+
return_type = opts[:debug_return_type] || 'StatusPagesShowStatusPageResultV2'
|
|
724
|
+
|
|
725
|
+
# auth_names
|
|
726
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
727
|
+
|
|
728
|
+
new_options = opts.merge(
|
|
729
|
+
:operation => :"StatusPagesV2Api.status_pages_v2_show_status_page",
|
|
730
|
+
:header_params => header_params,
|
|
731
|
+
:query_params => query_params,
|
|
732
|
+
:form_params => form_params,
|
|
733
|
+
:body => post_body,
|
|
734
|
+
:auth_names => auth_names,
|
|
735
|
+
:return_type => return_type
|
|
736
|
+
)
|
|
737
|
+
|
|
738
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
739
|
+
if @api_client.config.debugging
|
|
740
|
+
@api_client.config.logger.debug "API called: StatusPagesV2Api#status_pages_v2_show_status_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
741
|
+
end
|
|
742
|
+
return data, status_code, headers
|
|
743
|
+
end
|
|
744
|
+
|
|
682
745
|
# ShowStatusPageComponentAvailability Status Pages V2
|
|
683
746
|
# Show availability for a status page component over a time window. Pass start_at and end_at as RFC3339 timestamps. The window cannot be longer than 366 days. Availability uses the same rules as the public status page: full and partial outages count as downtime, overlapping impacts are merged, and time before we have data for the component is excluded rather than counted as up. This endpoint requires a valid API key but no specific scopes. Use ListStatusPages and ShowStatusPageStructure to find status page and component IDs.
|
|
684
747
|
# @param start_at [Time] Start of the availability window
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module IncidentIo
|
|
17
|
+
class StatusPagesShowStatusPageResultV2 < ApiModelBase
|
|
18
|
+
attr_accessor :status_page
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'status_page' => :'status_page'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'status_page' => :'StatusPageV2'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `IncidentIo::StatusPagesShowStatusPageResultV2` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `IncidentIo::StatusPagesShowStatusPageResultV2`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'status_page')
|
|
67
|
+
self.status_page = attributes[:'status_page']
|
|
68
|
+
else
|
|
69
|
+
self.status_page = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @status_page.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "status_page", status_page cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @status_page.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] status_page Value to be assigned
|
|
95
|
+
def status_page=(status_page)
|
|
96
|
+
if status_page.nil?
|
|
97
|
+
fail ArgumentError, 'status_page cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@status_page = status_page
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
status_page == o.status_page
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[status_page].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
data/lib/incident_io/version.rb
CHANGED
data/lib/incident_io.rb
CHANGED
|
@@ -1092,6 +1092,7 @@ IncidentIo.autoload :StatusPagesListStatusPagesResultV2, 'incident_io/models/sta
|
|
|
1092
1092
|
IncidentIo.autoload :StatusPagesShowStatusPageComponentAvailabilityResultV2, 'incident_io/models/status_pages_show_status_page_component_availability_result_v2'
|
|
1093
1093
|
IncidentIo.autoload :StatusPagesShowStatusPageIncidentResultV2, 'incident_io/models/status_pages_show_status_page_incident_result_v2'
|
|
1094
1094
|
IncidentIo.autoload :StatusPagesShowStatusPageMaintenanceResultV2, 'incident_io/models/status_pages_show_status_page_maintenance_result_v2'
|
|
1095
|
+
IncidentIo.autoload :StatusPagesShowStatusPageResultV2, 'incident_io/models/status_pages_show_status_page_result_v2'
|
|
1095
1096
|
IncidentIo.autoload :StatusPagesShowStatusPageStructureResultV2, 'incident_io/models/status_pages_show_status_page_structure_result_v2'
|
|
1096
1097
|
IncidentIo.autoload :StatusPagesUpdateStatusPageIncidentPayloadV2, 'incident_io/models/status_pages_update_status_page_incident_payload_v2'
|
|
1097
1098
|
IncidentIo.autoload :StatusPagesUpdateStatusPageIncidentResultV2, 'incident_io/models/status_pages_update_status_page_incident_result_v2'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: incident_io_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- incident.io
|
|
@@ -1213,6 +1213,7 @@ files:
|
|
|
1213
1213
|
- lib/incident_io/models/status_pages_show_status_page_component_availability_result_v2.rb
|
|
1214
1214
|
- lib/incident_io/models/status_pages_show_status_page_incident_result_v2.rb
|
|
1215
1215
|
- lib/incident_io/models/status_pages_show_status_page_maintenance_result_v2.rb
|
|
1216
|
+
- lib/incident_io/models/status_pages_show_status_page_result_v2.rb
|
|
1216
1217
|
- lib/incident_io/models/status_pages_show_status_page_structure_result_v2.rb
|
|
1217
1218
|
- lib/incident_io/models/status_pages_update_status_page_incident_payload_v2.rb
|
|
1218
1219
|
- lib/incident_io/models/status_pages_update_status_page_incident_result_v2.rb
|