Skip to content

Commit

Permalink
Use snake_case in ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
mccallumjack committed Nov 22, 2017
1 parent 69d83cc commit a582f20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,25 @@ Usage
Send the image request using a file:

```ruby
requestData = Cloudsight::Request.send(locale: 'en', file: File.open('image.jpg'))
request_data = Cloudsight::Request.send(locale: 'en', file: File.open('image.jpg'))
```

Or, you can send the image request using a URL:

```ruby
requestData = Cloudsight::Request.send(locale: 'en', url: 'http://www.google.com/images/srpr/logo11w.png')
request_data = Cloudsight::Request.send(locale: 'en', url: 'http://www.google.com/images/srpr/logo11w.png')
```

Then, use the token to retrieve the response:

```ruby
responseData = Cloudsight::Response.get(requestData['token'])
response_data = Cloudsight::Response.get(request_data['token'])
```

You can also use the `retrieve` method which will poll for the response for you:

```ruby
Cloudsight::Response.retrieve(requestData['token']) do |responseData|
p responseData
Cloudsight::Response.retrieve(request_data['token']) do |response_data|
p response_data
end
```

0 comments on commit a582f20

Please sign in to comment.