Mailsac publishes OpenAPI 3.0 JSON and YAML specs. There’s a swagger explorer available.
Swagger Codegen is a tool for generating a client library from an OpenAPI spec file.
For example, the following languages are supported, meaning you could generate a mailsac client library for managing your temp/disposable email. Some languages support multiple frameworks, too.
- ActionScript
- Ada
- Apex
- Bash
- C# (.net 2.0, 3.5 or later)
- C++ (cpprest, Qt5, Tizen)
- Clojure
- Dart
- Elixir
- Elm
- Eiffel
- Erlang
- Go
- Groovy
- Haskell (http-client, Servant)
- Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured)
- Kotlin
- Lua
- Node.js (ES5, ES6, AngularJS with Google Closure Compiler annotations)
- Objective-C
- Perl
- PHP
- PowerShell
- Python
- R
- Ruby
- Rust (rust, rust-server)
- Scala (akka, http4s, swagger-async-httpclient)
- Swift (2.x, 3.x, 4.x, 5.x)
- Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)
The up to date list is on swagger-codegen’s github page.
Generating a client
- Install swagger-codegen according to the official documentation
- Generate using the public mailsac api spec, for a specific language (
-l <LANGUAGE>
,-o <OUTPUT FOLDER>
) In this case,ruby
:
swagger-codegen generate -i https://mailsac.com/openapi.json -l ruby -o ./mailsac-ruby
- Copy your new client code into your application. In the example above it was
./mailsac-ruby/