<commit_before># figshare-client-java
Java bindings to Figshare API

This project uses Spring-REST and Spring Social to provide a Java client to the Figshare API.

It is not complete, but supports basic Article operations and File upload.

This library is also now available in MavenCentral if you want to just add it as a dependency:
    
    <dependency>
      <groupId>com.researchspace</groupId>
      <artifactId>figshare-client-java</artifactId>
      <version>0.1.1</version>
    </dependency>
    
or in Gradle:

    compile 'com.researchspace:figshare-client-java:0.1.1'


### Installing into a Maven repository

From 0.3.0 onwards, this project can be added as a  dependency in your project using [JitPack](https://jitpack.io).

Or, you can run:

    ./mvnw clean install -DskipTests=true

to install into a local Maven  repository.

## Building

To compile and run unit tests, check out and run  the following command. This will install the Gradle build tool if you don't already have it.

    ./mvnw clean test
    
To build a jar without  tests:

    ./mvnw clean package -DskipTests=true
    
## Integration tests

Integration tests make real calls to the Figshare API. To run integration tests, you'll need a previously created Figshare account and a private access token that you can obtain from your Figshare account settings page. Add this as a command-line option, replacing 'XXXXX' with your token:

    ./mvnw clean test -DfigshareToken=XXXXX
    
### Using the library

The library can be used either with a personal token or by using the OAuth2 mechanism to acquire an access token.
<commit_msg>improve docs<commit_after># figshare-client-java
Java bindings to Figshare API

This project uses Spring-REST and Spring Social to provide a Java client to the Figshare API.

It is not complete, but supports basic Article operations and File upload.


### Installing into a Maven repository

From 0.3.0 onwards, this project can be added as a  dependency in your project using [JitPack](https://jitpack.io).

    <dependency>
       <groupId>com.github.rspace-os</groupId>
       <artifactId>figshare-client-java</artifactId>
       <version>v0.3.2</version>
    </dependency>

or Gradle:

    compile 'com.github.rspace-os:figshare-client-java:v0.3.2'
  

Builds and their metadata are available at https://jitpack.io/com/github/rspace-os/figshare-client-java/

Or, you can run:

    ./mvnw clean install -DskipTests=true

to install into a local Maven  repository.

## Building

To compile and run unit tests, check out and run  the following command. This will install the Gradle build tool if you don't already have it.

    ./mvnw clean test
    
To build a jar without  tests:

    ./mvnw clean package -DskipTests=true
    
## Integration tests

Integration tests make real calls to the Figshare API. To run integration tests, you'll need a previously created Figshare account and a private access token that you can obtain from your Figshare account settings page. Add this as a command-line option, replacing 'XXXXX' with your token:

    ./mvnw clean test -DfigshareToken=XXXXX
    
### Using the library

The library can be used either with a personal token or by using the OAuth2 mechanism to acquire an access token.

{'fraction_non_alphanumeric': 0.06619458128078817, 'fraction_numerical': 0.006157635467980296, 'mean_word_length': 3.563202247191011, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2510610', 'n_tokens_mistral': 938, 'n_tokens_neox': 888, 'n_words': 420}