skykick 0.2.2 → 0.3.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: 7e19ac5551a5eed6f335941a38736d4db275db2f296ae65e922f986755f5ca26
4
- data.tar.gz: 103c52067a848103220e77b575b1a9faeb33312331ab3f8529b0c084b43e1ff6
3
+ metadata.gz: 2a6fddb22533868b7d481dab155eba199d22dc107614b504d7b30b2354a8f125
4
+ data.tar.gz: 4a91206b72d5ee286aa9bb974e4df2ef82631d26c4c9875c87da0308f82557fb
5
5
  SHA512:
6
- metadata.gz: 90814f525c34d0970de21e27dca62e190fc2402596ed71052224a024d3b4bc1b5eb4f502255be8d4f2231b11a06bc432b1e29240eb6b6c791c09f8904d93b247
7
- data.tar.gz: d4e4f31bd103929aa777b8c6d70f3bae5753fd51eed364d61173f9fcee7875d4ee67df88980c024d68f00f7d4efef704a8458cf726738a9871eb24763c4182e8
6
+ metadata.gz: b533bf98a520ca3aff074af183b8889807da2960a319dd4c5cf007491d4f49da0c15190671aeb11ccfc1c55842078453e0498f1d87271c8c28b81ea2cecca5d6
7
+ data.tar.gz: a1ba2fb65958104c88f603c893695b5d1f0c62081b578ec3a372c0e63da5f20db06b33fd29356c2025ad22e19a0d0f06679f040bc01a09191333ea69876e90f8
data/CHANGELOG.md CHANGED
@@ -19,3 +19,7 @@
19
19
  ## [0.2.2] - 2025-03-21
20
20
 
21
21
  - updated documentation, filter subscription key from logs
22
+
23
+ ## [0.3.0] - 2025-09-01
24
+
25
+ - updated api endpoint to https://apis.cloudservices.connectwise.com
data/README.md CHANGED
@@ -7,7 +7,8 @@
7
7
  This is a wrapper for the Skykick Office365 backup API.
8
8
  You can see the [API endpoints](https://developers.skykick.com/apis)
9
9
 
10
- Currently only the GET requests to endpoints /Backup and /Alerts are implemented (readonly).
10
+ Currently only the GET requests to endpoints /Backup and /Alerts
11
+ are implemented (readonly).
11
12
 
12
13
  ## Installation
13
14
 
@@ -31,8 +32,8 @@ Or install it yourself as:
31
32
 
32
33
  ## Usage
33
34
 
34
- Before you start making the requests to API provide the client id and client secret and
35
- email/password using the configuration wrapping.
35
+ Before you start making the requests to API provide the client id and client secret
36
+ and email/password using the configuration wrapping.
36
37
 
37
38
  ```ruby
38
39
  require 'skykick'
@@ -63,7 +64,7 @@ client.login
63
64
 
64
65
  |Resource|API endpoint|
65
66
  |:--|:--|
66
- |.auth_token or .login|https://apis.skykick.com/auth/token|
67
+ |.auth_token or .login|https://apis.cloudservices.connectwise.com/auth/token|
67
68
 
68
69
  ### Backup
69
70
 
@@ -75,18 +76,18 @@ subscriptions = client.subscriptions
75
76
 
76
77
  |Resource|API endpoint|
77
78
  |:--|:--|
78
- |autodiscover |https://apis.skykick.com/Backup/{id}/autodiscover |
79
- |datacenters |https://apis.skykick.com/Backup/datacenters |
80
- |exchange_mailboxe |https://apis.skykick.com/Backup/{id}/mailboxes/{mailboxId} |
81
- |exchange_mailboxes |https://apis.skykick.com/Backup/{id}/mailboxes |
82
- |lastsnapshotstats |https://apis.skykick.com/Backup/{backupServiceId}/lastsnapshotstats |
83
- |retention_periods |https://apis.skykick.com/Backup/{id}/retentionperiod |
84
- |sharePoint_sites |https://apis.skykick.com/Backup/{id}/sites |
85
- |sku |https://apis.skykick.com/Backup/{id}/sku |
86
- |storage_settings |https://apis.skykick.com/Backup/{id}/storagesettings |
87
- |subscription_settings |https://apis.skykick.com/Backup/{id}/subscriptionsettings |
88
- |subscriptions |https://apis.skykick.com/Backup/ |
89
- |partner_subscriptions(partner_id)|https://apis.skykick.com/Backup/{partner_id} |
79
+ |autodiscover |https://apis.cloudservices.connectwise.com/Backup/{id}/autodiscover|
80
+ |datacenters |https://apis.cloudservices.connectwise.com/Backup/datacenters|
81
+ |exchange_mailboxe |https://apis.cloudservices.connectwise.com/Backup/{id}/mailboxes/{mailboxId}|
82
+ |exchange_mailboxes |https://apis.cloudservices.connectwise.com/Backup/{id}/mailboxes|
83
+ |lastsnapshotstats |https://apis.cloudservices.connectwise.com/Backup/{backupServiceId}/lastsnapshotstats|
84
+ |retention_periods |https://apis.cloudservices.connectwise.com/Backup/{id}/retentionperiod|
85
+ |sharePoint_sites |https://apis.cloudservices.connectwise.com/Backup/{id}/sites|
86
+ |sku |https://apis.cloudservices.connectwise.com/Backup/{id}/sku|
87
+ |storage_settings |https://apis.cloudservices.connectwise.com/Backup/{id}/storagesettings|
88
+ |subscription_settings |https://apis.cloudservices.connectwise.com/Backup/{id}/subscriptionsettings|
89
+ |subscriptions |https://apis.cloudservices.connectwise.com/Backup/|
90
+ |partner_subscriptions(partner_id)|https://apis.cloudservices.connectwise.com/Backup/{partner_id}|
90
91
 
91
92
  ### Alerts
92
93
 
@@ -1,19 +1,32 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skykick
2
4
  class Client
3
-
4
- # All alert related api calls
5
- # @see https://developers.skykick.com/
5
+ # Contains all alert-related API calls for managing alerts in Skykick.
6
+ # This module provides methods to retrieve alerts and mark them as complete.
7
+ #
8
+ # @see https://developers.skykick.com/ Skykick Developer Documentation
6
9
  module Alerts
7
-
8
- # Returns first 500 Alerts for a provided Email Migration Order ID or Backup service ID.
10
+ # Retrieves the first 500 alerts for a given Email Migration Order ID or Backup Service ID.
11
+ # This method utilizes OData query parameters like `$top`, which defaults to 25 results
12
+ # and allows a maximum of 500 results per call.
13
+ #
14
+ # @note The `$top` query parameter is not explicitly implemented but can be configured on the endpoint.
15
+ # @param id [String] The unique identifier for an Email Migration Order or Backup Service.
16
+ # @return [Array<Hash>] A list of alerts associated with the specified ID.
17
+ # @example Retrieve alerts for a given order or service
18
+ # client.alerts('12345') # Returns up to 500 alerts
9
19
  def alerts(id)
10
- # This endpoint supports the following OData query parameters: $top
11
- # $top - default of 25 and max of 500
12
- # this is not implemented
20
+ # Retrieves paged results for alerts using the "Alerts" API endpoint.
13
21
  get_paged("Alerts/#{id}")
14
22
  end
15
23
 
16
- # Mark an Alert as complete.
24
+ # Marks a specific alert as complete.
25
+ #
26
+ # @param id [String] The unique identifier for the alert to be marked as complete.
27
+ # @return [Hash] The response from the API after marking the alert as complete.
28
+ # @example Mark an alert as complete
29
+ # client.mark_as_complete('alert123') # Marks alert with ID 'alert123' as complete
17
30
  def mark_as_complete(id)
18
31
  post("Alerts/#{id}")
19
32
  end
@@ -1,76 +1,123 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skykick
2
4
  class Client
3
-
4
- # All backup related api calls
5
- # @see https://developers.skykick.com/
5
+ # Contains all backup-related API calls for managing Skykick backup subscriptions and settings.
6
+ # This module provides methods to interact with backup services, including retrieving subscription
7
+ # settings, storage settings, and mailbox information.
8
+ #
9
+ # @see https://developers.skykick.com/ Skykick Developer Documentation
6
10
  module Backup
7
-
8
- # Returns a list of supported Azure data centers.
11
+ # Retrieves a list of supported Azure data centers.
12
+ # @return [Array<Hash>] A list of Azure data centers supported by Skykick.
13
+ # @example Fetch available data centers
14
+ # client.datacenters # => Returns a list of supported data centers
9
15
  def datacenters
10
- get('Backup/datacenters')
16
+ get('Backup/datacenters')
11
17
  end
12
18
 
13
- # Gets a list of placed Backup subscription orders
14
- def subscriptions()
15
- get('Backup')
19
+ # Retrieves a list of placed Backup subscription orders.
20
+ # @return [Array<Hash>] A list of backup subscriptions.
21
+ # @example Get all backup subscriptions
22
+ # client.subscriptions # => Returns a list of placed backup subscription orders
23
+ def subscriptions
24
+ get('Backup')
16
25
  end
17
26
 
18
- # Gets a list of placed Backup subscription orders
27
+ # Retrieves a list of backup subscription orders for a specific partner.
28
+ # @param partner_id [String] The unique identifier of the partner.
29
+ # @return [Array<Hash>] A list of partner-specific backup subscriptions.
30
+ # @example Get partner backup subscriptions
31
+ # client.partner_subscriptions('partner123') # => Returns subscriptions for the partner
19
32
  def partner_subscriptions(partner_id)
20
- get("Backup/#{partner_id}")
33
+ get("Backup/#{partner_id}")
21
34
  end
22
35
 
23
- # Returns Backup subscription settings. Settings include the enabled
24
- # state for Exchange and SharePoint Backups and total count of enabled
25
- # Exchange mailboxes and SharePoint sites as well as the state of the subscription.
36
+ # Retrieves backup subscription settings, including the state of Exchange and SharePoint Backups,
37
+ # the number of enabled mailboxes and SharePoint sites, and the subscription state.
38
+ # @param id [String] The subscription ID.
39
+ # @return [Hash] Backup subscription settings.
40
+ # @example Fetch subscription settings
41
+ # client.subscription_settings('sub123') # => Returns backup subscription settings
26
42
  def subscription_settings(id)
27
- get("Backup/#{id}/subscriptionsettings")
43
+ get("Backup/#{id}/subscriptionsettings")
28
44
  end
29
45
 
30
- # Returns storage settings for a Backup subscription.
46
+ # Retrieves storage settings for a backup subscription.
47
+ # @param id [String] The subscription ID.
48
+ # @return [Hash] Storage settings for the specified subscription.
49
+ # @example Get storage settings
50
+ # client.storage_settings('sub123') # => Returns storage settings
31
51
  def storage_settings(id)
32
- get("Backup/#{id}/storagesettings")
52
+ get("Backup/#{id}/storagesettings")
33
53
  end
34
54
 
35
- # Gets SKU/promo details for a Backup service.
55
+ # Retrieves SKU or promotional details for a backup service.
56
+ # @param id [String] The subscription ID.
57
+ # @return [Hash] SKU or promotional details.
58
+ # @example Fetch SKU details
59
+ # client.sku('sub123') # => Returns SKU or promo details
36
60
  def sku(id)
37
- get("Backup/#{id}/sku")
61
+ get("Backup/#{id}/sku")
38
62
  end
39
63
 
40
- # Returns a list of SharePoint site URLs and statuses (enabled/disabled)
41
- # for a Backup subscription.
64
+ # Retrieves a list of SharePoint site URLs and their statuses (enabled/disabled) for a backup subscription.
65
+ # @param id [String] The subscription ID.
66
+ # @return [Array<Hash>] A list of SharePoint site URLs and statuses.
67
+ # @example Get SharePoint sites
68
+ # client.sharepoint_sites('sub123') # => Returns a list of SharePoint sites and their statuses
42
69
  def sharepoint_sites(id)
43
- get("Backup/#{id}/sites")
70
+ get("Backup/#{id}/sites")
44
71
  end
45
72
 
46
- # Returns the data retention periods for a Backup subscription. There are different
47
- # retention periods for Exchange and SharePoint Data.
73
+ # Retrieves the data retention periods for a backup subscription.
74
+ # Different retention periods apply for Exchange and SharePoint data.
48
75
  #
49
- # Please Note: We are aware of the spelling error of the word "retention" in the response
50
- # field ExchangeRentionPeriodInDays. This is not a mistake in the documentation, but has
51
- # been left this way as not to disrupt any existing integrations with this endpoint.
76
+ # @note There is a known spelling issue in the response field: `ExchangeRentionPeriodInDays`.
77
+ # This is intentional to avoid breaking existing integrations.
78
+ # @param id [String] The subscription ID.
79
+ # @return [Hash] Retention period details.
80
+ # @example Get retention periods
81
+ # client.retentionperiod('sub123') # => Returns retention periods for Exchange and SharePoint data
52
82
  def retentionperiod(id)
53
- get("Backup/#{id}/retentionperiod")
83
+ get("Backup/#{id}/retentionperiod")
54
84
  end
55
85
 
56
- # Gets stats for snapshots from SKDataWarehouse for all mailboxes of a given backupServiceId
86
+ # Retrieves snapshot statistics from SKDataWarehouse for all mailboxes in a given backup subscription.
87
+ # @param id [String] The subscription ID.
88
+ # @return [Hash] Snapshot statistics for the mailboxes.
89
+ # @example Fetch last snapshot stats
90
+ # client.lastsnapshotstats('sub123') # => Returns snapshot stats for the subscription's mailboxes
57
91
  def lastsnapshotstats(id)
58
- get("Backup/#{id}/lastsnapshotstats")
92
+ get("Backup/#{id}/lastsnapshotstats")
59
93
  end
60
94
 
61
- # Returns a list of Exchange mailboxes and statuses (enabled/disabled) for a Backup subscription.
95
+ # Retrieves a list of Exchange mailboxes and their statuses (enabled/disabled) for a backup subscription.
96
+ # @param id [String] The subscription ID.
97
+ # @return [Array<Hash>] A list of Exchange mailboxes and their statuses.
98
+ # @example Get Exchange mailboxes
99
+ # client.exchange_mailboxes('sub123') # => Returns a list of Exchange mailboxes and statuses
62
100
  def exchange_mailboxes(id)
63
- get("Backup/#{id}/mailboxes")
101
+ get("Backup/#{id}/mailboxes")
64
102
  end
65
103
 
66
- # Returns a list of Exchange mailboxes and statuses (enabled/disabled) for a Backup subscription.
104
+ # Retrieves details of a specific Exchange mailbox in a backup subscription.
105
+ # @param id [String] The subscription ID.
106
+ # @param mailbox_id [String] The unique identifier of the mailbox.
107
+ # @return [Hash] Details of the specified Exchange mailbox.
108
+ # @example Get details of a specific mailbox
109
+ # client.exchange_mailbox('sub123', 'mailbox123') # => Returns mailbox details
67
110
  def exchange_mailbox(id, mailbox_id)
68
- get("Backup/#{id}/mailboxes/#{mailbox_id}")
111
+ get("Backup/#{id}/mailboxes/#{mailbox_id}")
69
112
  end
70
113
 
71
- # Returns the Exchange and SharePoint auto-discover states (enabled/disabled) of a Backup subscription.
114
+ # Retrieves the auto-discover state (enabled/disabled) for Exchange and SharePoint backups in a subscription.
115
+ # @param id [String] The subscription ID.
116
+ # @return [Hash] Auto-discover states for Exchange and SharePoint.
117
+ # @example Check auto-discover state
118
+ # client.autodiscover('sub123') # => Returns the auto-discover state of the subscription
72
119
  def autodiscover(id)
73
- get("Backup/#{id}/autodiscover")
120
+ get("Backup/#{id}/autodiscover")
74
121
  end
75
122
  end
76
123
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skykick
4
- VERSION = '0.2.2'
4
+ VERSION = '0.3.0'
5
5
  end
data/lib/skykick.rb CHANGED
@@ -15,7 +15,7 @@ module Skykick
15
15
  extend WrAPI::RespondTo
16
16
 
17
17
  # Default API endpoint for the Skykick service.
18
- DEFAULT_ENDPOINT = 'https://apis.skykick.com'
18
+ DEFAULT_ENDPOINT = 'https://apis.cloudservices.connectwise.com'
19
19
 
20
20
  # Default User-Agent header sent with API requests, including gem version information.
21
21
  DEFAULT_UA = "Skykick Ruby API wrapper #{Skykick::VERSION}"
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skykick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janco Tanis
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 2025-03-21 00:00:00.000000000 Z
11
+ date: 2025-09-01 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: faraday
@@ -93,6 +94,7 @@ dependencies:
93
94
  - - ">="
94
95
  - !ruby/object:Gem::Version
95
96
  version: '0'
97
+ description:
96
98
  email: gems@jancology.com
97
99
  executables: []
98
100
  extensions: []
@@ -122,6 +124,7 @@ licenses:
122
124
  metadata:
123
125
  homepage_uri: https://rubygems.org/gems/skykick
124
126
  source_code_uri: https://github.com/jancotanis/skykick
127
+ post_install_message:
125
128
  rdoc_options: []
126
129
  require_paths:
127
130
  - lib
@@ -136,7 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
139
  - !ruby/object:Gem::Version
137
140
  version: '0'
138
141
  requirements: []
139
- rubygems_version: 3.6.2
142
+ rubygems_version: 3.1.6
143
+ signing_key:
140
144
  specification_version: 4
141
145
  summary: A Ruby wrapper for the Skykick backup Portal REST APIs (readonly)
142
146
  test_files: []