Skip to content

Repository files navigation

approveapi-client

ApproveAPISwagger

  • API version: 1.0.1

The simple API to request a user's approval on anything via email + sms.

Automatically generated by the OpenAPI Generator

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:

mvn clean install

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

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.approveapi</groupId>
<artifactId>approveapi-client</artifactId>
<version>1.0.9</version>
<scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.approveapi:approveapi-client:1.0.9"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/approveapi-client-1.0.9.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

importcom.approveapi.*;
importcom.approveapi.auth.*;
importcom.approveapi.*;
importcom.approveapi.ApproveApi;
importjava.io.File;
importjava.util.*;
publicclassApproveApiExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: apiKeyHttpBasicAuthapiKey = (HttpBasicAuth) defaultClient.getAuthentication("apiKey");
apiKey.setUsername("YOUR USERNAME");
apiKey.setPassword("YOUR PASSWORD");
ApproveApiapiInstance = newApproveApi();
CreatePromptRequestcreatePromptRequest = newCreatePromptRequest(); // CreatePromptRequest | try {
Promptresult = apiInstance.createPrompt(createPromptRequest);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling ApproveApi#createPrompt");
e.printStackTrace();
}
}
}

Documentation for API Endpoints

All URIs are relative to https://approve.sh

ClassMethodHTTP requestDescription
ApproveApicreatePromptPOST /promptSending a prompt
ApproveApigetPromptGET /prompt/{id}Retrieve a prompt
ApproveApigetPromptStatusGET /prompt/{id}/statusCheck prompt status

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

apiKey

  • Type: HTTP basic authentication

Recommendation

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

Author

dev@approveapi.com

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages