agentcat-api 0.0.2 → 0.0.4

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: 52e68f69b6df580017a5fcc27ca413bc0f93fbcce6c6dfe544b253921a9ba136
4
- data.tar.gz: 971ec413f37b89def36bac8d203243b279cff39af5406ec86317efafc465bf41
3
+ metadata.gz: c44f067b368b15d59a06bad1d9b46b53803443f2576c24e93171f84f484c8030
4
+ data.tar.gz: bf2d93a296638b69aa7e07b35f84ec13cf849f9e5c5ab24680e40064f3989b3c
5
5
  SHA512:
6
- metadata.gz: d3bc7021a22563f40049948a73810096df6ffe72cdf97ab9543596cf63b213c645ad12e51ddb00e287f1bef4d707d437f2c9743b79d62f3417a33f92c55d8daf
7
- data.tar.gz: afdd2d5f7605354efbf8b976570c13cce2805db2525bce87edde6217d2ed005d71bc59c57eaeb2bb3ef487df5af3b44de5adc83fcb4c072d2fbe47d734d4c0e9
6
+ metadata.gz: 2685e4443f5ab8e1863ee5508f5f7a91078c9143ced82b58be220adb30112b03ca3769cbaa4a630f99166fd8c47233c82977959736a1f661a315848de729f517
7
+ data.tar.gz: 40eb1dd3a4a0f0f1b03619ac6d1f7bad5f48a52ea8f25a704690e5ed920fb94ed71c93b18f18400208c820a90b5293c53c138672a75c5dc7b8c41ea6786c4b25
data/README.md CHANGED
@@ -7,7 +7,7 @@ API for AgentCat application
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 0.0.2
10
+ - Package version: 0.0.4
11
11
  - Generator version: 7.14.0
12
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
13
 
@@ -24,16 +24,16 @@ gem build agentcat-api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./agentcat-api-0.0.2.gem
27
+ gem install ./agentcat-api-0.0.4.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./agentcat-api-0.0.2.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./agentcat-api-0.0.4.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'agentcat-api', '~> 0.0.2'
36
+ gem 'agentcat-api', '~> 0.0.4'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -57,27 +57,17 @@ Please follow the [installation](#installation) procedure and then run the follo
57
57
  # Load the gem
58
58
  require 'agentcat-api'
59
59
 
60
- # Setup authorization
61
- AgentCatApi.configure do |config|
62
- # Configure API key authorization: tokenAuth
63
- config.api_key['Authorization'] = 'YOUR API KEY'
64
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
65
- # config.api_key_prefix['Authorization'] = 'Bearer'
66
- # Configure faraday connection
67
- config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
68
- end
69
-
70
- api_instance = AgentCatApi::EventsApi.new
60
+ api_instance = AgentCatApi::AlertsApi.new
71
61
  opts = {
72
- publish_event_request: AgentCatApi::PublishEventRequest.new({project_id: 'project_id_example'}) # PublishEventRequest |
62
+ token: 'token_example' # String |
73
63
  }
74
64
 
75
65
  begin
76
- #Publish analytics event
77
- result = api_instance.publish_event(opts)
66
+ #Show the confirmation page for removing an email address from one alert rule
67
+ result = api_instance.unsubscribe_alert_get(opts)
78
68
  p result
79
69
  rescue AgentCatApi::ApiError => e
80
- puts "Exception when calling EventsApi->publish_event: #{e}"
70
+ puts "Exception when calling AlertsApi->unsubscribe_alert_get: #{e}"
81
71
  end
82
72
 
83
73
  ```
@@ -88,16 +78,24 @@ All URIs are relative to *https://api.agentcat.com*
88
78
 
89
79
  Class | Method | HTTP request | Description
90
80
  ------------ | ------------- | ------------- | -------------
81
+ *AgentCatApi::AlertsApi* | [**unsubscribe_alert_get**](docs/AlertsApi.md#unsubscribe_alert_get) | **GET** /v1/public/alerts/unsubscribe | Show the confirmation page for removing an email address from one alert rule
82
+ *AgentCatApi::AlertsApi* | [**unsubscribe_alert_post**](docs/AlertsApi.md#unsubscribe_alert_post) | **POST** /v1/public/alerts/unsubscribe | Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
91
83
  *AgentCatApi::EventsApi* | [**publish_event**](docs/EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event
92
84
  *AgentCatApi::NotificationsApi* | [**unsubscribe_notification**](docs/NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token's user
85
+ *AgentCatApi::NotificationsApi* | [**verify_email_channel**](docs/NotificationsApi.md#verify_email_channel) | **POST** /v1/public/notifications/channels/verify | Activate an email channel from its verification link
86
+ *AgentCatApi::ServerInfoApi* | [**publish_server_info**](docs/ServerInfoApi.md#publish_server_info) | **POST** /v1/public/server-info/ | Publish MCP server info
93
87
 
94
88
 
95
89
  ## Documentation for Models
96
90
 
91
+ - [AgentCatApi::EmailChannelVerifyRequest](docs/EmailChannelVerifyRequest.md)
92
+ - [AgentCatApi::EmailChannelVerifyResponse](docs/EmailChannelVerifyResponse.md)
97
93
  - [AgentCatApi::Error](docs/Error.md)
98
94
  - [AgentCatApi::EventAcceptedResponse](docs/EventAcceptedResponse.md)
99
95
  - [AgentCatApi::PublishEventRequest](docs/PublishEventRequest.md)
96
+ - [AgentCatApi::PublishServerInfoRequest](docs/PublishServerInfoRequest.md)
100
97
  - [AgentCatApi::QueryTimeout](docs/QueryTimeout.md)
98
+ - [AgentCatApi::ServerInfoAcceptedResponse](docs/ServerInfoAcceptedResponse.md)
101
99
  - [AgentCatApi::UnsubscribeRequestRequest](docs/UnsubscribeRequestRequest.md)
102
100
  - [AgentCatApi::ValidationErrorValue](docs/ValidationErrorValue.md)
103
101
 
data/docs/AlertsApi.md ADDED
@@ -0,0 +1,141 @@
1
+ # AgentCatApi::AlertsApi
2
+
3
+ All URIs are relative to *https://api.agentcat.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**unsubscribe_alert_get**](AlertsApi.md#unsubscribe_alert_get) | **GET** /v1/public/alerts/unsubscribe | Show the confirmation page for removing an email address from one alert rule |
8
+ | [**unsubscribe_alert_post**](AlertsApi.md#unsubscribe_alert_post) | **POST** /v1/public/alerts/unsubscribe | Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form) |
9
+
10
+
11
+ ## unsubscribe_alert_get
12
+
13
+ > String unsubscribe_alert_get(opts)
14
+
15
+ Show the confirmation page for removing an email address from one alert rule
16
+
17
+ GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'agentcat-api'
24
+
25
+ api_instance = AgentCatApi::AlertsApi.new
26
+ opts = {
27
+ token: 'token_example' # String |
28
+ }
29
+
30
+ begin
31
+ # Show the confirmation page for removing an email address from one alert rule
32
+ result = api_instance.unsubscribe_alert_get(opts)
33
+ p result
34
+ rescue AgentCatApi::ApiError => e
35
+ puts "Error when calling AlertsApi->unsubscribe_alert_get: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the unsubscribe_alert_get_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(String, Integer, Hash)> unsubscribe_alert_get_with_http_info(opts)
44
+
45
+ ```ruby
46
+ begin
47
+ # Show the confirmation page for removing an email address from one alert rule
48
+ data, status_code, headers = api_instance.unsubscribe_alert_get_with_http_info(opts)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => String
52
+ rescue AgentCatApi::ApiError => e
53
+ puts "Error when calling AlertsApi->unsubscribe_alert_get_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **token** | **String** | | [optional] |
62
+
63
+ ### Return type
64
+
65
+ **String**
66
+
67
+ ### Authorization
68
+
69
+ No authorization required
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: Not defined
74
+ - **Accept**: text/html, text/plain, application/json
75
+
76
+
77
+ ## unsubscribe_alert_post
78
+
79
+ > String unsubscribe_alert_post(opts)
80
+
81
+ Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
82
+
83
+ GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
84
+
85
+ ### Examples
86
+
87
+ ```ruby
88
+ require 'time'
89
+ require 'agentcat-api'
90
+
91
+ api_instance = AgentCatApi::AlertsApi.new
92
+ opts = {
93
+ token: 'token_example' # String |
94
+ }
95
+
96
+ begin
97
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
98
+ result = api_instance.unsubscribe_alert_post(opts)
99
+ p result
100
+ rescue AgentCatApi::ApiError => e
101
+ puts "Error when calling AlertsApi->unsubscribe_alert_post: #{e}"
102
+ end
103
+ ```
104
+
105
+ #### Using the unsubscribe_alert_post_with_http_info variant
106
+
107
+ This returns an Array which contains the response data, status code and headers.
108
+
109
+ > <Array(String, Integer, Hash)> unsubscribe_alert_post_with_http_info(opts)
110
+
111
+ ```ruby
112
+ begin
113
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
114
+ data, status_code, headers = api_instance.unsubscribe_alert_post_with_http_info(opts)
115
+ p status_code # => 2xx
116
+ p headers # => { ... }
117
+ p data # => String
118
+ rescue AgentCatApi::ApiError => e
119
+ puts "Error when calling AlertsApi->unsubscribe_alert_post_with_http_info: #{e}"
120
+ end
121
+ ```
122
+
123
+ ### Parameters
124
+
125
+ | Name | Type | Description | Notes |
126
+ | ---- | ---- | ----------- | ----- |
127
+ | **token** | **String** | | [optional] |
128
+
129
+ ### Return type
130
+
131
+ **String**
132
+
133
+ ### Authorization
134
+
135
+ No authorization required
136
+
137
+ ### HTTP request headers
138
+
139
+ - **Content-Type**: Not defined
140
+ - **Accept**: text/plain, application/json
141
+
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::EmailChannelVerifyRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **token** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ instance = AgentCatApi::EmailChannelVerifyRequest.new(
15
+ token: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # AgentCatApi::EmailChannelVerifyResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | |
8
+ | **channel_id** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'agentcat-api'
14
+
15
+ instance = AgentCatApi::EmailChannelVerifyResponse.new(
16
+ success: null,
17
+ channel_id: null
18
+ )
19
+ ```
20
+
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.agentcat.com*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**unsubscribe_notification**](NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token&#39;s user |
8
+ | [**verify_email_channel**](NotificationsApi.md#verify_email_channel) | **POST** /v1/public/notifications/channels/verify | Activate an email channel from its verification link |
8
9
 
9
10
 
10
11
  ## unsubscribe_notification
@@ -74,3 +75,69 @@ No authorization required
74
75
  - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
75
76
  - **Accept**: text/plain, application/json
76
77
 
78
+
79
+ ## verify_email_channel
80
+
81
+ > <EmailChannelVerifyResponse> verify_email_channel(opts)
82
+
83
+ Activate an email channel from its verification link
84
+
85
+ ### Examples
86
+
87
+ ```ruby
88
+ require 'time'
89
+ require 'agentcat-api'
90
+
91
+ api_instance = AgentCatApi::NotificationsApi.new
92
+ opts = {
93
+ token: 'token_example', # String |
94
+ email_channel_verify_request: AgentCatApi::EmailChannelVerifyRequest.new # EmailChannelVerifyRequest |
95
+ }
96
+
97
+ begin
98
+ # Activate an email channel from its verification link
99
+ result = api_instance.verify_email_channel(opts)
100
+ p result
101
+ rescue AgentCatApi::ApiError => e
102
+ puts "Error when calling NotificationsApi->verify_email_channel: #{e}"
103
+ end
104
+ ```
105
+
106
+ #### Using the verify_email_channel_with_http_info variant
107
+
108
+ This returns an Array which contains the response data, status code and headers.
109
+
110
+ > <Array(<EmailChannelVerifyResponse>, Integer, Hash)> verify_email_channel_with_http_info(opts)
111
+
112
+ ```ruby
113
+ begin
114
+ # Activate an email channel from its verification link
115
+ data, status_code, headers = api_instance.verify_email_channel_with_http_info(opts)
116
+ p status_code # => 2xx
117
+ p headers # => { ... }
118
+ p data # => <EmailChannelVerifyResponse>
119
+ rescue AgentCatApi::ApiError => e
120
+ puts "Error when calling NotificationsApi->verify_email_channel_with_http_info: #{e}"
121
+ end
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+ | Name | Type | Description | Notes |
127
+ | ---- | ---- | ----------- | ----- |
128
+ | **token** | **String** | | [optional] |
129
+ | **email_channel_verify_request** | [**EmailChannelVerifyRequest**](EmailChannelVerifyRequest.md) | | [optional] |
130
+
131
+ ### Return type
132
+
133
+ [**EmailChannelVerifyResponse**](EmailChannelVerifyResponse.md)
134
+
135
+ ### Authorization
136
+
137
+ No authorization required
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
142
+ - **Accept**: application/json
143
+
@@ -14,6 +14,8 @@
14
14
  | **error** | **Object** | Error details if is_error is true | [optional] |
15
15
  | **resource_name** | **String** | Name of the resource accessed (for resource events) | [optional] |
16
16
  | **duration** | **Integer** | Duration of the operation in milliseconds | [optional] |
17
+ | **input_tokens** | **Integer** | Token count of the request side as measured by the SDK. When absent, the server estimates it from the stored parameters. | [optional] |
18
+ | **output_tokens** | **Integer** | Token count of the response side as measured by the SDK. When absent, the server estimates it from the stored response. Drives the oversized-tool-response rule. | [optional] |
17
19
  | **timestamp** | **Time** | Agent-provided timestamp of when the event occurred | [optional] |
18
20
  | **user_intent** | **String** | Captured explanation of why the actor made this request | [optional] |
19
21
  | **parameters** | **Object** | Parameters sent with the request | [optional] |
@@ -47,6 +49,8 @@ instance = AgentCatApi::PublishEventRequest.new(
47
49
  error: null,
48
50
  resource_name: null,
49
51
  duration: null,
52
+ input_tokens: null,
53
+ output_tokens: null,
50
54
  timestamp: null,
51
55
  user_intent: null,
52
56
  parameters: null,
@@ -0,0 +1,28 @@
1
+ # AgentCatApi::PublishServerInfoRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **project_id** | **String** | ID of the project that the MCP server reports to. | |
8
+ | **server_name** | **String** | Name of the MCP server. Send the same value as server_name on events. | [optional] |
9
+ | **server_version** | **String** | Version of the MCP server, as on events. | [optional] |
10
+ | **server_title** | **String** | Display title of the MCP server. | [optional] |
11
+ | **instructions** | **String** | Instructions that the MCP server gives to agents. AgentCat keeps the first 100,000 characters. | [optional] |
12
+ | **features** | **Object** | What the MCP server offers to agents. Each key is a list type of the MCP specification (tools, resources, resourceTemplates, prompts) with the items as the server lists them. Send every item with its full description. AgentCat stores keys that it does not know. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'agentcat-api'
18
+
19
+ instance = AgentCatApi::PublishServerInfoRequest.new(
20
+ project_id: null,
21
+ server_name: null,
22
+ server_version: null,
23
+ server_title: null,
24
+ instructions: null,
25
+ features: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,18 @@
1
+ # AgentCatApi::ServerInfoAcceptedResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | | [optional][default to &#39;accepted&#39;] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'agentcat-api'
13
+
14
+ instance = AgentCatApi::ServerInfoAcceptedResponse.new(
15
+ status: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,74 @@
1
+ # AgentCatApi::ServerInfoApi
2
+
3
+ All URIs are relative to *https://api.agentcat.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**publish_server_info**](ServerInfoApi.md#publish_server_info) | **POST** /v1/public/server-info/ | Publish MCP server info |
8
+
9
+
10
+ ## publish_server_info
11
+
12
+ > <ServerInfoAcceptedResponse> publish_server_info(opts)
13
+
14
+ Publish MCP server info
15
+
16
+ Tell AgentCat what an MCP server offers to agents: its name, version, title, instructions and its lists of tools, resources, resource templates and prompts. Send it when the server starts and then once an hour. The body can hold 1,000,000 bytes at most. AgentCat counts each non-ASCII character as 6 bytes, and an emoji as 12 bytes. AgentCat keeps one row per server name per day and drops repeats. Returns immediately with 202 Accepted.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'agentcat-api'
23
+
24
+ api_instance = AgentCatApi::ServerInfoApi.new
25
+ opts = {
26
+ publish_server_info_request: AgentCatApi::PublishServerInfoRequest.new({project_id: 'project_id_example'}) # PublishServerInfoRequest |
27
+ }
28
+
29
+ begin
30
+ # Publish MCP server info
31
+ result = api_instance.publish_server_info(opts)
32
+ p result
33
+ rescue AgentCatApi::ApiError => e
34
+ puts "Error when calling ServerInfoApi->publish_server_info: #{e}"
35
+ end
36
+ ```
37
+
38
+ #### Using the publish_server_info_with_http_info variant
39
+
40
+ This returns an Array which contains the response data, status code and headers.
41
+
42
+ > <Array(<ServerInfoAcceptedResponse>, Integer, Hash)> publish_server_info_with_http_info(opts)
43
+
44
+ ```ruby
45
+ begin
46
+ # Publish MCP server info
47
+ data, status_code, headers = api_instance.publish_server_info_with_http_info(opts)
48
+ p status_code # => 2xx
49
+ p headers # => { ... }
50
+ p data # => <ServerInfoAcceptedResponse>
51
+ rescue AgentCatApi::ApiError => e
52
+ puts "Error when calling ServerInfoApi->publish_server_info_with_http_info: #{e}"
53
+ end
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ | Name | Type | Description | Notes |
59
+ | ---- | ---- | ----------- | ----- |
60
+ | **publish_server_info_request** | [**PublishServerInfoRequest**](PublishServerInfoRequest.md) | | [optional] |
61
+
62
+ ### Return type
63
+
64
+ [**ServerInfoAcceptedResponse**](ServerInfoAcceptedResponse.md)
65
+
66
+ ### Authorization
67
+
68
+ No authorization required
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: application/json
74
+
@@ -0,0 +1,142 @@
1
+ =begin
2
+ #AgentCat API
3
+
4
+ #API for AgentCat application
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module AgentCatApi
16
+ class AlertsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Show the confirmation page for removing an email address from one alert rule
23
+ # GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :token
26
+ # @return [String]
27
+ def unsubscribe_alert_get(opts = {})
28
+ data, _status_code, _headers = unsubscribe_alert_get_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Show the confirmation page for removing an email address from one alert rule
33
+ # GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page&#39;s form and the List-Unsubscribe-Post header both send it. POST is idempotent.
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :token
36
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
37
+ def unsubscribe_alert_get_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AlertsApi.unsubscribe_alert_get ...'
40
+ end
41
+ # resource path
42
+ local_var_path = '/v1/public/alerts/unsubscribe'
43
+
44
+ # query parameters
45
+ query_params = opts[:query_params] || {}
46
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
47
+
48
+ # header parameters
49
+ header_params = opts[:header_params] || {}
50
+ # HTTP header 'Accept' (if needed)
51
+ header_params['Accept'] = @api_client.select_header_accept(['text/html', 'text/plain', 'application/json']) unless header_params['Accept']
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:debug_body]
58
+
59
+ # return_type
60
+ return_type = opts[:debug_return_type] || 'String'
61
+
62
+ # auth_names
63
+ auth_names = opts[:debug_auth_names] || []
64
+
65
+ new_options = opts.merge(
66
+ :operation => :"AlertsApi.unsubscribe_alert_get",
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => return_type
73
+ )
74
+
75
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: AlertsApi#unsubscribe_alert_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
78
+ end
79
+ return data, status_code, headers
80
+ end
81
+
82
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
83
+ # GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page's form and the List-Unsubscribe-Post header both send it. POST is idempotent.
84
+ # @param [Hash] opts the optional parameters
85
+ # @option opts [String] :token
86
+ # @return [String]
87
+ def unsubscribe_alert_post(opts = {})
88
+ data, _status_code, _headers = unsubscribe_alert_post_with_http_info(opts)
89
+ data
90
+ end
91
+
92
+ # Remove an email address from one alert rule (List-Unsubscribe-Post and the confirmation form)
93
+ # GET, the link in the email, shows a confirmation page and changes nothing, because mail scanners fetch links. POST removes the address from the rule; the page&#39;s form and the List-Unsubscribe-Post header both send it. POST is idempotent.
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [String] :token
96
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
97
+ def unsubscribe_alert_post_with_http_info(opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: AlertsApi.unsubscribe_alert_post ...'
100
+ end
101
+ # resource path
102
+ local_var_path = '/v1/public/alerts/unsubscribe'
103
+
104
+ # query parameters
105
+ query_params = opts[:query_params] || {}
106
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json']) unless header_params['Accept']
112
+
113
+ # form parameters
114
+ form_params = opts[:form_params] || {}
115
+
116
+ # http body (model)
117
+ post_body = opts[:debug_body]
118
+
119
+ # return_type
120
+ return_type = opts[:debug_return_type] || 'String'
121
+
122
+ # auth_names
123
+ auth_names = opts[:debug_auth_names] || []
124
+
125
+ new_options = opts.merge(
126
+ :operation => :"AlertsApi.unsubscribe_alert_post",
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => return_type
133
+ )
134
+
135
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "API called: AlertsApi#unsubscribe_alert_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
138
+ end
139
+ return data, status_code, headers
140
+ end
141
+ end
142
+ end