Skip to content

isabella232/ringcentral-pubnub-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RingCentral PubNub SDK for Java

This project is an extension of the RingCentral SDK for Java project.

Getting help and support

If you are having difficulty using this SDK, or working with the RingCentral API, please visit our developer community forums for help and to get quick answers to your questions. If you wish to contact the RingCentral Developer Support team directly, please submit a help ticket from our developer website.

Installation

This SDK is tested against JDK 11 so we recommend using the same. Earlier versions such as Java 8 should work as well, please report issues if you encounter any.

Gradle

repositories {
  mavenCentral()
}

dependencies {
  implementation 'com.ringcentral:ringcentral-pubnub:[version]'
}

Don't forget to replace [version] with expected version. You can find the latest versions in Maven Central.

Maven

<dependency>
  <groupId>com.ringcentral</groupId>
  <artifactId>ringcentral-pubnub</artifactId>
  <version>[version]</version>
</dependency>

Don't forget to replace [version] with expected version. You can find the latest versions in Maven Central.

Manually

Download jar here and save it into your java classpath.

Usage

Subscription & notification

RestClient rc = new RestClient(clientId, clientSecret, server);
rc.authorize(username, extension, password);

Subscription subscription = new Subscription(rc,
    new String[]{
        "/restapi/v1.0/glip/posts",
        "/restapi/v1.0/account/~/extension/~/message-store",
        // more event filters here
    },
    (message) -> {
        // do something with message
    });
subscription.subscribe();

Deserialize notification message

The notification message you get is a java String. If you know the message body type, you can deserialize it like this:

com.ringcentral.Utils.gson.fromJson(message, InstanceMessageEvent.class);

For maintainers

Test

./gradlew test

Release

Update version number in build.gradle.

./gradlew uploadArchives

Go to https://s01.oss.sonatype.org/#stagingRepositories

Login, "Close" and "Release" the SDK.

About

RingCentral PubNub SDK for Java

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%