Skip to content

nllsdfx/cmtt-java-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comitet JAVA API SDK

Java library for TJ, VC and DTF API interaction. Uses API version 1.6.

1. Prerequisites

2. Latest release

Library is in active development for now. If you want to start using it immediately run mvn clean install and add the dependency:

<dependency>
  <groupId>com.nllsdfx.api</groupId>
  <artifactId>cmtt-sdk</artifactId>
  <version>LATEST_VERSION</version>
</dependency>

Or with gradle:

dependencies {
  compile 'com.nllsdfx.api:cmtt-sdk:LATEST_VERSION'
}

3. Prepare for using

Go to your profile settings in TJ, VC, or DTF account. Scroll down to the bottom of the page and click dev tools link. Copy api token from there. You will need the copied token to create api client later.

4. Initialization

Create you client using following code:

// creates TJ client
TJApiClient client = new TJApiClient("token from the previous step here");

// DTF client
DTFApiClient client = new DTFApiClient("token");

// VC client
VCApiClient client = new VCApiClient("token");

5. API requests

You can find full list of API here

Here is a quick example of how you can do an api call:

TJApiClient client = new TJApiClient("token");

// Gets entry (content/article/post) with id 93120 from TJ
Entry entry = client.entries().get().by("93120").execute();

Assert.assertEquals("93120", entry.getId());
Assert.assertEquals("Женя Кузьмин", entry.getAuthor().getName())

About

Comitet sites API library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages