{"id":21541855,"url":"https://github.com/mohamed-samir907/poller","last_synced_at":"2026-04-17T12:31:18.487Z","repository":{"id":154162616,"uuid":"632017448","full_name":"mohamed-samir907/poller","owner":"mohamed-samir907","description":"Do a Server Polling with PHP in a simple way","archived":false,"fork":false,"pushed_at":"2023-04-24T14:37:40.000Z","size":589,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T22:59:44.901Z","etag":null,"topics":["laravel","laravel-framework","php","php-framework","php8","phpunit","polling"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamed-samir907.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-24T14:36:04.000Z","updated_at":"2024-02-05T10:08:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd66a908-235e-49cd-954e-91d77b095f3b","html_url":"https://github.com/mohamed-samir907/poller","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mohamed-samir907/poller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-samir907%2Fpoller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-samir907%2Fpoller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-samir907%2Fpoller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-samir907%2Fpoller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamed-samir907","download_url":"https://codeload.github.com/mohamed-samir907/poller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-samir907%2Fpoller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31929492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-framework","php","php-framework","php8","phpunit","polling"],"created_at":"2024-11-24T05:07:51.927Z","updated_at":"2026-04-17T12:31:18.469Z","avatar_url":"https://github.com/mohamed-samir907.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Poller\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/mosamirzz/poller.svg?style=flat-square)](https://packagist.org/packages/mosamirzz/poller)\n[![Total Downloads](https://img.shields.io/packagist/dt/mosamirzz/poller.svg?style=flat-square)](https://packagist.org/packages/mosamirzz/poller)\n![GitHub Actions](https://github.com/poller/mosamirzz/actions/workflows/main.yml/badge.svg)\n\n![alt text](carbon.png)\n\nA very simple way to do a Polling mechanism using PHP.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require mosamirzz/poller\n```\n\n## Usage\n\n```php\n$result = Poller::do(\n    fn () =\u003e Http::get(\"https://ads-api.tiktok.com/api/status/get/\", [\n        \"advertiser_id\" =\u003e 12345678,\n        \"task_id\" =\u003e 23456789,\n    ])\n)-\u003eevery(seconds: 5)\n    -\u003efailAfter(attempts: 3)\n    -\u003estopWhen(\n        fn (mixed $result): bool =\u003e $result[\"status\"] == \"SUCCESS\"\n    )\n    -\u003eonFail(function (Throwable $e) {\n        Log::error(\"Got an error\", [\n            \"msg\" =\u003e $e-\u003egetMessage(),\n            \"code\" =\u003e $e-\u003egetCode(),\n        ]);\n    })\n    -\u003estart();\n```\n\n### Testing\n\n```bash\ncomposer test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email gm.mohamedsamir@gmail.com instead of using the issue tracker.\n\n## Credits\n\n-   [Mohamed Samir](https://github.com/poller)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## PHP Package Boilerplate\n\nThis package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com) by [Beyond Code](http://beyondco.de/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-samir907%2Fpoller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamed-samir907%2Fpoller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-samir907%2Fpoller/lists"}