# Spree::Api::V2 [![Circle CI](https://circleci.com/gh/spree-contrib/spree_api_v2/tree/master.svg?style=svg&circle-token=e2f6283b074ca9febcafab729d466ded2334300c)](https://circleci.com/gh/spree-contrib/spree_api_v2/tree/master) The second version of the Spree API that's JSON API compatible. Documentation: [http://spree-contrib.github.io/spree_api_v2](http://spree-contrib.github.io/spree_api_v2) ## Installation Add spree_api_v2 to your Gemfile: ```ruby gem 'spree_api_v2', github: 'spree-contrib/spree_api_v2' ``` ## Road to 1.0 *** Please note that there actually has been a _lot_ of work done. The lack of checked off boxes doesn't give this gem the respect it deserves. *** There's several things blocking 1.0. Below, you'll see a bullet list of requirements that are both specific to the app, the JSON API spec, and third parties. - [ ] Manage permissions with CanCanCan. - [ ] Add support for XML. - [ ] Add support for pagination. - [x] `page` keyword support for pagination. - [ ] `links` document at the root for `self`, `next`, `prev`, `last`, and `first`. - [ ] Add support for filtration. - [x] Be able to filter onto the main data object. - [ ] Be able to filter the included relationships. - [ ] Provide JSON API specific error objects. Provide support for: - [ ] `id` - [ ] `links` - [ ] `about` - [ ] `status` - [ ] `code` - [x] `title` - [x] `detail` - [ ] `source` - [x] `pointer` - [ ] `parameter` - [x] `meta` - [ ] Only accept data in the JSON API format. - [ ] Respond with header `Content-Type: application/vnd.api+json`. - [ ] Add support for sparse fieldsets. - [ ] Add support for sorting. | Resource | index | create | show | update | destroy | |------------------|:-------:|:-------:|:-------:|:-------:|:-------:| | Adjustment | [ ] | [ ] | [ ] | [ ] | [ ] | | Address | [ ] | [ ] | [ ] | [ ] | [ ] | | Checkout | [ ] | [ ] | [ ] | [ ] | [ ] | | Country | [x] | [ ] | [x] | [ ] | [ ] | | Image | [x] | [ ] | [x] | [ ] | [ ] | | Line Item | [ ] | nw | [ ] | [ ] | [ ] | | Option Type | [x] | [ ] | [x] | [ ] | [ ] | | Option Value | [x] | [ ] | [x] | [ ] | [ ] | | Order | [x] | [ ] | [x] | [ ] | [ ] | | Payment | [ ] | [ ] | [ ] | [ ] | [ ] | | Price | [x] | [ ] | [x] | [ ] | [ ] | | Product | [x] | [ ] | [x] | [ ] | [ ] | | Product Property | [ ] | [ ] | [ ] | [ ] | [ ] | | Return Auth | [ ] | [ ] | [ ] | [ ] | [ ] | | Shipment | [ ] | [ ] | [ ] | [ ] | [ ] | | State | [x] | [ ] | [x] | [ ] | [ ] | | Stock Location | [ ] | [ ] | [ ] | [ ] | [ ] | | Stock Movement | [ ] | [ ] | [ ] | [ ] | [ ] | | Stock Item | [ ] | [ ] | [ ] | [ ] | [ ] | | Store | [ ] | [ ] | [ ] | [ ] | [ ] | | Store Credit | [ ] | [ ] | [ ] | [ ] | [ ] | | Tax Category | [ ] | [ ] | [ ] | [ ] | [ ] | | Tax Rate | [ ] | [ ] | [ ] | [ ] | [ ] | | Taxon | [x] | [ ] | [x] | [ ] | [ ] | | Taxonomy | [x] | [ ] | [x] | [ ] | [ ] | | User | [x] | [ ] | [x] | [ ] | [ ] | | Variant | [x] | [ ] | [x] | [ ] | [ ] | | Zone | [ ] | [ ] | [ ] | [ ] | [ ] | ## Testing First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run the specs. The dummy app can be regenerated by using `rake test_app`. ```shell bundle bundle exec rake GEMNAME=spree_api_v2 bundle exec rake GEMNAME=solidus_api_v2 ``` ## Sponsored by: [![Kabuni](https://assets.kabuni.com/kabuni-secondary-logomark-xlarge.png)](https://kabuni.com?utm_source=SpreeApiV2&utm_medium=sponsor&utm_campaign=opensource) Copyright © 2015 Ben A. Morgan, released under the New BSD License