Comparing version 0.4.0 to 0.5.0
@@ -362,2 +362,35 @@ /** | ||
} | ||
}, | ||
thumbnail : { | ||
get: function(thumbnailId) { | ||
return rest.get('/thumbnail/' + thumbnailId); | ||
}, | ||
create: function(thumbnail) { | ||
var def = Q.defer(); | ||
rest.post('/thumbnail', thumbnail).then( | ||
function(response) { | ||
(function poll() { | ||
rest.get('/thumbnail/' + response.id).then( | ||
function (response) { | ||
switch(response.state) { | ||
case 'FINISHED': | ||
def.resolve(response); | ||
break; | ||
case 'ERROR': | ||
def.reject("Error while creating thumbnail!"); | ||
break; | ||
default: | ||
setTimeout(poll, 5000); | ||
} | ||
}, | ||
def.reject | ||
); | ||
})(); | ||
}, | ||
def.reject | ||
); | ||
return def.promise; | ||
} | ||
} | ||
@@ -364,0 +397,0 @@ }; |
{ | ||
"name": "bitcodin", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Bitcodin API wrapper", | ||
@@ -22,4 +22,4 @@ "homepage": "https://github.com/bitmovin/bitcodin-node", | ||
"name": "Martin Fillafer", | ||
"email": "martin.fillafer@bitmovin.net", | ||
"url": "http://bitmovin.net/" | ||
"email": "martin.fillafer@bitmovin.com", | ||
"url": "https://bitmovin.com/" | ||
}, | ||
@@ -26,0 +26,0 @@ "bugs": { |
@@ -1,2 +0,2 @@ | ||
# [![bitcodin](http://www.bitcodin.com/wp-content/uploads/2014/10/bitcodin-small.gif)](http://www.bitcodin.com) | ||
# [![bitmovin](https://cloudfront-prod.bitmovin.com/wp-content/themes/Bitmovin-V-0.1/images/logo3.png)](http://www.bitmovin.com) | ||
[![build status](https://travis-ci.org/bitmovin/bitcodin-node.svg)](https://travis-ci.org/bitmovin/bitcodin-node) | ||
@@ -6,3 +6,3 @@ [![npm version](https://badge.fury.io/js/bitcodin.svg)](http://badge.fury.io/js/bitcodin) | ||
The bitcodin API for NodeJS is a seamless integration with the [bitcodin cloud transcoding system](http://www.bitcodin.com). It enables the generation of MPEG-DASH and HLS content in just some minutes. | ||
The bitmovin API for NodeJS is a seamless integration with the [bitmovin cloud transcoding system](http://www.bitmovin.com). It enables the generation of MPEG-DASH and HLS content in just some minutes. | ||
@@ -21,5 +21,5 @@ # Installation | ||
Your API key can be found in the **settings of your bitcodin user account**, as shown in the figure below. | ||
Your API key can be found in the **settings of your bitmovin user account**, as shown in the figure below. | ||
![APIKey](http://www.bitcodin.com/wp-content/uploads/2015/06/api_key.png) | ||
![APIKey](https://cloudfront-prod.bitmovin.com/wp-content/uploads/2016/04/api-key.png) | ||
@@ -26,0 +26,0 @@ An example how you can set the bitcodin API is shown in the following: |
69078
27
1735