Skip to content
viruch edited this page May 23, 2011 · 22 revisions

Communication

JSON is used for the communication between Server and Client.

Server API

get_stock

get_stock [ all | resource_id ] user_id 
example

Request

{ 
  get_stock: { 
    resource_id: 9
  }
}

Response

{ 
  command: 'get_stock',
  response: { 
    9: { amount: 10 }
  }
}
get_resource [ all | resource_id ] 
get_auctions [ all | resource_id ]
get_user user_id
buy auction_id
create_auction user_id resource_id amount price duration_sec

Client API

Clone this wiki locally