<commit_before># java-api-wrapper

OAuth2 SoundCloud API wrapper written in Java ([javadoc][]).

It is simple to use and requires a minimum of external dependencies (compared to
the OAuth1 wrapper) so should be easily embeddable in both desktop and
mobile applications.

## Android

The wrapper works well on Android (although it has no dependencies on it)
since it is an extraction from our [SoundCloud Android][] codebase. However, if
all you want is to share sounds from your own application we recommend to check out the
[Android Sharing Kit][] which delegates all the hard work to the SoundCloud
app and makes use of Android's [intent][] framework.

## Usage

Create a wrapper instance:

```
ApiWrapper wrapper = new ApiWrapper("client_id", "client_secret",
                                     null, null, Env.LIVE);
```

Obtain a token:

```java
wrapper.login("username", "password");
```

Execute a request:

```java
HttpResponse resp = wrapper.get(Request.to("/me"));
```
<commit_msg>Java formatting<commit_after># java-api-wrapper

OAuth2 SoundCloud API wrapper written in Java ([javadoc][]).

It is simple to use and requires a minimum of external dependencies (compared to
the OAuth1 wrapper) so should be easily embeddable in both desktop and
mobile applications.

## Android

The wrapper works well on Android (although it has no dependencies on it)
since it is an extraction from our [SoundCloud Android][] codebase. However, if
all you want is to share sounds from your own application we recommend to check out the
[Android Sharing Kit][] which delegates all the hard work to the SoundCloud
app and makes use of Android's [intent][] framework.

## Usage

Create a wrapper instance:

```java
ApiWrapper wrapper = new ApiWrapper("client_id", "client_secret",
                                     null, null, Env.LIVE);
```

Obtain a token:

```java
wrapper.login("username", "password");
```

Execute a request:

```java
HttpResponse resp = wrapper.get(Request.to("/me"));
```

{'fraction_non_alphanumeric': 0.09236947791164658, 'fraction_numerical': 0.002008032128514056, 'mean_word_length': 4.11025641025641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2779878', 'n_tokens_mistral': 550, 'n_tokens_neox': 524, 'n_words': 256}