Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tabby committed Feb 20, 2021
0 parents commit 0ca9079
Show file tree
Hide file tree
Showing 101 changed files with 12,601 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# exclude jar for gradle wrapper
!gradle/wrapper/*.jar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# build files
**/target
target
.gradle
build
23 changes: 23 additions & 0 deletions .swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.18
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
# - sbt test
183 changes: 183 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# mimepost

MimePost API Reference (Beta)
- API version: 0.1.0
- Build date: 2021-02-20T12:32:16.156+05:30

MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.


*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*


## Requirements

Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle

## Installation

To install the API client library to your local Maven repository, simply execute:

```shell
mvn clean install
```

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

```shell
mvn clean deploy
```

Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.

### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>com.mimepost</groupId>
<artifactId>mimepost</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
compile "com.mimepost:mimepost:1.0.0"
```

### Others

At first generate the JAR by executing:

```shell
mvn clean package
```

Then manually install the following JARs:

* `target/mimepost-1.0.0.jar`
* `target/lib/*.jar`

## Getting Started

Please follow the [installation](#installation) instruction and execute the following Java code:

```java

import com.mimepost.*;
import com.mimepost.auth.*;
import com.mimepost.model.*;
import io.swagger.client.api.AccountsApi;

import java.io.File;
import java.util.*;

public class AccountsApiExample {

public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

AccountsApi apiInstance = new AccountsApi();
try {
AccountProfileResponse result = apiInstance.accountProfileGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountsApi#accountProfileGet");
e.printStackTrace();
}
}
}

```

## Documentation for API Endpoints

All URIs are relative to *https://api.mimepost.com/v1/*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountsApi* | [**accountProfileGet**](docs/AccountsApi.md#accountProfileGet) | **GET** /account/profile/ | Get account profile details
*AccountsApi* | [**accountProfilePost**](docs/AccountsApi.md#accountProfilePost) | **POST** /account/profile/ | Update account profile details
*AccountsApi* | [**settingsGet**](docs/AccountsApi.md#settingsGet) | **GET** /settings/ | Get all the settings
*AccountsApi* | [**settingsPost**](docs/AccountsApi.md#settingsPost) | **POST** /settings/ | Set a setting
*DomainsApi* | [**domainsGet**](docs/DomainsApi.md#domainsGet) | **GET** /domains/ | Get a list of all the domains
*DomainsApi* | [**domainsIdApprovePost**](docs/DomainsApi.md#domainsIdApprovePost) | **POST** /domains/{id}/approve/ | Submit request for the approval of a verified domain
*DomainsApi* | [**domainsIdDelete**](docs/DomainsApi.md#domainsIdDelete) | **DELETE** /domains/{id} | Remove a single domain
*DomainsApi* | [**domainsIdGet**](docs/DomainsApi.md#domainsIdGet) | **GET** /domains/{id} | Get the details of a single domain
*DomainsApi* | [**domainsIdVerifyDkimPost**](docs/DomainsApi.md#domainsIdVerifyDkimPost) | **POST** /domains/{id}/verify_dkim/ | Request for the verification of DKIM record for a single domain
*DomainsApi* | [**domainsIdVerifySpfPost**](docs/DomainsApi.md#domainsIdVerifySpfPost) | **POST** /domains/{id}/verify_spf/ | Request for the verification of SPF record for a single domain
*DomainsApi* | [**domainsIdVerifyTrackingPost**](docs/DomainsApi.md#domainsIdVerifyTrackingPost) | **POST** /domains/{id}/verify_tracking/ | Request for the verification of tracking record for a single domain
*DomainsApi* | [**domainsPost**](docs/DomainsApi.md#domainsPost) | **POST** /domains/ | Add single domain
*EmailsApi* | [**sendEmail**](docs/EmailsApi.md#sendEmail) | **POST** /emails/ | Send email
*StatsApi* | [**emaillogsGet**](docs/StatsApi.md#emaillogsGet) | **GET** /emaillogs/ | Get the logs of a particular date
*StatsApi* | [**statsGet**](docs/StatsApi.md#statsGet) | **GET** /stats/ | Get the summary of stats for a range of dates
*WebhooksApi* | [**webhooksGet**](docs/WebhooksApi.md#webhooksGet) | **GET** /webhooks/ | Get the list of all the webhooks
*WebhooksApi* | [**webhooksIdDelete**](docs/WebhooksApi.md#webhooksIdDelete) | **DELETE** /webhooks/{id} | Remove a single webhook
*WebhooksApi* | [**webhooksIdGet**](docs/WebhooksApi.md#webhooksIdGet) | **GET** /webhooks/{id} | Get the details of a single webhook
*WebhooksApi* | [**webhooksIdPut**](docs/WebhooksApi.md#webhooksIdPut) | **PUT** /webhooks/{id} | Update the details of a single webhook
*WebhooksApi* | [**webhooksPost**](docs/WebhooksApi.md#webhooksPost) | **POST** /webhooks/ | Add single webhook


## Documentation for Models

- [AccountProfile](docs/AccountProfile.md)
- [AccountProfileResponse](docs/AccountProfileResponse.md)
- [AccountSettings](docs/AccountSettings.md)
- [ApiResponseAllWebhooks](docs/ApiResponseAllWebhooks.md)
- [ApiResponseAllWebhooksData](docs/ApiResponseAllWebhooksData.md)
- [ApiResponseDomainsList](docs/ApiResponseDomainsList.md)
- [ApiResponseDomainsListData](docs/ApiResponseDomainsListData.md)
- [ApiResponseEmaillogs](docs/ApiResponseEmaillogs.md)
- [ApiResponseEmaillogsData](docs/ApiResponseEmaillogsData.md)
- [ApiResponseSingleWebhooks](docs/ApiResponseSingleWebhooks.md)
- [ApiResponseStats](docs/ApiResponseStats.md)
- [ApiResponseStatsData](docs/ApiResponseStatsData.md)
- [ApiResponseStatsDataDatewiseSummary](docs/ApiResponseStatsDataDatewiseSummary.md)
- [ApiResponseStatsDataGraphSummary](docs/ApiResponseStatsDataGraphSummary.md)
- [ApiResponseStatsDataTotalSummary](docs/ApiResponseStatsDataTotalSummary.md)
- [ApiResponseStatsDataTotalSummaryStatus](docs/ApiResponseStatsDataTotalSummaryStatus.md)
- [ApiResponseWebhooks](docs/ApiResponseWebhooks.md)
- [ApiResponseWebhooksData](docs/ApiResponseWebhooksData.md)
- [Domain](docs/Domain.md)
- [Email](docs/Email.md)
- [EmailAttachments](docs/EmailAttachments.md)
- [EmailGlobalMergeVars](docs/EmailGlobalMergeVars.md)
- [EmailMergeVars](docs/EmailMergeVars.md)
- [EmailTo](docs/EmailTo.md)
- [ModelApiResponse](docs/ModelApiResponse.md)
- [Webhook](docs/Webhook.md)
- [Webhook1](docs/Webhook1.md)


## Documentation for Authorization

Authentication schemes defined for the API:
### api_key

- **Type**: API key
- **API key parameter name**: X-Auth-Token
- **Location**: HTTP header


## Recommendation

It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.

## Author

[email protected]

104 changes: 104 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'com.mimepost'
version = '1.0.0'

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}

repositories {
jcenter()
}


if(hasProperty('target') && target == 'android') {

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}

dependencies {
provided 'javax.annotation:jsr250-api:1.0'
}
}

afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

} else {

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

install {
repositories.mavenInstaller {
pom.artifactId = 'mimepost'
}
}

task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
}

dependencies {
compile 'io.swagger:swagger-annotations:1.5.17'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
compile 'com.google.code.gson:gson:2.8.1'
compile 'io.gsonfire:gson-fire:1.8.0'
compile 'org.threeten:threetenbp:1.3.5'
testCompile 'junit:junit:4.12'
}
21 changes: 21 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
lazy val root = (project in file(".")).
settings(
organization := "com.mimepost",
name := "mimepost",
version := "1.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
publishArtifact in (Compile, packageDoc) := false,
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"io.swagger" % "swagger-annotations" % "1.5.17",
"com.squareup.okhttp" % "okhttp" % "2.7.5",
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
"com.google.code.gson" % "gson" % "2.8.1",
"org.threeten" % "threetenbp" % "1.4.1" % "compile",
"io.gsonfire" % "gson-fire" % "1.8.3" % "compile",
"junit" % "junit" % "4.12" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
)
Loading

0 comments on commit 0ca9079

Please sign in to comment.