approveapi-client

ApproveAPI Java Client

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.approveapi
ArtifactId

ArtifactId

approveapi-client
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

approveapi-client
ApproveAPI Java Client
Project URL

Project URL

https://github.com/approveapi/approveapi-java
Source Code Management

Source Code Management

https://github.com/approveapi/approveapi-java

Download approveapi-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.approveapi/approveapi-client/ -->
<dependency>
    <groupId>com.approveapi</groupId>
    <artifactId>approveapi-client</artifactId>
    <version>1.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/com.approveapi/approveapi-client/
implementation 'com.approveapi:approveapi-client:1.0.6'
// https://jarcasting.com/artifacts/com.approveapi/approveapi-client/
implementation ("com.approveapi:approveapi-client:1.0.6")
'com.approveapi:approveapi-client:jar:1.0.6'
<dependency org="com.approveapi" name="approveapi-client" rev="1.0.6">
  <artifact name="approveapi-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.approveapi', module='approveapi-client', version='1.0.6')
)
libraryDependencies += "com.approveapi" % "approveapi-client" % "1.0.6"
[com.approveapi/approveapi-client "1.0.6"]

Dependencies

compile (7)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.21
com.squareup.okhttp3 : okhttp jar 3.12.1
com.squareup.okhttp3 : logging-interceptor jar 3.12.1
com.google.code.gson : gson jar 2.8.5
io.gsonfire : gson-fire jar 1.8.0
org.apache.commons : commons-lang3 jar 3.8.1
org.threeten : threetenbp jar 1.3.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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:

import com.approveapi.*;
import com.approveapi.auth.*;
import com.approveapi.*;
import com.approveapi.ApproveApi;

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

public class ApproveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: apiKey
        HttpBasicAuth apiKey = (HttpBasicAuth) defaultClient.getAuthentication("apiKey");
        apiKey.setUsername("YOUR USERNAME");
        apiKey.setPassword("YOUR PASSWORD");

        ApproveApi apiInstance = new ApproveApi();
        CreatePromptRequest createPromptRequest = new CreatePromptRequest(); // CreatePromptRequest | 
        try {
            Prompt result = apiInstance.createPrompt(createPromptRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApproveApi#createPrompt");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
ApproveApi createPrompt POST /prompt Sending a prompt
ApproveApi getPrompt GET /prompt/{id} Retrieve a prompt
ApproveApi getPromptStatus GET /prompt/{id}/status Check 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

[email protected]

com.approveapi

ApproveAPI

A simple API to request a user's approval on anything via email, sms, + mobile push.

Versions

Version
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1