dadapush-client

DaDaPush Client For Java

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.dadapush.client
ArtifactId

ArtifactId

dadapush-client
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

dadapush-client
DaDaPush Client For Java
Project URL

Project URL

https://github.com/dadapush/dadapush-java-client
Source Code Management

Source Code Management

https://github.com/dadapush/dadapush-java-client

Download dadapush-client

How to add to project

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

Dependencies

compile (7)

Group / Artifact Type Version
io.swagger : swagger-annotations jar 1.5.21
com.squareup.okhttp3 : okhttp jar 3.14.2
com.squareup.okhttp3 : logging-interceptor jar 3.14.2
com.google.code.gson : gson jar 2.8.5
io.gsonfire : gson-fire jar 1.8.3
org.apache.commons : commons-lang3 jar 3.9
org.threeten : threetenbp jar 1.3.8

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

dadapush-client

DaDaPush Public API

  • API version: v1
    • Build date: 2019-07-10T21:57:17.209285+08:00[Asia/Shanghai]

DaDaPush: Real-time Notifications App

Send real-time notifications through our API without coding and maintaining your own app for iOS or Android devices.

For more information, please visit https://www.dadapush.com

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.dadapush.client</groupId>
  <artifactId>dadapush-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.dadapush.client:dadapush-client:1.0.0"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/dadapush-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import com.dadapush.client.ApiClient;
import com.dadapush.client.ApiException;
import com.dadapush.client.Configuration;
import com.dadapush.client.models.*;
import com.dadapush.client.api.DaDaPushMessageApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://www.dadapush.com");

    DaDaPushMessageApi apiInstance = new DaDaPushMessageApi(defaultClient);
    MessagePushRequest body = new MessagePushRequest(); // MessagePushRequest | body
    String xChannelToken = "xChannelToken_example"; // String | see: https://www.dadapush.com/channel/list
    try {
      ResultOfMessagePushResponse result = apiInstance.createMessage(body, xChannelToken);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DaDaPushMessageApi#createMessage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://www.dadapush.com

Class Method HTTP request Description
DaDaPushMessageApi createMessage POST /api/v1/message push Message to a Channel
DaDaPushMessageApi deleteMessage DELETE /api/v1/message/{messageId} delete a Channel Message
DaDaPushMessageApi getMessage GET /api/v1/message/{messageId} get a Channel Message
DaDaPushMessageApi getMessages GET /api/v1/messages get Message List

Documentation for Models

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.dadapush.client

DaDaPush

DaDaPush: Real-time Notifications App

Versions

Version
1.0.0