Added the missing duration method from rest.
Merge pull request #20 from yrouben/master

Fixed Issue 4: Added the missing duration method from rest.