Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/traitify/traitify-java
Traitify API client written in Java.
https://github.com/traitify/traitify-java
Last synced: about 1 month ago
JSON representation
Traitify API client written in Java.
- Host: GitHub
- URL: https://github.com/traitify/traitify-java
- Owner: traitify
- License: mit
- Created: 2014-04-22T10:25:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-10-05T06:45:58.000Z (about 2 years ago)
- Last Synced: 2024-04-14T23:53:55.364Z (9 months ago)
- Language: Java
- Size: 49.8 KB
- Stars: 3
- Watchers: 12
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
traitify-java
=============Traitify API client written in Java.
=======
# Traitify Java ClientYou can sign up for a Traitify account at https://developers.traitify.com.
Requirements
============Java 1.5 and later.
Installation
============### Maven users
Add this dependency to your project's POM:
com.traitify
traitify-java
0.0.14
### Others
You'll need to manually install the following JARs:
* The Traitify JAR from https://oss.sonatype.org/content/repositories/releases/com/traitify/traitify-java/0.0.14/traitify-java-0.0.14.jar
* [Jersey Client](https://jersey.java.net/nonav/documentation/1.17/chapter_deps.html#core_client) from .
* [Jersey Core](https://jersey.java.net/download.html) from .Usage
=====TraitifyExample.java
import com.traitify.Traitify;
import com.traitify.model.Assessment;
import com.traitify.model.Deck;public class TraitifyExample {
public static void main(String[] args) {
Traitify.apiKey = "YOUR-SECRET-KEY";
List decks = Deck.list();
Deck deck;
for(Deck _deck:decks){
if(_deck.getName().equals("General Personality"){
deck = _deck;
}
}
Assessment assessment = Assessment.create(deck.getId());
}
}See [TraitifyTest.java](https://github.com/woofound/traitify-java/blob/master/src/test/java/com/traitify/TraitifyTest.java) for more examples.
Testing
=======You must have Maven installed. To run the tests, simply run `mvn test`. You can run particular tests by passing `-D test=Class#method` -- for example, `-D test=TraitifyTest#testAssessmentCreate`. You must also specify your `apiKey` when testing, you can do that by passing `-DapiKey=yourapikey`.