Skip to content

Joinesty/nullafi-java-sdk-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nullafi Java SDK Examples

A Java Application with examples to use the Nullafi Java SDK.

Pre Requisites

  • Java SE >= 8
  • Maven >= 3.6.0

How to use the SDK at your project

<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.

Importing the Examples at IDE (ItelliJ IDEA CE)

Importing

  1. Clone the repository: git clone https://github.com/Joinesty/nullafi-csharp-sdk-examples.git
  2. Open ItelliJ IDEA CE and click on File > New > Project from Existing Sources...
  3. Select the folder nullafi-csharp-sdk-examples and click on Open
  4. Select the option Import project from external model, choose Maven and click on Next
  5. Check if the Root directory is the right folder and click on Next
  6. Make sure if the com.joinesty.nullafi-java-sdk-examples:… is selected and click on Next
  7. Select the Java SDK Version (make sure if the version is >= 1.8) and click on Next
  8. Check the Project name and Project file location and click on Finish

Running

  • Setup an Environment Variable called NULLAFI_API_KEY with yours and run mvn clean install at your terminal

Importing the Examples at IDE (Eclipse or Similar)

Importing

  1. Clone the repository: git clone https://github.com/Joinesty/nullafi-csharp-sdk-examples.git
  2. Open Eclipse IDE and click on File > Import...
  3. Select the option Maven > Existing Maven Project and click on Next
  4. Click on Browse and select the folder nullafi-csharp-sdk-examples
  5. Make sure if the option /pom.xml com.joinesty:nullafi-sdk-examples:...jar is selected and click on Finish

Running

  • Setup an Environment Variable called NULLAFI_API_KEY with yours and run mvn clean install at your terminal

Running without IDE

  • Setup an Environment Variable called NULLAFI_API_KEY with yours and run mvn clean install at your terminal

Getting Started

  • 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 and License

Copyright 2019 Joinesty, Inc. All rights reserved.

About

Java Examples for Nullafi Software Development Kit

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages