sijifeng / tb_java_tool

Teambition java sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tb-java-tool

Java bindings for the Teambition Java Tool

Add a dependency

Maven

Add jitpack to your repositories in pom.xml or settings.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://www.jitpack.io</url>
    </repository>
</repositories>

and add the project declaration to your pom.xml:

<dependency>
  <groupId>com.teambition</groupId>
  <artifactId>tb-java-tool</artifactId>
  <version>0.0.1</version>
</dependency>

Gradle

Add jitpack to your repositories block:

allprojects {
    repositories {
        ...
        maven { url 'https://www.jitpack.io' }
    }
}

and add the project to the dependencies block in your build.gradle:

dependencies {
  compile 'com.teambition:tb-java-tool:0.0.2'
}  

SBT

Add jcenter to your resolvers in your build.sbt:

resolvers += "jitpack" at "https://www.jitpack.io"

and add the project to your libraryDependencies in your build.sbt:

libraryDependencies += "com.teambition" % "tb-java-tool" % "0.0.1"

Resources

Resources this API supports:

Usage

Message

// Init model
Message message = new Message("apiKey","url");
// send  [_organizationId 、 objects(发送对象 类型数组)、消息内容 、 发送对象类型type 可选值(groups、projects、users)]
message.send("你所在企业的组织编号", "object", "content", "type");

Mail

Contacts were added in version 1.1 of the client.

// 初始化发送信息 参数为 发送邮箱 、授权码
MailMessage mailFactory = new MailMessage("你的邮箱", "你的授权码");
// 发送一条消息 subject 、 content 、 sendto(数组)
mailFactory.send("test mail", "test mail 12345", new String[]{"需要发送的邮箱"});

About

Teambition java sdk


Languages

Language:Java 100.0%