Ruby Carrot - VoiceBunny Library
Ruby Carrot is a Ruby library that provides connection to the VoiceBunny.com HTTP RESTful API, using the library Faraday for the HTTP request/response cycle. If you need more information on how to use our library check the installation guide or the tutorial.
Usage
# Imports
require 'ruby-carrot'
require 'yaml'
require 'faraday'
require 'faraday_middleware'
# Initialize the library
vbCarrot = RubyCarrot::VBCarrot.new(0,'xxxxXXXXxxxxXXXX')
# Get information
response = vbCarrot.languages
response.to_yaml
puts response['languages']
# Post project
project = {
script: "Test project",
remarks: "Posted from Ruby-Carrot",
title: "Test Project"
}
response = vbCarrot.create_project(project)
response.to_yaml
puts response['project']
# Get a project
response = vbCarrot.get_project(response['project']['id'])
response.to_yaml
puts response['projects']
Request a VoiceBunny API Token
To use this library you need to request an API Token in the VoiceBunny.com Developer's Section.
TODO
- migrate the tests to Stubs instead of text files mocked JSON responses
- update the tests
Contributing
Feel free to fork our gem or add a pull request
Don't you like Ruby?
If you're not confortable with Ruby language, you can also check our other libraries:
Or why not, build your own library from scratch checking the API documentation.
Copyright
Copyright (c) 2008 Torrenegra IP, LLC. Distributed under Creative Commons CC-BY license.