<commit_before>node-odata
==========
Create awesome REST APIs abide by [OData Protocol v4](http://www.odata.org/).  Its purpose is to easier to creating APIs, make you more focus on business logic.

  [![NPM Version](https://img.shields.io/npm/v/node-odata.svg?style=flat)](https://www.npmjs.org/package/node-odata)
  [![Build Status](https://img.shields.io/travis/TossShinHwa/node-odata.svg?style=flat)](https://travis-ci.org/TossShinHwa/node-odata)
  [![License](http://img.shields.io/npm/l/node-odata.svg?style=flat)](https://github.com/TossShinHwa/node-odata/blob/master/LICENSE)

```
var express = require('express'),
    odata = require('node-odata');
var app = express();

app.use(express.bodyParser());
app.use(express.query());

odata.set('app', app);
odata.set('db', 'mongodb://localhost/my-app');
odata.resources.register({ url: '/books', model: { title: String, price: Number } });

app.listen(3000);
```

Registers the following routes:

```
GET    /odata/books
GET    /odata/books/:id
POST   /odata/books
PUT    /odata/books/:id
DELETE /odata/books/:id
```

Use the following OData query:


Example:

* GET [/books?$select=title, author](http://books.woshinidezhu.com/odata/books?$select=title, author)
* GET [/books?$top=3&$skip=2](http://books.woshinidezhu.com/odata/books?$top=3&$skip=2)
* GET [/books?$orderby=price desc](http://books.woshinidezhu.com/odata/books?$orderby=price desc)
* GET [/books?$filter=price gt 10](http://books.woshinidezhu.com/odata/books?$filter=price gt 10)
* ...

## Current State<commit_msg>update link<commit_after>node-odata
==========
Create awesome REST APIs abide by [OData Protocol v4](http://www.odata.org/).  Its purpose is to easier to creating APIs, make you more focus on business logic.

  [![NPM Version](https://img.shields.io/npm/v/node-odata.svg?style=flat)](https://www.npmjs.org/package/node-odata)
  [![Build Status](https://img.shields.io/travis/TossShinHwa/node-odata.svg?style=flat)](https://travis-ci.org/TossShinHwa/node-odata)
  [![License](http://img.shields.io/npm/l/node-odata.svg?style=flat)](https://github.com/TossShinHwa/node-odata/blob/master/LICENSE)

```
var express = require('express'),
    odata = require('node-odata');
var app = express();

app.use(express.bodyParser());
app.use(express.query());

odata.set('app', app);
odata.set('db', 'mongodb://localhost/my-app');
odata.resources.register({ url: '/books', model: { title: String, price: Number } });

app.listen(3000);
```

Registers the following routes:

```
GET    /odata/books
GET    /odata/books/:id
POST   /odata/books
PUT    /odata/books/:id
DELETE /odata/books/:id
```

Use the following OData query:

```
Example
GET /books?$select=title, author
GET /books?$top=3&$skip=2
GET /books?$orderby=price desc
GET /books?$filter=price gt 10
GET ...
```

Try it:

* GET [/books?$select=title, author](http://books.zackyang.com/odata/books?$select=title, author)
* GET [/books?$top=3&$skip=2](http://books.zackyang.com/odata/books?$top=3&$skip=2)
* GET [/books?$orderby=price desc](http://books.zackyang.com/odata/books?$orderby=price desc)
* GET [/books?$filter=price gt 10](http://books.zackyang.com/odata/books?$filter=price gt 10)

## Current State
{'fraction_non_alphanumeric': 0.20269423558897243, 'fraction_numerical': 0.009398496240601503, 'mean_word_length': 4.912962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 4, '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': '3449536', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1194, 'n_words': 197}