Module: Skykick::Client::Alerts

Included in:
Skykick::Client
Defined in:
lib/skykick/client/alerts.rb

Overview

Contains all alert-related API calls for managing alerts in Skykick. This module provides methods to retrieve alerts and mark them as complete.

Instance Method Summary collapse

Instance Method Details

#alerts(id) ⇒ Array<Hash>

Note:

The ‘$top` query parameter is not explicitly implemented but can be configured on the endpoint.

Retrieves the first 500 alerts for a given Email Migration Order ID or Backup Service ID. This method utilizes OData query parameters like ‘$top`, which defaults to 25 results and allows a maximum of 500 results per call.

Examples:

Retrieve alerts for a given order or service

client.alerts('12345')  # Returns up to 500 alerts

Parameters:

  • id (String)

    The unique identifier for an Email Migration Order or Backup Service.

Returns:

  • (Array<Hash>)

    A list of alerts associated with the specified ID.



19
20
21
22
# File 'lib/skykick/client/alerts.rb', line 19

def alerts(id)
  # Retrieves paged results for alerts using the "Alerts" API endpoint.

  get_paged("Alerts/#{id}")
end

#mark_as_complete(id) ⇒ Hash

Marks a specific alert as complete.

Examples:

Mark an alert as complete

client.mark_as_complete('alert123')  # Marks alert with ID 'alert123' as complete

Parameters:

  • id (String)

    The unique identifier for the alert to be marked as complete.

Returns:

  • (Hash)

    The response from the API after marking the alert as complete.



30
31
32
# File 'lib/skykick/client/alerts.rb', line 30

def mark_as_complete(id)
  post("Alerts/#{id}")
end