<commit_before><h1 align="center">ClasseViva API</h1>

<h2 align="center">
<a href="https://android-arsenal.com/api?level=8"><img src="https://img.shields.io/badge/API-8%2B-blue.svg?style=flat" border="0" alt="API"></a>
<img src="https://jitpack.io/v/simonesestito/classeviva-api.svg"/>
<a href="https://www.paypal.me/simonesestito" title="Donate using PayPal"><img src="https://img.shields.io/badge/paypal-donate-orange.svg"/></a>
</h2>

<h3 align="center">Android Library</h3> 
<h4 align="center"><i>Based on <a href="http://docs.classevivapi.apiary.io"><NAME>'s API</a></i></h2>

## How to include
Add the repository to your **project** _build.gradle_:
 ```Javascript
repositories {
 ...
 maven {
 url "https://jitpack.io"
 } 
} 
``` 

Add the Library to your **module** _build.gradle_:
```Javascript
dependencies {
 compile 'com.github.simonesestito:classeviva-api:1.0.2'
 .....
}
```

##How to use
####1) Create a new ClassevivaSession,
passing your secret API key (if you don't have one, go to <a href="https://github.com/simonesestito/classeviva-api#api-key"><i><b>API Key</b></i></a> paragraph) and Context
```Java
ClassevivaSession session = new ClassevivaSession(API_KEY, getApplicationContext());
```
####2) Login
```Java
OnResultsAvailable<String> listener = new OnResultsAvailable<>(){
 @Override
 public void onResultsAvailable(String result, ClassevivaSession instance){
  //"result" is the unique session key
  //"instance" is your ClassevivaSession object
 }

 @Override
 public void onError(Exception e){
  //This method will be called if an exception has thrown during the login process
  //"e" is the caught Exception
 }
};
session.login(username, password, listener);
```

####3a) Get Grades List
```Java
OnResultsAvailable<List<Mark>> listener = new OnResultsAvailable<>(){<commit_msg>Version in README updated<commit_after><h1 align="center">ClasseViva API</h1>

<h2 align="center">
<a href="https://android-arsenal.com/api?level=8"><img src="https://img.shields.io/badge/API-8%2B-blue.svg?style=flat" border="0" alt="API"></a>
<img src="https://jitpack.io/v/simonesestito/classeviva-api.svg"/>
<a href="https://www.paypal.me/simonesestito" title="Donate using PayPal"><img src="https://img.shields.io/badge/paypal-donate-orange.svg"/></a>
</h2>

<h3 align="center">Android Library</h3> 
<h4 align="center"><i>Based on <a href="http://docs.classevivapi.apiary.io"><NAME>'s API</a></i></h2>

## How to include
Add the repository to your **project** _build.gradle_:
 ```Javascript
repositories {
 ...
 maven {
 url "https://jitpack.io"
 } 
} 
``` 

Add the Library to your **module** _build.gradle_:
```Javascript
dependencies {
 compile 'com.github.simonesestito:classeviva-api:1.0'
 .....
}
```

##How to use
####1) Create a new ClassevivaSession,
passing your secret API key (if you don't have one, go to <a href="https://github.com/simonesestito/classeviva-api#api-key"><i><b>API Key</b></i></a> paragraph) and Context
```Java
ClassevivaSession session = new ClassevivaSession(API_KEY, getApplicationContext());
```
####2) Login
```Java
OnResultsAvailable<String> listener = new OnResultsAvailable<>(){
 @Override
 public void onResultsAvailable(String result, ClassevivaSession instance){
  //"result" is the unique session key
  //"instance" is your ClassevivaSession object
 }

 @Override
 public void onError(Exception e){
  //This method will be called if an exception has thrown during the login process
  //"e" is the caught Exception
 }
};
session.login(username, password, listener);
```

####3a) Get Grades List
```Java
OnResultsAvailable<List<Mark>> listener = new OnResultsAvailable<>(){
{'fraction_non_alphanumeric': 0.17742825607064017, 'fraction_numerical': 0.009657836644591612, 'mean_word_length': 5.326352530541012, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, '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': '2573497', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1226, 'n_words': 296}