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"); |
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"); |
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) | |
try: | |
result = client.TodoManager.createTodo({ "title" : "Call Mom", "completed" : False }) | |
print result | |
except barrister.RpcException as e: |
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) | |
begin | |
result = client.TodoManager.createTodo({ 'title' => 'Call Mom', 'completed' => false }) | |
puts 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 ruby | |
require 'forwardable' | |
require 'barrister' | |
require 'sinatra' | |
require './store.rb' | |
class TodoManager | |
def initialize(store) | |
@store = store |
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 | |
from bottle import run, post, request | |
from store import Store | |
from functools import wraps | |
import sys | |
class TodoManager(object): |
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 express = require('express') | |
, fs = require('fs') | |
, http = require('http') | |
, path = require('path') | |
, barrister = require('barrister') | |
, store = require("./store").store | |
, idl = JSON.parse(fs.readFileSync("../todo_manager.v1.json").toString()); | |
var app = express(); |
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 ( | |
t "./todos" | |
"fmt" | |
"github.com/coopernurse/barrister-go" | |
"net/http" | |
) | |
type TodoManagerImpl struct { |
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
{ | |
"jsonrpc":"2.0", | |
"id":"bv0D1yRJhkABZ3fx8ofU", | |
"method":"TodoManager.createTodo", | |
"params":[ | |
{ | |
"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 | |
from bottle import run, post, request | |
from store import Store | |
from functools import wraps | |
import sys | |
class TodoManager: |