segnivo_sdk 1.7.5 → 1.7.14
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 +4 -4
- data/README.md +198 -0
- metadata +14 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fc53b166efc83d9ad70aac90bae6b56c227bc7d1ccf532831ad89d1eeb42102
|
4
|
+
data.tar.gz: 509b62e8e0254fbd733b13fa6ae58ec919fe13389f12d039aa0361db040e9e9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9aae60edc8c947b0570396c4c16f3fe9a9f76d0a87c5fe08466cdcb5ee0eb8c0198b9c92f45aad29b5f446d9a170680db7af5fbb0dcac3852f9e2cd4f69aaca
|
7
|
+
data.tar.gz: 40e2d7cc89171f336e9c11bbd3427b2f9e7665a5ff380ed95eb15a1a61beeaadcfc19478fcc604e01bf7f90295e18565b439853dc23f6544599ec0350af0ba86
|
data/README.md
ADDED
@@ -0,0 +1,198 @@
|
|
1
|
+
# segnivo_sdk
|
2
|
+
|
3
|
+
SegnivoSDK - the Ruby gem for the Segnivo Developer API
|
4
|
+
|
5
|
+
**API Version**: 1.7
|
6
|
+
|
7
|
+
**Date**: 9th July, 2024
|
8
|
+
|
9
|
+
## 📄 Getting Started
|
10
|
+
|
11
|
+
This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.
|
12
|
+
|
13
|
+
Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.
|
14
|
+
|
15
|
+
The API must not be abused and should be used within acceptable limits.
|
16
|
+
|
17
|
+
To start using this API, you will need not create or access an existing Segnivo account to obtain your API key ([retrievable from your account settings](https://messaging.segnivo.com/account/api)).
|
18
|
+
|
19
|
+
- You must use a valid API Key to send requests to the API endpoints.
|
20
|
+
|
21
|
+
- The API only responds to HTTPS-secured communications. Any requests sent via HTTP return an HTTP 301 redirect to the corresponding HTTPS resources.
|
22
|
+
|
23
|
+
- The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key or with details in the message key.
|
24
|
+
|
25
|
+
|
26
|
+
### 🔖 **Need some help?**
|
27
|
+
|
28
|
+
In case you have questions or need clarity with interacting with some endpoints feel free to create a support ticket on your account or you can send an email ([<i>developers@segnivo.com</i>](https://mailto:developers@segnivo.com)) directly and we would be happy to help.
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
## Authentication
|
33
|
+
|
34
|
+
As noted earlier, this API uses API keys for authentication. You can generate a Segnivo API key in the [API](https://messaging.segnivo.com/account/api) section of your account settings.
|
35
|
+
|
36
|
+
You must include an API key in each request to this API with the `X-API-KEY` request header.
|
37
|
+
|
38
|
+
### Authentication error response
|
39
|
+
|
40
|
+
If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.
|
41
|
+
|
42
|
+
## Rate and usage limits
|
43
|
+
|
44
|
+
API access rate limits apply on a per-API endpoint basis in unit time. The limit is 10k requests per hour for most endpoints and 1m requests per hour for transactional/relay email-sending endpoints. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code or HTTP 403 if sending credits have been exhausted.
|
45
|
+
|
46
|
+
### 503 response
|
47
|
+
|
48
|
+
An HTTP `503` response from our servers may indicate there is an unexpected spike in API access traffic, while this rarely happens, we ensure the server is usually operational within the next two to five minutes. If the outage persists or you receive any other form of an HTTP `5XX` error, contact support ([<i>developers@segnivo.com</i>](https://mailto:developers@segnivo.com)).
|
49
|
+
|
50
|
+
### Request headers
|
51
|
+
|
52
|
+
To make a successful request, some or all of the following headers must be passed with the request.
|
53
|
+
|
54
|
+
| **Header** | **Description** |
|
55
|
+
| --- | --- |
|
56
|
+
| Content-Type | Required and should be `application/json` in most cases. |
|
57
|
+
| Accept | Required and should be `application/json` in most cases |
|
58
|
+
| Content-Length | Required for `POST`, `PATCH`, and `PUT` requests containing a request body. The value must be the number of bytes rather than the number of characters in the request body. |
|
59
|
+
| X-API-KEY | Required. Specifies the API key used for authorization. |
|
60
|
+
|
61
|
+
##### 🔖 Note with example requests and code snippets
|
62
|
+
|
63
|
+
If/when you use the code snippets used as example requests, remember to calculate and add the `Content-Length` header. Some request libraries, frameworks, and tools automatically add this header for you while a few do not. Kindly check and ensure yours does or add it yourself.
|
64
|
+
|
65
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
66
|
+
|
67
|
+
- API version: 1.0.0
|
68
|
+
- Package version: 1.7.14
|
69
|
+
- Generator version: 7.10.0
|
70
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
71
|
+
|
72
|
+
## Installation
|
73
|
+
|
74
|
+
### Build a gem
|
75
|
+
|
76
|
+
To build the Ruby code into a gem:
|
77
|
+
|
78
|
+
```shell
|
79
|
+
gem build segnivo_sdk.gemspec
|
80
|
+
```
|
81
|
+
|
82
|
+
Then either install the gem locally:
|
83
|
+
|
84
|
+
```shell
|
85
|
+
gem install ./segnivo_sdk-1.7.14.gem
|
86
|
+
```
|
87
|
+
|
88
|
+
(for development, run `gem install --dev ./segnivo_sdk-1.7.14.gem` to install the development dependencies)
|
89
|
+
|
90
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
91
|
+
|
92
|
+
Finally add this to the Gemfile:
|
93
|
+
|
94
|
+
gem 'segnivo_sdk', '~> 1.7.14'
|
95
|
+
|
96
|
+
### Install from Git
|
97
|
+
|
98
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
99
|
+
|
100
|
+
gem 'segnivo_sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
101
|
+
|
102
|
+
### Include the Ruby code directly
|
103
|
+
|
104
|
+
Include the Ruby code directly using `-I` as follows:
|
105
|
+
|
106
|
+
```shell
|
107
|
+
ruby -Ilib script.rb
|
108
|
+
```
|
109
|
+
|
110
|
+
## Getting Started
|
111
|
+
|
112
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
# Load the gem
|
116
|
+
require 'segnivo_sdk'
|
117
|
+
|
118
|
+
# Setup authorization
|
119
|
+
SegnivoSDK.configure do |config|
|
120
|
+
# Configure API key authorization: apiKeyAuth
|
121
|
+
config.api_key['X-API-KEY'] = 'YOUR API KEY'
|
122
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
123
|
+
# config.api_key_prefix['X-API-KEY'] = 'Bearer'
|
124
|
+
end
|
125
|
+
|
126
|
+
api_instance = SegnivoSDK::EmailAddressVerificationApi.new
|
127
|
+
opts = {
|
128
|
+
email_address_verification_request: SegnivoSDK::EmailAddressVerificationRequest.new # EmailAddressVerificationRequest |
|
129
|
+
}
|
130
|
+
|
131
|
+
begin
|
132
|
+
#Email Address Verification Validation
|
133
|
+
result = api_instance.validate_email_post(opts)
|
134
|
+
p result
|
135
|
+
rescue SegnivoSDK::ApiError => e
|
136
|
+
puts "Exception when calling EmailAddressVerificationApi->validate_email_post: #{e}"
|
137
|
+
end
|
138
|
+
|
139
|
+
```
|
140
|
+
|
141
|
+
## Documentation for API Endpoints
|
142
|
+
|
143
|
+
All URIs are relative to *https://api.segnivo.com/v1*
|
144
|
+
|
145
|
+
Class | Method | HTTP request | Description
|
146
|
+
------------ | ------------- | ------------- | -------------
|
147
|
+
*SegnivoSDK::EmailAddressVerificationApi* | [**validate_email_post**](docs/EmailAddressVerificationApi.md#validate_email_post) | **POST** /validate-email | Email Address Verification Validation
|
148
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_get**](docs/EmailCampaignsApi.md#messages_get) | **GET** /messages | Get campaigns
|
149
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_post**](docs/EmailCampaignsApi.md#messages_post) | **POST** /messages | Create a Campaign
|
150
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_uid_delete_post**](docs/EmailCampaignsApi.md#messages_uid_delete_post) | **POST** /messages/{uid}/delete | Delete a campaign
|
151
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_uid_get**](docs/EmailCampaignsApi.md#messages_uid_get) | **GET** /messages/{uid} | Get a campaign
|
152
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_uid_patch**](docs/EmailCampaignsApi.md#messages_uid_patch) | **PATCH** /messages/{uid} | Update Campaign
|
153
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_uid_pause_post**](docs/EmailCampaignsApi.md#messages_uid_pause_post) | **POST** /messages/{uid}/pause | Pause a campaign
|
154
|
+
*SegnivoSDK::EmailCampaignsApi* | [**messages_uid_resume_post**](docs/EmailCampaignsApi.md#messages_uid_resume_post) | **POST** /messages/{uid}/resume | Resume the delivery of a campaign
|
155
|
+
*SegnivoSDK::MailingListsApi* | [**lists_get**](docs/MailingListsApi.md#lists_get) | **GET** /lists | Get mailing lists
|
156
|
+
*SegnivoSDK::MailingListsApi* | [**lists_post**](docs/MailingListsApi.md#lists_post) | **POST** /lists | Create a Mailing List
|
157
|
+
*SegnivoSDK::MailingListsApi* | [**lists_uid_add_field_post**](docs/MailingListsApi.md#lists_uid_add_field_post) | **POST** /lists/{uid}/add-field | Add a field
|
158
|
+
*SegnivoSDK::MailingListsApi* | [**lists_uid_delete_post**](docs/MailingListsApi.md#lists_uid_delete_post) | **POST** /lists/{uid}/delete | Delete a list
|
159
|
+
*SegnivoSDK::MailingListsApi* | [**lists_uid_get**](docs/MailingListsApi.md#lists_uid_get) | **GET** /lists/{uid} | Get a list
|
160
|
+
*SegnivoSDK::MailingListsApi* | [**lists_uid_patch**](docs/MailingListsApi.md#lists_uid_patch) | **PATCH** /lists/{uid} | Update a List
|
161
|
+
*SegnivoSDK::RelayApi* | [**relay_emails_id_get**](docs/RelayApi.md#relay_emails_id_get) | **GET** /relay/emails/{id} | Fetch Emails
|
162
|
+
*SegnivoSDK::RelayApi* | [**relay_raw_post**](docs/RelayApi.md#relay_raw_post) | **POST** /relay/raw | Send a Raw Email Message
|
163
|
+
*SegnivoSDK::RelayTransactionalEmailsApi* | [**relay_send_post**](docs/RelayTransactionalEmailsApi.md#relay_send_post) | **POST** /relay/send | Send an Email
|
164
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_get**](docs/SubscribersContactsApi.md#contacts_get) | **GET** /contacts | Get contacts
|
165
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_post**](docs/SubscribersContactsApi.md#contacts_post) | **POST** /contacts | Add a Contact
|
166
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_add_tag_post**](docs/SubscribersContactsApi.md#contacts_uid_add_tag_post) | **POST** /contacts/{uid}/add-tag | Add tags to a contact
|
167
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_delete_post**](docs/SubscribersContactsApi.md#contacts_uid_delete_post) | **POST** /contacts/{uid}/delete | Delete a contact
|
168
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_get**](docs/SubscribersContactsApi.md#contacts_uid_get) | **GET** /contacts/{uid} | Get a contact
|
169
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_patch**](docs/SubscribersContactsApi.md#contacts_uid_patch) | **PATCH** /contacts/{uid} | Update Contact
|
170
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_subscribe_patch**](docs/SubscribersContactsApi.md#contacts_uid_subscribe_patch) | **PATCH** /contacts/{uid}/subscribe | Subscribe a contact
|
171
|
+
*SegnivoSDK::SubscribersContactsApi* | [**contacts_uid_unsubscribe_patch**](docs/SubscribersContactsApi.md#contacts_uid_unsubscribe_patch) | **PATCH** /contacts/{uid}/unsubscribe | Unsubscribe a contact
|
172
|
+
|
173
|
+
|
174
|
+
## Documentation for Models
|
175
|
+
|
176
|
+
- [SegnivoSDK::AddContactRequest](docs/AddContactRequest.md)
|
177
|
+
- [SegnivoSDK::CampaignCreateRequest](docs/CampaignCreateRequest.md)
|
178
|
+
- [SegnivoSDK::CampaignUpdateRequest](docs/CampaignUpdateRequest.md)
|
179
|
+
- [SegnivoSDK::ContactUpdateRequest](docs/ContactUpdateRequest.md)
|
180
|
+
- [SegnivoSDK::ContactsUidAddTagPostRequest](docs/ContactsUidAddTagPostRequest.md)
|
181
|
+
- [SegnivoSDK::EmailAddressVerificationRequest](docs/EmailAddressVerificationRequest.md)
|
182
|
+
- [SegnivoSDK::MailingListAddFieldRequest](docs/MailingListAddFieldRequest.md)
|
183
|
+
- [SegnivoSDK::MailingListRequest](docs/MailingListRequest.md)
|
184
|
+
- [SegnivoSDK::MailingListRequestContact](docs/MailingListRequestContact.md)
|
185
|
+
- [SegnivoSDK::RelayEmailRequest](docs/RelayEmailRequest.md)
|
186
|
+
|
187
|
+
|
188
|
+
## Documentation for Authorization
|
189
|
+
|
190
|
+
|
191
|
+
Authentication schemes defined for the API:
|
192
|
+
### apiKeyAuth
|
193
|
+
|
194
|
+
|
195
|
+
- **Type**: API key
|
196
|
+
- **API key parameter name**: X-API-KEY
|
197
|
+
- **Location**: HTTP header
|
198
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: segnivo_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Segnivo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -50,26 +50,31 @@ dependencies:
|
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 3.6.0
|
53
|
-
description: Segnivo
|
53
|
+
description: Official Ruby SDK for the Segnivo API. Manage messages, campaigns, and
|
54
|
+
more.
|
54
55
|
email:
|
55
56
|
- developers@segnivo.com
|
56
57
|
executables: []
|
57
58
|
extensions: []
|
58
|
-
extra_rdoc_files:
|
59
|
-
|
59
|
+
extra_rdoc_files:
|
60
|
+
- README.md
|
61
|
+
files:
|
62
|
+
- README.md
|
60
63
|
homepage: https://github.com/munchads/ruby-sdk
|
61
64
|
licenses:
|
62
65
|
- MIT
|
63
66
|
metadata:
|
64
67
|
documentation_uri: https://docs.segnivo.com
|
65
|
-
source_code_uri: https://github.com/munchads/
|
68
|
+
source_code_uri: https://github.com/munchads/segnivo-sdk/sdk-ruby
|
69
|
+
readme_uri: https://github.com/munchads/segnivo-sdk/sdk-ruby/blob/main/README.md
|
66
70
|
post_install_message:
|
67
|
-
rdoc_options:
|
71
|
+
rdoc_options:
|
72
|
+
- "--charset=UTF-8"
|
68
73
|
require_paths:
|
69
74
|
- lib
|
70
75
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
76
|
requirements:
|
72
|
-
- -
|
77
|
+
- - ">="
|
73
78
|
- !ruby/object:Gem::Version
|
74
79
|
version: '2.7'
|
75
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -81,5 +86,5 @@ requirements: []
|
|
81
86
|
rubygems_version: 3.5.22
|
82
87
|
signing_key:
|
83
88
|
specification_version: 4
|
84
|
-
summary: Segnivo
|
89
|
+
summary: Segnivo API Ruby SDK
|
85
90
|
test_files: []
|