<commit_before># Overcoat

Overcoat is an AFNetworking extension that makes it super simple for developers to use Mantle model objects with a REST client.

You can learn more about Mantle [here](https://github.com/github/Mantle/blob/master/README.md).

## Usage

In Overcoat, server API requests are defined by instances of the `OVCQuery` class. Using `OVCQuery` you can specify an HTTP method, a path that identifies the resource, a set of parameters, and a model class.

Servers typically respond to client API request with a dictionary or an array of dictionaries. Overcoat will transparently map those into model objects in a background queue.

For example, using [this](https://github.com/github/Mantle/blob/master/README.md#mtlmodel) model of a GitHub issue, here is how we could use the [GitHub API](http://developer.github.com) to list all the closed issues.

```objc
OVCClient *gitHubClient = [[OVCClient alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.github.com"]];
[gitHubClient setAuthorizationHeaderWithUsername:@"johndoe" password:@"<PASSWORD>"];

OVCQuery *closedIssues = [OVCQuery queryWithMethod:OVCQueryMethodGet path:@"/user/issues" parameters:@{
        @"state" : @"closed"
} modelClass:[GHIssue class]];

[gitHubClient executeQuery:closedIssues completionBlock:^(OVCRequestOperation *operation, NSArray *issues, NSError *error) {
    if (!error) {
        for (GHIssue *issue in issues) {
            NSLog(@"issue: %@ title: %@", issue.number, issue.title);
        }
    }<commit_msg>Add link to AFNetworking in README<commit_after># Overcoat

Overcoat is an [AFNetworking](https://github.com/AFNetworking/AFNetworking) extension that makes it super simple for developers to use Mantle model objects with a REST client.

You can learn more about Mantle [here](https://github.com/github/Mantle/blob/master/README.md).

## Usage

In Overcoat, server API requests are defined by instances of the `OVCQuery` class. Using `OVCQuery` you can specify an HTTP method, a path that identifies the resource, a set of parameters, and a model class.

Servers typically respond to client API request with a dictionary or an array of dictionaries. Overcoat will transparently map those into model objects in a background queue.

For example, using [this](https://github.com/github/Mantle/blob/master/README.md#mtlmodel) model of a GitHub issue, here is how we could use the [GitHub API](http://developer.github.com) to list all the closed issues.

```objc
OVCClient *gitHubClient = [[OVCClient alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.github.com"]];
[gitHubClient setAuthorizationHeaderWithUsername:@"johndoe" password:@"<PASSWORD>"];

OVCQuery *closedIssues = [OVCQuery queryWithMethod:OVCQueryMethodGet path:@"/user/issues" parameters:@{
        @"state" : @"closed"
} modelClass:[GHIssue class]];

[gitHubClient executeQuery:closedIssues completionBlock:^(OVCRequestOperation *operation, NSArray *issues, NSError *error) {
    if (!error) {
        for (GHIssue *issue in issues) {
            NSLog(@"issue: %@ title: %@", issue.number, issue.title);
        }
    }
{'fraction_non_alphanumeric': 0.10621177985194721, 'fraction_numerical': 0.0, 'mean_word_length': 4.92, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, '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': '6551233', 'n_tokens_mistral': 945, 'n_tokens_neox': 877, 'n_words': 317}