{"id":25026264,"url":"https://github.com/benmacha/ubereat-php","last_synced_at":"2025-04-30T12:45:17.057Z","repository":{"id":275484711,"uuid":"926209900","full_name":"BenMacha/ubereat-php","owner":"BenMacha","description":"A modern PHP SDK for the UberEats API, supporting PHP 7.4 and above.","archived":false,"fork":false,"pushed_at":"2025-02-28T20:19:04.000Z","size":58,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T21:36:44.931Z","etag":null,"topics":["php","sdk","sdk-php","symfony","uber","ubereats"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/ubereats/php-sdk","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BenMacha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","license":"LICENSE","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},"funding":{"github":"benmacha"}},"created_at":"2025-02-02T20:03:32.000Z","updated_at":"2025-02-28T20:19:07.000Z","dependencies_parsed_at":"2025-02-25T10:19:35.634Z","dependency_job_id":"b20d0f17-c673-47d4-897b-ada9dda72c4a","html_url":"https://github.com/BenMacha/ubereat-php","commit_stats":null,"previous_names":["benmacha/ubereat-php"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenMacha%2Fubereat-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenMacha%2Fubereat-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenMacha%2Fubereat-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenMacha%2Fubereat-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenMacha","download_url":"https://codeload.github.com/BenMacha/ubereat-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251703193,"owners_count":21630194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["php","sdk","sdk-php","symfony","uber","ubereats"],"created_at":"2025-02-05T17:35:52.473Z","updated_at":"2025-04-30T12:45:17.033Z","avatar_url":"https://github.com/BenMacha.png","language":"PHP","funding_links":["https://github.com/sponsors/benmacha"],"categories":[],"sub_categories":[],"readme":"# UberEats PHP SDK\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/ubereats/php-sdk.svg)](https://packagist.org/packages/ubereats/php-sdk)\n[![Total Downloads](https://img.shields.io/packagist/dt/ubereats/php-sdk.svg)](https://packagist.org/packages/ubereats/php-sdk)\n[![License](https://img.shields.io/github/license/BenMacha/ubereat-php.svg)](LICENSE)\n[![CI](https://github.com/BenMacha/ubereat-php/actions/workflows/ci.yml/badge.svg)](https://github.com/BenMacha/ubereat-php/actions/workflows/ci.yml)\n[![PHP Version](https://img.shields.io/packagist/php-v/ubereats/php-sdk.svg)](composer.json)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/BenMacha/ubereat-php/ci.yml?branch=main)](https://github.com/BenMacha/ubereat-php/actions)\n[![Code Coverage](https://img.shields.io/codecov/c/github/BenMacha/ubereat-php)](https://codecov.io/gh/BenMacha/ubereat-php)\n[![PHPStan](https://img.shields.io/badge/PHPStan-max-brightgreen.svg)](https://github.com/phpstan/phpstan)\n[![PHP CS Fixer](https://img.shields.io/badge/PHP%20CS%20Fixer-PSR--12-brightgreen.svg)](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)\n![Support Palestine](https://img.shields.io/badge/🇵🇸%20Support-Palestine-008000?style=flat\u0026logo=data:image/svg+xml;base64,...)\n\nA modern PHP SDK for the UberEats API, supporting PHP 7.4 and above.\n\n## Features\n\n- 🚀 Modern PHP 7.4+ with strict typing\n- 🔒 Type-safe request/response objects\n- 🧪 Comprehensive test coverage\n- 📝 Detailed documentation\n- 🔄 Webhook support\n- 🛠️ PSR-3 logging support\n- 🎯 PSR-12 coding standards\n- 🔍 Static analysis with PHPStan level max\n\n## Requirements\n\n- PHP 7.4 or higher\n- Composer\n- Guzzle HTTP Client\n- PSR-3 Logger (optional)\n\n## Documentation\n\n- [Getting Started](docs/getting-started.md)\n- [Working with Orders](docs/orders.md)\n- [Working with Stores](docs/stores.md)\n- [Working with Deliveries](docs/deliveries.md)\n- [Integration Features](docs/integration.md)\n\n## Installation\n\n```bash\ncomposer require ubereats/php-sdk\n```\n\n## Basic Usage\n\n```php\nuse UberEats\\Client\\UberEatsClient;\n\n// Create client instance\n$client = new UberEatsClient();\n\n// Authenticate\n$token = $client-\u003eauthenticate(\n    clientId: 'your-client-id',\n    clientSecret: 'your-client-secret'\n);\n\n// Get order details\n$order = $client-\u003egetOrder('order-id');\n\n// Get store details\n$store = $client-\u003egetStore('store-id');\n```\n\n## Available Methods\n\n### Authentication\n- `authenticate(string $clientId, string $clientSecret): AccessToken`\n\n### Orders\n- `getOrder(string $orderId): Order`\n- `acceptOrder(string $orderId, AcceptOrderRequest $request): Order`\n- `denyOrder(string $orderId, DenyOrderRequest $request): Order`\n- `cancelOrder(string $orderId, CancelOrderRequest $request): Order`\n\n### Stores\n- `getStore(string $storeId): Store`\n- `getStores(): StoreCollection`\n\n## Webhook Handling\n\n```php\nuse UberEats\\Webhook\\WebhookHandler;\n\n$handler = new WebhookHandler();\n$event = $handler-\u003ehandle($payload);\n\nswitch ($event-\u003etype) {\n    case 'orders.notification':\n        handleOrderNotification($event);\n        break;\n    case 'orders.scheduled.notification':\n        handleScheduledOrder($event);\n        break;\n    case 'delivery.state_changed':\n        handleDeliveryStateChange($event);\n        break;\n    default:\n        throw new \\InvalidArgumentException('Unknown event type');\n}\n```\n\n## Error Handling\n\nThe SDK throws `UberEatsException` for any API errors. Each exception includes:\n- HTTP status code\n- Error message\n- Original response data\n\n```php\ntry {\n    $order = $client-\u003egetOrder('invalid-id');\n} catch (UberEatsException $e) {\n    echo $e-\u003egetMessage();\n    echo $e-\u003egetCode();\n}\n```\n\n## Development\n\n### Testing\n\n```bash\ncomposer test\n```\n\n### Static Analysis\n\n```bash\ncomposer phpstan\n```\n\n### Code Style\n\n```bash\ncomposer cs-fix\n```\n\n### Code Coverage\n\n```bash\ncomposer test-coverage\n```\n\n## Security\n\nIf you discover any security related issues, please email contact@benmacha.tn instead of using the issue tracker.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## Changelog\n\nPlease see [CHANGELOG.md](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [BEN MECHA Ali](https://github.com/benmacha)\n- [All Contributors](../../contributors)\n\n## License\n\nThis package is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmacha%2Fubereat-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenmacha%2Fubereat-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenmacha%2Fubereat-php/lists"}