This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'barrister' | |
trans = Barrister::HttpTransport.new("http://localhost:3000/v1/todos") | |
client = Barrister::Client.new(trans) | |
batch = client.start_batch() | |
batch.TodoManager.createTodo({ 'title' => 'Call Mom', 'completed' => false }) | |
batch.TodoManager.createTodo({ 'title' => 'Call Dad', 'completed' => false }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import barrister | |
trans = barrister.HttpTransport("http://localhost:3000/v1/todos") | |
client = barrister.Client(trans) | |
batch = client.start_batch() | |
batch.TodoManager.createTodo({ "title" : "Call Mom", "completed" : False }) | |
batch.TodoManager.createTodo({ "title" : "Call Dad", "completed" : False }) | |
batch.TodoManager.createTodo({ "title" : "Wash car", "completed" : False }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import barrister | |
trans = barrister.HttpTransport("http://localhost:3000/v1/todos") | |
client = barrister.Client(trans) | |
batch = client.start_batch() | |
batch.TodoManager.createTodo({ "title" : "Call Mom", "completed" : False }) | |
batch.TodoManager.createTodo({ "title" : "Call Dad", "completed" : False }) | |
batch.TodoManager.createTodo({ "title" : "Wash car", "completed" : False }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
include_once("./lib/barrister.php"); | |
$barrister = new Barrister(); | |
$client = $barrister->httpClient("http://localhost:3000/v1/todos"); | |
$batch = $client->startBatch(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var barrister = require('barrister'); | |
var client = barrister.httpClient("http://localhost:3000/v1/todos"); | |
client.loadContract(function(err) { | |
var batch = client.startBatch(); | |
var batchTodoManager = batch.proxy("TodoManager"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = Barrister.httpClient("/v1/todos"); | |
client.loadContract(function() { | |
var batch = client.startBatch(); | |
var batchTodoManager = batch.proxy('TodoManager'); | |
batchTodoManager.createTodo({ 'title' : 'Call Mom', 'completed' : false }) | |
batchTodoManager.createTodo({ 'title' : 'Call Dad', 'completed' : false }) | |
batchTodoManager.createTodo({ 'title' : 'Wash car', 'completed' : false }) | |
batchTodoManager.createTodo({ 'title' : 'Eat Ham', 'completed' : false }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/coopernurse/barrister-go" | |
"todo_manager" | |
) | |
func NewTodoManagerProxy(url string) todo_manager.TodoManager { | |
trans := &barrister.HttpTransport{Url: url} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = Barrister.httpClient("/v1/todos"); | |
client.loadContract(function() { | |
var proxy = client.proxy('TodoManager'); | |
var properties = { 'title' : 'Call Dad', 'completed' : false }; | |
proxy.createTodo(properties, function(err, result) { | |
if (err) { | |
console.log(JSON.stringify(err)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var barrister = require('barrister'); | |
var client = barrister.httpClient('http://localhost:3000/v1/todos'); | |
client.loadContract(function(err) { | |
var proxy = client.proxy('TodoManager'); | |
var properties = { 'title' : 'Call Dad', 'completed' : false }; | |
proxy.createTodo(properties, function(err, result) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
include_once("./lib/barrister.php"); | |
$barrister = new Barrister(); | |
$client = $barrister->httpClient("http://localhost:3000/v1/todos"); | |
$proxy = $client->proxy("TodoManager"); |