=begin #Datadog API V1 Collection #Collection of all Datadog Public endpoints. The version of the OpenAPI document: 1.0 Contact: support@datadoghq.com Generated by: https://openapi-generator.tech Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2020-Present Datadog, Inc. =end require 'spec_helper' require 'json' # Unit tests for DatadogAPIClient::V1::EventsAPI # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'EventsAPI' do before do # run before each test @api_instance = DatadogAPIClient::V1::EventsAPI.new end after do # run after each test end describe 'test an instance of EventsAPI' do it 'should create an instance of EventsAPI' do expect(@api_instance).to be_instance_of(DatadogAPIClient::V1::EventsAPI) end end # unit tests for create_event # Post an event # This endpoint allows you to post events to the stream. Tag them, set priority and event aggregate them with other events. # @param body Event request object # @param [Hash] opts the optional parameters # @return [EventCreateResponse] describe 'create_event test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_event # Get an event # This endpoint allows you to query for event details. **Note**: If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. # @param event_id The ID of the event. # @param [Hash] opts the optional parameters # @return [EventResponse] describe 'get_event test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_events # Query the event stream # The event stream can be queried and filtered by time, priority, sources and tags. **Notes**: - If the event you’re querying contains markdown formatting of any kind, you may see characters such as `%`,`\\`,`n` in your output. - This endpoint returns a maximum of `1000` most recent results. To return additional results, identify the last timestamp of the last result and set that as the `end` query time to paginate the results. You can also use the page parameter to specify which set of `1000` results to return. # @param start POSIX timestamp. # @param _end POSIX timestamp. # @param [Hash] opts the optional parameters # @option opts [EventPriority] :priority Priority of your events, either `low` or `normal`. # @option opts [String] :sources A comma separated string of sources. # @option opts [String] :tags A comma separated list indicating what tags, if any, should be used to filter the list of monitors by scope. # @option opts [Boolean] :unaggregated Set unaggregated to `true` to return all events within the specified [`start`,`end`] timeframe. Otherwise if an event is aggregated to a parent event with a timestamp outside of the timeframe, it won't be available in the output. Aggregated events with `is_aggregate=true` in the response will still be returned unless exclude_aggregate is set to `true.` # @option opts [Boolean] :exclude_aggregate Set `exclude_aggregate` to `true` to only return unaggregated events where `is_aggregate=false` in the response. If the `exclude_aggregate` parameter is set to `true`, then the unaggregated parameter is ignored and will be `true` by default. # @option opts [Integer] :page By default 1000 results are returned per request. Set page to the number of the page to return with `0` being the first page. The page parameter can only be used when either unaggregated or exclude_aggregate is set to `true.` # @return [EventListResponse] describe 'list_events test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end