Login or Register to see your User ID and API Key.
Send your User ID, API Key, and any other paramters in a JSON POST request to the desired API path.
{
"user_id": 1,
"api_key": "3c2b3fec3de9939d6c111b5782a67992",
"parameter": "value"
}
The API returns JSON. Check success
or error
boolean in the response to verify if the call succeeded. When error
is true, error_code
and error_message
will also be provided.
{
"success": false,
"error": true,
"error_code": "game_bid_already_exists",
"error_message": "You already have a bid for this game."
}
https://karmadilemma.gooseweb.io/api/game/bid
{
"user_id": 1,
"api_key": "3c2b3fec3de9939d6c111b5782a67992",
"game_id": 3,
"amount": 50
}
curl -H "Content-Type: application/json" -X POST -d '{"user_id":"1","api_key":"3c2b3fec3de9939d6c111b5782a67992","game_id":3,"amount":50}' https://karmadilemma.gooseweb.io/api/game/bid
// Create URL
$path = 'game/bid';
var url = 'https://karmadilemma.gooseweb.io/api/' + $path;
// Create JSON POST
var data = {};
data.user_id = 1;
data.api_key = '3c2b3fec3de9939d6c111b5782a67992';
data.game_id = 3;
data.amount = 50;
// Perform API Call
var xhr = new XMLHttpRequest();
xhr.open('POST', url, false);
xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
xhr.send(JSON.stringify(data));
// Get Response
var response = JSON.parse(xhr.responseText);
if (response.error) {
console.log(response.error_code + ' - ' + response.error_message);
}
console.log(response);
// Create URL
$path = 'game/bid';
$url = 'https://karmadilemma.gooseweb.io/api/' . $path;
// Create JSON POST
$data = array();
$data['user_id'] = 1;
$data['api_key'] = '3c2b3fec3de9939d6c111b5782a67992';
$data['game_id'] = 3;
$data['amount'] = 50;
$post = json_encode($data);
// Perform API Call
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$raw_response = curl_exec($ch);
// Get Response
$response = json_decode($raw_response);
if ($response->error) {
echo $response->error_code . ' - ' . $response->error_message;
}
var_dump($response);
https://karmadilemma.gooseweb.io/api/
games_on_auction
started_games
finished_games
@1
is the direct you want to sort. Value must be asc
or desc
.@2
is the limit of results to get. Must be a positive integer. The maximum value is 100.@3
is the offset. Must be a positive integer.karma_on_auction
game/bid
game_id
. Must be a positive integer.amount
. Must be between an integer -100 (Lowest Bid) and 100 (Highest Bid).game/play
game_id
. Must be a positive integer.choice
. Must be either 0 (Do Nothing) or 1 (Take Action).karma/bid
karma_id
. Must be a positive integer.amount
. Must be between an integer 0 (Lowest Bid) and 100 (Highest Bid).karma/give
type
. Must be either 0 (Bad Karma) or 1 (Good Karma).other_player_user_id
. Must be a positive integer.karma/sell
type
. Must be either 0 (Bad Karma) or 1 (Good Karma).single_game/@1
@1
is the game id. Must be a positive integer.single_karma/@1
@1
is the karma id. Must be a positive integer.single_user/@1
@1
is the user id. Must be a positive integer.my_user
leaderboard/@1/@2/@3/@4
@1
is the column you want to sort by. Must be a valid column. Example: score
@2
is the direct you want to sort. Value must be asc
or desc
.@3
is the limit of results to get. Must be a positive integer. The maximum value is 100.@4
is the offset. Must be a positive integer.If you have a bot for this game, send the GitHub link to goosepostbox@gmail.com and I'll feature it here.