revdotcom/rev-ruby-sdk

Update and Add documentation

Opened this issue · 5 comments

Some of the information in the gem is not up to date. As a user I'd like documentation for the SDK to be useful and accurate to the api it's accessing when I'm using the gem.

As of now if there are any questions about the api, users can refer to Rev's api documentation here which should contain the latest and most accurate information about the api. Note: The gem may not support all aspects of the api that a user may find in the docs.

Example: To place an order to the sandbox use the following command

require 'rev-api'
rev_client = Rev.new('[Replace this with your ClientApiKey]','[Replace this with your UserAPIKey]', Rev::Api::SANDBOX_HOST)

inputs = [Rev::Input.new(audio_length_seconds: 180, external_link: 'https://www.youtube.com/watch?v=U6OoCaGsz94')]
cp_options = Rev::CaptionOptions.new(inputs)
request = Rev::OrderRequest.new(:caption_options => cp_options)
rev_client.submit_order(request)

Blake I'm having trouble with getting started with the API. Just trying to do a simple request to get orders and I'm getting a NotAuthorizedError.

I'm using the rev-api gem 2.3.2 version.

Here's my initializer in Rails:

Screen Shot 2019-08-13 at 9 32 41 AM

Here's the error I'm getting:

Screen Shot 2019-08-13 at 9 32 30 AM

Can you help me get authorization to use the sandbox environment?

I've verified I have the correct client key and user key.

Hi Harry!

We've had a couple reports of 401's on our sandbox in the last 24h. We are currently investigating the issue.

Do you get the same error if using something like Postman or cURL to make the same request(retrieve orders)?

Blake I got it working. One of my keys ended with = when you double click to highlight a string on a mac for some reason it doesn't include = at the end of the string. All that to say I didn't copy and paste that key correctly into my ruby code. Thanks

Blake I was able to test successfully in sandbox and now want to test in production.

I see V1 API User Key in my Account Settings but there is no client key. In production, I tried using my sandbox client key with the V1 API User Key from my Account Settings and I'm getting Rev::NotAuthorizedError. Do I need to get additional keys / permission from you all or do I likely have a bug on my end?

Mike helped me out today so I've got my keys, thanks!