A Java Application with examples to use the Nullafi Java SDK.
- Pre Requisites
- How to use the SDK at your project
- Importing the Examples at IDE (ItelliJ IDEA CE)
- Importing the Examples at IDE (Eclipse or Similar)
- Running without IDE
- Getting Started
- Copyright and License
- Java SE >= 8
- Maven >= 3.6.0
- Import the Maven Plugin Dependency from Central Repository. Example:
<dependencies>
<dependency>
<groupId>com.joinesty</groupId>
<artifactId>nullafi-java-sdk</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
The most recent version of the Nullafi Java SDK can be found on Maven Repository.
- Clone the repository:
git clone https://github.com/Joinesty/nullafi-csharp-sdk-examples.git
- Open
ItelliJ IDEA CE
and click onFile > New > Project from Existing Sources...
- Select the folder
nullafi-csharp-sdk-examples
and click onOpen
- Select the option
Import project from external model
, chooseMaven
and click onNext
- Check if the
Root directory
is the right folder and click onNext
- Make sure if the
com.joinesty.nullafi-java-sdk-examples:…
is selected and click onNext
- Select the Java SDK Version (make sure if the version is >= 1.8) and click on
Next
- Check the
Project name
andProject file location
and click onFinish
- Setup an Environment Variable called
NULLAFI_API_KEY
with yours and runmvn clean install
at your terminal
- Clone the repository:
git clone https://github.com/Joinesty/nullafi-csharp-sdk-examples.git
- Open
Eclipse IDE
and click onFile > Import...
- Select the option
Maven > Existing Maven Project
and click onNext
- Click on
Browse
and select the foldernullafi-csharp-sdk-examples
- Make sure if the option
/pom.xml com.joinesty:nullafi-sdk-examples:...jar
is selected and click onFinish
- Setup an Environment Variable called
NULLAFI_API_KEY
with yours and runmvn clean install
at your terminal
- Setup an Environment Variable called
NULLAFI_API_KEY
with yours and runmvn clean install
at your terminal
-
To get started with the Examples, get a API Key from the Configuration page of your app in the Settings Page -> API Key. You can use this token to make calls for your own Nullafi account.
-
All vaults and tokens examples are in
src\main\java\com\joinesty
folder. -
View
com.joinesty.Main
class to view all examples working.
package com.joinesty;
import com.joinesty.examples.Examples;
public class Main {
public static void main(String[] args) throws Exception {
String apiKey = System.getenv("NULLAFI_API_KEY");
if (apiKey == null) throw new RuntimeException("Environment NULLAFI_API_KEY could not be null.");
Examples examples = new Examples(apiKey);
examples.run();
}
}
Copyright 2019 Joinesty, Inc. All rights reserved.