Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.domoinc:domo-java-sdk:v0.3.0'
}
dependencies {
implementation("com.github.domoinc:domo-java-sdk:v0.3.0")
}
<dependency>
<groupId>com.github.domoinc</groupId>
<artifactId>domo-java-sdk</artifactId>
<version>v0.3.0</version>
</dependency>
libraryDependencies += "com.github.domoinc" % "domo-java-sdk" % "v0.3.0"
:dependencies [[com.github.domoinc/domo-java-sdk "v0.3.0"]]
The SDK can be added to your project in three ways:
It is currently hosted via bintray and JCenter (It will be in Maven central eventually):
repositories {
maven {
url "http://dl.bintray.com/domoinc/domo-java-sdk"
}
}
Maven:
<dependency>
<groupId>com.domo</groupId>
<artifactId>domo-java-sdk-all</artifactId>
<version>0.4.3</version>
</dependency>
Gradle:
compile 'com.domo:domo-java-sdk-all:0.4.3'
Classic Jar Import:
./gradlew publishToMavenLocal
domo-java-sdk-all/build/libs/
public class Example {
public void domoSDKUsage() {
//Build an SDK configuration
Config config = Config.with()
.clientId("MY_CLIENT_ID")
.clientSecret("MY_CLIENT_SECRET")
.apiHost("api.domo.com")
.useHttps(true)
.scope(USER, DATA)
.httpLoggingLevel(HttpLoggingInterceptor.Level.BODY)
.build();
//Create an instance of the SDK Client
DomoClient domo = DomoClient.create(config);
//Manage DataSets
DataSetClient datasets = domo.dataSetClient();
datasets.create();
//Manage Streams
StreamClient streams = domo.streamClient();
streams.create();
//Manage Users
UserClient users = domo.userClient();
users.create();
//Manage User Groups
GroupClient groups = domo.groupClient();
groups.create();
}
}
You can use snapshot versions through JitPack:
Commits
section and click Get it
on commit you want to use (top one - the most recent)