{"id":28751090,"url":"https://github.com/api-platform/hypermedia-client","last_synced_at":"2025-10-30T10:40:53.066Z","repository":{"id":275588404,"uuid":"926575160","full_name":"api-platform/hypermedia-client","owner":"api-platform","description":"Hypermedia PHP Client","archived":false,"fork":false,"pushed_at":"2025-02-05T07:05:29.000Z","size":94,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T20:55:30.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/api-platform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null},"funding":{"github":"api-platform","open_collective":"api-platform","tidelift":"packagist/api-platform/core"}},"created_at":"2025-02-03T13:58:11.000Z","updated_at":"2025-03-10T07:47:48.000Z","dependencies_parsed_at":"2025-02-03T14:20:42.200Z","dependency_job_id":"971cb412-cf03-4446-8517-01c015f48925","html_url":"https://github.com/api-platform/hypermedia-client","commit_stats":null,"previous_names":["api-platform/hypermedia-client"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/api-platform/hypermedia-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-platform%2Fhypermedia-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-platform%2Fhypermedia-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-platform%2Fhypermedia-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-platform%2Fhypermedia-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/api-platform","download_url":"https://codeload.github.com/api-platform/hypermedia-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/api-platform%2Fhypermedia-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281793660,"owners_count":26562614,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-06-16T22:09:01.024Z","updated_at":"2025-10-30T10:40:53.022Z","avatar_url":"https://github.com/api-platform.png","language":"PHP","readme":"# Hypermedia Client\n\nCreates an HTTP Hypermedia client that leverages the [Hydra specification](https://www.hydra-cg.com/) \nthat makes Web APIs interoperable and set-up PHP classes for each documented API Resource. \n\n## Installation\n\n```console\ncomposer global require api-platform/hypermedia-client\n```\n\nOr [download the latest release](https://github.com/api-platform/hypermedia-client/releases).\n\n## Usage\n\n```console\nfetch-docs https://pr-500-demo.api-platform.com/docs -vvv --namespace '\\App' --directory demo/\n```\n\nFetch the documentation and create resource classes inside the `demo` directory.\n\n```php\n\u003c?php\n\nuse \\App\\Book;\n\n$books = (new Book)-\u003egetBookCollection();\n\n$book = $books[0];\n$book-\u003etitle = '1984';\n$book-\u003epatchBook();\n```\n\n## Internals\n\nEach resource is created as a PHP class with documented properties and HTTP operations:\n\n```php\n# demo/ApiResource/Book.php\n\u003c?php\n\nnamespace App; \n\n/**\n * @id https://schema.org/Book\n * @property string $book\n * @property string $title\n * @property string $author\n * @property mixed $condition\n * @property integer $rating\n * @method \\App\\Book getBookCollection(?array\u003cstring, mixed\u003e $options = null)\n */\n#[\\ApiPlatform\\HypermediaClient\\Link(\n    name: 'getBookCollection', \n    baseUri: 'https://demo.api-platform.com', \n    method: 'GET', \n    output: '\\App\\Book', \n    uriTemplatePropertyPath: '@id'\n)]\nclass Book extends \\ApiPlatform\\HypermediaClient\\ApiResource\n{\n}\n```\n","funding_links":["https://github.com/sponsors/api-platform","https://opencollective.com/api-platform","https://tidelift.com/funding/github/packagist/api-platform/core"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi-platform%2Fhypermedia-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapi-platform%2Fhypermedia-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapi-platform%2Fhypermedia-client/lists"}