Skip to content

Instantly share code, notes, and snippets.

@akeinhell
Created March 30, 2015 04:49
Show Gist options
  • Save akeinhell/768af0e2e3361c1b8918 to your computer and use it in GitHub Desktop.
Save akeinhell/768af0e2e3361c1b8918 to your computer and use it in GitHub Desktop.
test wg
<?php
require 'src/WotApi/Api.php';
require 'vendor/autoload.php';
use WotApi\Api;
Api::create()->setApplicationId('demo');
Api::onSuccess(
function($response, $args){
print '->'.sizeof(explode(',',$args[0]['clan_id'])).' OK'.PHP_EOL;
}
);
Api::onError(
function($error, $args){
print '->'.sizeof($args).' fail -- '.var_export($error, true).PHP_EOL;
}
);
$clans = array();
$x = 0;
while($x<150)
{
$clans[] = rand(1, 100000);
Api::wgn()->clans->info(['clan_id'=>implode(',', $clans)]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment