Skip to content

Commit

Permalink
Merge pull request #11 from vhx/v1.5.0
Browse files Browse the repository at this point in the history
v1.5.0
  • Loading branch information
scottusrobus authored Aug 19, 2016
2 parents 8757c61 + 4035619 commit b6252ae
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.5.0
**2016-08-19**

* Add analytics resources with `report` method
* Update readme with new node scoped links

### 1.4.0
**2016-02-18**

Expand Down
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,33 @@ vhx.customers.create({
### Resources & methods

products
* [`retrieve`](http://dev.vhx.tv/docs/api/?javascript#product-retrieve)
* [`all`](http://dev.vhx.tv/docs/api/?javascript#product-list)
* [`retrieve`](http://dev.vhx.tv/docs/api/?node#product-retrieve)
* [`all`](http://dev.vhx.tv/docs/api/?node#product-list)

customers
* [`create`](http://dev.vhx.tv/docs/api/?javascript#customer-create)
* [`retrieve`](http://dev.vhx.tv/docs/api/?javascript#customer-retrieve)
* [`update`](http://dev.vhx.tv/docs/api/?javascript#customer-update)
* [`all`](http://dev.vhx.tv/docs/api/?javascript#customer-list)
* [`del`](http://dev.vhx.tv/docs/api/?javascript#customer-delete)
* [`addProduct`](http://dev.vhx.tv/docs/api/?javascript#customer-add-product)
* [`removeProduct`](http://dev.vhx.tv/docs/api/?javascript#customer-remove-product)
* [`create`](http://dev.vhx.tv/docs/api/?node#customer-create)
* [`retrieve`](http://dev.vhx.tv/docs/api/?node#customer-retrieve)
* [`update`](http://dev.vhx.tv/docs/api/?node#customer-update)
* [`all`](http://dev.vhx.tv/docs/api/?node#customer-list)
* [`del`](http://dev.vhx.tv/docs/api/?node#customer-delete)
* [`addProduct`](http://dev.vhx.tv/docs/api/?node#customer-add-product)
* [`removeProduct`](http://dev.vhx.tv/docs/api/?node#customer-remove-product)

videos
* [`create`](http://dev.vhx.tv/docs/api/?javascript#videos-create)
* [`retrieve`](http://dev.vhx.tv/docs/api?javascript#videos-get)
* [`all`](http://dev.vhx.tv/docs/api?javascript#videos-list)
* [`files`](http://dev.vhx.tv/docs/api/?javascript#videos-list-files)
* [`create`](http://dev.vhx.tv/docs/api/?node#videos-create)
* [`retrieve`](http://dev.vhx.tv/docs/api?node#videos-get)
* [`all`](http://dev.vhx.tv/docs/api?node#videos-list)
* [`files`](http://dev.vhx.tv/docs/api/?node#videos-list-files)

collections
* [`create`](http://dev.vhx.tv/docs/api?javascript#collections-create)
* [`update`](http://dev.vhx.tv/docs/api?javascript#collections-update)
* [`retrieve`](http://dev.vhx.tv/docs/api?javascript#collections-retrieve)
* [`all`](http://dev.vhx.tv/docs/api?javascript#collections-list)
* [`items`](http://dev.vhx.tv/docs/api?javascript#collection-items-list)
* [`create`](http://dev.vhx.tv/docs/api?node#collections-create)
* [`update`](http://dev.vhx.tv/docs/api?node#collections-update)
* [`retrieve`](http://dev.vhx.tv/docs/api?node#collections-retrieve)
* [`all`](http://dev.vhx.tv/docs/api?node#collections-list)
* [`items`](http://dev.vhx.tv/docs/api?node#collection-items-list)

authorizations
* [`create`](http://dev.vhx.tv/docs/api/?javascript#authorizations-create)
* [`create`](http://dev.vhx.tv/docs/api?node#authorizations-create)

analytics
* [`report`](http://dev.vhx.tv/docs/api?node#analytics-report)
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.5.0
2 changes: 1 addition & 1 deletion lib/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Resource.prototype = {
params.qs = options || null;
}

if (!client_method.match(/^list$|^all$|^create$/)) {
if (!client_method.match(/^list$|^all$|^create$|^report$/)) {
params.url += '/' + id;
}
if (client_method.match(/items/i)) {
Expand Down
10 changes: 10 additions & 0 deletions lib/resources/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

var Resource = require('../resource');

module.exports = Resource.extend({
path: 'analytics',
methods: [
'report'
]
});
3 changes: 2 additions & 1 deletion lib/vhx.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ var resources = {
authorizations: require('./resources/authorizations'),
collections: require('./resources/collections'),
products: require('./resources/products'),
videos: require('./resources/videos')
videos: require('./resources/videos'),
analytics: require('./resources/analytics')
};

function VHX(key, version) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vhx",
"version": "1.4.0",
"version": "1.5.0",
"description": "VHX Node.js API Client",
"keywords": [
"vhx",
Expand Down

0 comments on commit b6252ae

Please sign in to comment.