Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m6w6/seekat
Because Kraken was too obvious
https://github.com/m6w6/seekat
Last synced: 4 days ago
JSON representation
Because Kraken was too obvious
- Host: GitHub
- URL: https://github.com/m6w6/seekat
- Owner: m6w6
- License: bsd-2-clause
- Created: 2014-01-15T19:16:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-06-09T21:29:10.000Z (over 2 years ago)
- Last Synced: 2024-04-27T11:32:55.409Z (7 months ago)
- Language: PHP
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# seekat
[![Build Status](https://travis-ci.org/m6w6/seekat.svg)](https://travis-ci.org/m6w6/seekat)
Fluent Github API access with [ext-http](https://github.com/m6w6/ext-http).
Support for the following promise providers built in:
* [ReactPHP](https://github.com/reactphp/promise)
* [AmPHP](https://github.com/amphp/amp)Supports plugging into your favourite event loop through
[http\Client's custom event loop interface](https://mdref.m6w6.name/http/Client/Curl/User).Simple example:
```php
repos->m6w6->seekat->readme->as("html")->then(function($readme) {
echo $readme;
}, function($error) {
echo $error;
});$api->send();
```Full example:
```php
configure([
"max_host_connections" => 10,
"max_total_connections" => 50,
]);$log = new Monolog\Logger("seekat");
$log->pushHandler(new Monolog\Handler\StreamHandler(STDERR, Monolog\Logger::WARNING));$api = new API(API\Future\react(), [
"Authorization" => "token ".getenv("GITHUB_TOKEN")
], null, $cli, $log);$api(function($api) {
$repos = yield $api->users->m6w6->repos([
"visibility" => "public",
"affiliation" => "owner"
]);
while ($repos) {
$next = next($repos);$batch = [];
foreach ($repos as $repo) {
$batch[] = $repo->hooks();
}
foreach (yield $batch as $key => $hooks) {
if (!count($hooks)) {
continue;
}
printf("%s:\n", $repos->{$key}->name);
foreach ($hooks as $hook) {
if ($hook->name == "web") {
printf("\t%s\n", $hook->config->url);
} else {
printf("\t%s\n", $hook->name);
}
}
}$repos = yield $next;
}
});
```## Installing
### Composer
composer require m6w6/seekat
## ChangeLog
A comprehensive list of changes can be obtained from the
[releases overview](https://github.com/m6w6/seekat/releases).## License
seekat is licensed under the 2-Clause-BSD license, which can be found in
the accompanying [LICENSE](./LICENSE) file.## Contributing
All forms of contribution are welcome! Please see the bundled
[CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed.The list of past and current contributors is maintained in [THANKS](./THANKS).