Skip to content

Commit d1b3fcf

Browse files
committed
updater
1 parent 6c0f71e commit d1b3fcf

23 files changed

Lines changed: 1573 additions & 0 deletions

openapi-client/crystal/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Generated by: https://openapi-generator.tech
2+
#
3+
4+
/docs/
5+
/lib/
6+
/bin/
7+
/.shards/
8+
*.dwarf
9+
10+
# Libraries don't need dependency lock
11+
# Dependencies will be locked in applications that use them
12+
/shard.lock
13+
14+
/tmp/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.gitignore
2+
.openapi-generator-ignore
3+
.travis.yml
4+
README.md
5+
git_push.sh
6+
shard.yml
7+
spec/api/blocking_api_spec.cr
8+
spec/api/history_api_spec.cr
9+
spec/api/sending_api_spec.cr
10+
spec/api/services_api_spec.cr
11+
spec/api/status_api_spec.cr
12+
spec/models/deny_rule_new_spec.cr
13+
spec/models/deny_rule_record_spec.cr
14+
spec/models/email_address_name_spec.cr
15+
spec/models/email_address_types_spec.cr
16+
spec/models/email_addresses_types_spec.cr
17+
spec/models/error_message_spec.cr
18+
spec/models/generic_response_spec.cr
19+
spec/models/mail_attachment_spec.cr
20+
spec/models/mail_block_click_house_spec.cr
21+
spec/models/mail_block_rspamd_spec.cr
22+
spec/models/mail_blocks_spec.cr
23+
spec/models/mail_log_entry_spec.cr
24+
spec/models/mail_log_spec.cr
25+
spec/models/mail_order_spec.cr
26+
spec/models/mail_stats_type_spec.cr
27+
spec/models/mail_stats_type_volume_from_spec.cr
28+
spec/models/mail_stats_type_volume_ip_spec.cr
29+
spec/models/mail_stats_type_volume_spec.cr
30+
spec/models/mail_stats_type_volume_to_spec.cr
31+
spec/models/send_mail_adv_spec.cr
32+
spec/models/send_mail_raw_spec.cr
33+
spec/models/send_mail_spec.cr
34+
spec/spec_helper.cr
35+
src/openapi_client.cr
36+
src/openapi_client/api/blocking_api.cr
37+
src/openapi_client/api/history_api.cr
38+
src/openapi_client/api/sending_api.cr
39+
src/openapi_client/api/services_api.cr
40+
src/openapi_client/api/status_api.cr
41+
src/openapi_client/api_client.cr
42+
src/openapi_client/api_error.cr
43+
src/openapi_client/configuration.cr
44+
src/openapi_client/models/deny_rule_new.cr
45+
src/openapi_client/models/deny_rule_record.cr
46+
src/openapi_client/models/email_address_name.cr
47+
src/openapi_client/models/email_address_types.cr
48+
src/openapi_client/models/email_addresses_types.cr
49+
src/openapi_client/models/error_message.cr
50+
src/openapi_client/models/generic_response.cr
51+
src/openapi_client/models/mail_attachment.cr
52+
src/openapi_client/models/mail_block_click_house.cr
53+
src/openapi_client/models/mail_block_rspamd.cr
54+
src/openapi_client/models/mail_blocks.cr
55+
src/openapi_client/models/mail_log.cr
56+
src/openapi_client/models/mail_log_entry.cr
57+
src/openapi_client/models/mail_order.cr
58+
src/openapi_client/models/mail_stats_type.cr
59+
src/openapi_client/models/mail_stats_type_volume.cr
60+
src/openapi_client/models/mail_stats_type_volume_from.cr
61+
src/openapi_client/models/mail_stats_type_volume_ip.cr
62+
src/openapi_client/models/mail_stats_type_volume_to.cr
63+
src/openapi_client/models/send_mail.cr
64+
src/openapi_client/models/send_mail_adv.cr
65+
src/openapi_client/models/send_mail_raw.cr
66+
src/openapi_client/recursive_hash.cr
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.18.0

openapi-client/crystal/.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# #MailBaby Email Delivery and Management Service API
2+
#
3+
##**Send emails fast and with confidence through our easy to use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API interface.** # Overview This is the API interface to the [Mail Baby](https//mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net). # Authentication In order to use most of the API calls you must pass credentials from the [my.interserver.net](https://my.interserver.net/) site. We support several different authentication methods but the preferred method is to use the **API Key** which you can get from the [Account Security](https://my.interserver.net/account_security) page.
4+
#
5+
#The version of the OpenAPI document: 1.3.0
6+
#Contact: support@interserver.net
7+
#Generated by: https://openapi-generator.tech
8+
#Generator version: 7.18.0
9+
#
10+
11+
language: crystal
12+
13+
script:
14+
- crystal spec
15+
# uncomment below to check the code format
16+
# - crystal tool format --check

openapi-client/crystal/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# openapi_client
2+
3+
The Crystal module for the MailBaby Email Delivery and Management Service API
4+
5+
**Send emails fast and with confidence through our easy to use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API interface.**
6+
# Overview
7+
This is the API interface to the [Mail Baby](https//mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net).
8+
# Authentication
9+
In order to use most of the API calls you must pass credentials from the [my.interserver.net](https://my.interserver.net/) site.
10+
We support several different authentication methods but the preferred method is to use the **API Key** which you can get from the [Account Security](https://my.interserver.net/account_security) page.
11+
12+
13+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
14+
15+
- API version: 1.3.0
16+
- Package version: 1.0.0
17+
- Generator version: 7.18.0
18+
- Build package: org.openapitools.codegen.languages.CrystalClientCodegen
19+
For more information, please visit [https://www.mail.baby/contact/](https://www.mail.baby/contact/)
20+
21+
## Installation
22+
23+
### Install from Git
24+
25+
Add the following to shard.yaml
26+
27+
```yaml
28+
dependencies:
29+
openapi_client:
30+
github: GIT_USER_ID/GIT_REPO_ID
31+
version: ~> 1.0.0
32+
```
33+
34+
## Development
35+
36+
Install dependencies
37+
38+
```shell
39+
shards
40+
```
41+
42+
Run the tests:
43+
44+
```shell
45+
crystal spec
46+
```

openapi-client/crystal/git_push.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/sh
2+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3+
#
4+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5+
6+
git_user_id=$1
7+
git_repo_id=$2
8+
release_note=$3
9+
git_host=$4
10+
11+
if [ "$git_host" = "" ]; then
12+
git_host="github.com"
13+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14+
fi
15+
16+
if [ "$git_user_id" = "" ]; then
17+
git_user_id="GIT_USER_ID"
18+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19+
fi
20+
21+
if [ "$git_repo_id" = "" ]; then
22+
git_repo_id="GIT_REPO_ID"
23+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24+
fi
25+
26+
if [ "$release_note" = "" ]; then
27+
release_note="Minor update"
28+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29+
fi
30+
31+
# Initialize the local directory as a Git repository
32+
git init
33+
34+
# Adds the files in the local repository and stages them for commit.
35+
git add .
36+
37+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
38+
git commit -m "$release_note"
39+
40+
# Sets the new remote
41+
git_remote=$(git remote)
42+
if [ "$git_remote" = "" ]; then # git remote not defined
43+
44+
if [ "$GIT_TOKEN" = "" ]; then
45+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47+
else
48+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49+
fi
50+
51+
fi
52+
53+
git pull origin master
54+
55+
# Pushes (Forces) the changes in the local repository up to the remote repository
56+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57+
git push origin master 2>&1 | grep -v 'To https'

openapi-client/crystal/shard.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: openapi_client
2+
version: 1.0.0
3+
authors:
4+
-
5+
description: |
6+
- This shard maps to a REST API
7+
crystal: ">= 0.35.1"
8+
dependencies:
9+
any_hash:
10+
github: Sija/any_hash.cr
11+
crest:
12+
github: mamantoha/crest
13+
version: ~> 1.3.13
14+
15+
development_dependencies:
16+
kemal:
17+
github: kemalcr/kemal
18+
version: ~>1.5.0
19+
ameba:
20+
github: crystal-ameba/ameba
21+
spectator:
22+
gitlab: arctic-fox/spectator
23+
version: ~> 0.12.0
24+
25+
license: unlicense
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# #MailBaby Email Delivery and Management Service API
2+
#
3+
##**Send emails fast and with confidence through our easy to use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API interface.** # Overview This is the API interface to the [Mail Baby](https//mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net). # Authentication In order to use most of the API calls you must pass credentials from the [my.interserver.net](https://my.interserver.net/) site. We support several different authentication methods but the preferred method is to use the **API Key** which you can get from the [Account Security](https://my.interserver.net/account_security) page.
4+
#
5+
#The version of the OpenAPI document: 1.3.0
6+
#Contact: support@interserver.net
7+
#Generated by: https://openapi-generator.tech
8+
#Generator version: 7.18.0
9+
#
10+
11+
require "../spec_helper"
12+
13+
# Unit tests for OpenAPIClient::SendingApi
14+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
15+
# Please update as you see appropriate
16+
Spectator.describe "SendingApi" do
17+
describe "test an instance of SendingApi" do
18+
it "should create an instance of SendingApi" do
19+
api_instance = OpenAPIClient::SendingApi.new
20+
expect(api_instance).to be_instance_of(OpenAPIClient::SendingApi)
21+
end
22+
end
23+
24+
# unit tests for raw_mail
25+
# Sends a raw email
26+
# This call will let you pass the raw / complete email contents (including headers) as a string and have it get sent as-is. This is useful for things like DKIM signed messages.
27+
# @param send_mail_raw
28+
# @param [Hash] opts the optional parameters
29+
# @return [GenericResponse]
30+
describe "raw_mail test" do
31+
skip "should work" do
32+
# assertion here. ref: https://crystal-lang.org/reference/guides/testing.html
33+
end
34+
end
35+
36+
# unit tests for send_adv_mail
37+
# Sends an Email with Advanced Options
38+
# Sends An email through one of your mail orders allowing additional options such as file attachments, cc, bcc, etc. Here are 9 examples showing the various ways to call the advsend operation showing the different ways you can pass the to, cc, bcc, and replyto information. The first several examples are all for the application/x-www-form-urlencoded content-type while the later ones are for application/json content-types. ```BasicForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=user@domain.com \\ --data to=support@interserver.net ``` ```ArrayForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=user@domain.com \\ --data \"to[0][name]=Joe\" \\ --data \"to[0][email]=support@interserver.net\" ``` ```NameEmailForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=\"Joe <user@domain.com>\" \\ --data to=\"Joe <support@interserver.net>\" ``` ```MultToForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=user@domain.com \\ --data \"to=support@interserver.net, support@interserver.net\" ``` ```MultToFullForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=user@domain.com \\ --data \"to=Joe <support@interserver.net>, Joe <support@interserver.net>\" ``` ```MultToArrayForm curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data 'subject=Welcome' \\ --data 'body=Hello' \\ --data from=user@domain.com \\ --data \"to[0][name]=Joe\" \\ --data \"to[0][email]=support@interserver.net\" \\ --data \"to[1][name]=Joe\" \\ --data \"to[1][email]=support@interserver.net\" ``` ```BasicJson curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/json' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data '{ \"subject\": \"Welcome\", \"body\": \"Hello\", \"from\": \"user@domain.com\", \"to\": \"support@interserver.net\" }' ``` ```ArrayJson curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/json' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data '{ \"subject\": \"Welcome\", \"body\": \"Hello\", \"from\": {\"name\": \"Joe\", \"email\": \"user@domain.com\"}, \"to\": [{\"name\": \"Joe\", \"email\": \"support@interserver.net\"}] }' ``` ```NameEmailJson curl -i --request POST --url https://api.mailbaby.net/mail/advsend \\ --header 'Accept: application/json' \\ --header 'Content-Type: application/json' \\ --header 'X-API-KEY: YOUR_API_KEY' \\ --data '{ \"subject\": \"Welcome\", \"body\": \"Hello\", \"from\": \"Joe <user@domain.com>\", \"to\": \"Joe <support@interserver.net>\" }' ```
39+
# @param subject The subject or title of the email
40+
# @param body The main email contents.
41+
# @param from
42+
# @param to
43+
# @param [Hash] opts the optional parameters
44+
# @option opts [EmailAddressesTypes] :replyto
45+
# @option opts [EmailAddressesTypes] :cc
46+
# @option opts [EmailAddressesTypes] :bcc
47+
# @option opts [Array(MailAttachment)] :attachments (optional) File attachments to include in the email. The file contents must be base64 encoded!
48+
# @option opts [Int64] :id (optional) ID of the Mail order within our system to use as the Mail Account.
49+
# @return [GenericResponse]
50+
describe "send_adv_mail test" do
51+
skip "should work" do
52+
# assertion here. ref: https://crystal-lang.org/reference/guides/testing.html
53+
end
54+
end
55+
56+
# unit tests for send_mail
57+
# Sends an Email
58+
# Sends an email through one of your mail orders. *Note*: If you want to send to multiple recipients or use file attachments use the advsend (Advanced Send) call instead.
59+
# @param to The Contact whom is the primary recipient of this email.
60+
# @param from The contact whom is the this email is from.
61+
# @param subject The subject or title of the email
62+
# @param body The main email contents.
63+
# @param [Hash] opts the optional parameters
64+
# @option opts [Int32] :id Optional Order ID
65+
# @return [GenericResponse]
66+
describe "send_mail test" do
67+
skip "should work" do
68+
# assertion here. ref: https://crystal-lang.org/reference/guides/testing.html
69+
end
70+
end
71+
72+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# #MailBaby Email Delivery and Management Service API
2+
#
3+
##**Send emails fast and with confidence through our easy to use [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API interface.** # Overview This is the API interface to the [Mail Baby](https//mail.baby/) Mail services provided by [InterServer](https://www.interserver.net). To use this service you must have an account with us at [my.interserver.net](https://my.interserver.net). # Authentication In order to use most of the API calls you must pass credentials from the [my.interserver.net](https://my.interserver.net/) site. We support several different authentication methods but the preferred method is to use the **API Key** which you can get from the [Account Security](https://my.interserver.net/account_security) page.
4+
#
5+
#The version of the OpenAPI document: 1.3.0
6+
#Contact: support@interserver.net
7+
#Generated by: https://openapi-generator.tech
8+
#Generator version: 7.18.0
9+
#
10+
11+
require "../spec_helper"
12+
13+
# Unit tests for OpenAPIClient::ServicesApi
14+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
15+
# Please update as you see appropriate
16+
Spectator.describe "ServicesApi" do
17+
describe "test an instance of ServicesApi" do
18+
it "should create an instance of ServicesApi" do
19+
api_instance = OpenAPIClient::ServicesApi.new
20+
expect(api_instance).to be_instance_of(OpenAPIClient::ServicesApi)
21+
end
22+
end
23+
24+
# unit tests for get_mail_orders
25+
# displays a list of mail service orders
26+
# This will return a list of the mail orders you have in our system including their id, status, username, and optional comment.
27+
# @param [Hash] opts the optional parameters
28+
# @return [Array(MailOrder)]
29+
describe "get_mail_orders test" do
30+
skip "should work" do
31+
# assertion here. ref: https://crystal-lang.org/reference/guides/testing.html
32+
end
33+
end
34+
35+
end

0 commit comments

Comments
 (0)