mcprohosting / spacegdn-bridge
该软件包最新版本(0.0.4)没有可用的许可证信息。
0.0.4
2014-07-22 15:10 UTC
Requires
- php: >=5.3.0
- guzzlehttp/guzzle: ~4.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-18 03:42:51 UTC
README
#SpaceGDN 桥接器
使用示例
$bridge = new Mcprohosting\Spacegdn\Bridge(); // Sets the location of the GDN $bridge->setEndpoint('gdn.api.xereo.net'); // Gets all jars: $results = $bridge->get('jars'); // Gets the second page of jars: $results = $bridge->get('jars')->page(2); // Gets all versions owned by jar #2: $results = $bridge->jar(2)->get('versions'); // Query demonstrating most GDN properties. $results = $bridge ->jar(2) ->get('builds') ->where('build', '>', 1234) ->orderBy('build', 'desc') ->page(3); // Results can be iterated over like an array: foreach ($results as $result) { echo $result->checksum . "\n"; } // Can be turned into json, explicitly or implicitly as a string (both do the same thing): echo $results->toJson(); echo $results; // And also can be accessed by property: print_r($results->pages);