Skip to content

Instantly share code, notes, and snippets.

@laser
Created May 12, 2014 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laser/cd202f31bb72cb2c7c97 to your computer and use it in GitHub Desktop.
Save laser/cd202f31bb72cb2c7c97 to your computer and use it in GitHub Desktop.
Basic Client - Ruby
#!/usr/bin/env ruby
require 'barrister'
trans = Barrister::HttpTransport.new("http://localhost:3000/v1/todos")
client = Barrister::Client.new(trans)
begin
result = client.TodoManager.createTodo({ 'title' => 'Call Mom', 'completed' => false })
puts result
rescue Barrister::RpcException => e
puts "err.code=#{e.code}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment