{"id":22292015,"url":"https://github.com/aedart/athenaeum-http-api","last_synced_at":"2025-07-28T23:32:54.433Z","repository":{"id":61935653,"uuid":"541118006","full_name":"aedart/athenaeum-http-api","owner":"aedart","description":"[READ ONLY] Athenaeum Http Api package - see https://github.com/aedart/athenaeum","archived":false,"fork":false,"pushed_at":"2025-07-21T08:07:20.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T10:13:12.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aedart.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}},"created_at":"2022-09-25T09:24:53.000Z","updated_at":"2025-07-21T08:07:23.000Z","dependencies_parsed_at":"2023-02-13T20:17:15.411Z","dependency_job_id":"34a77892-9344-40c1-86db-54128d00546a","html_url":"https://github.com/aedart/athenaeum-http-api","commit_stats":{"total_commits":52,"total_committers":1,"mean_commits":52.0,"dds":0.0,"last_synced_commit":"48c463e1362ba7e4baede0028a7887ba8bd87091"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/aedart/athenaeum-http-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aedart%2Fathenaeum-http-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aedart%2Fathenaeum-http-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aedart%2Fathenaeum-http-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aedart%2Fathenaeum-http-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aedart","download_url":"https://codeload.github.com/aedart/athenaeum-http-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aedart%2Fathenaeum-http-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266284078,"owners_count":23905043,"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":[],"created_at":"2024-12-03T17:19:17.588Z","updated_at":"2025-07-28T23:32:54.124Z","avatar_url":"https://github.com/aedart.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Athenaeum Http Api\n\nOpinionated utilities to help shape and format your API, using [Laravel's API Resources](https://laravel.com/docs/9.x/eloquent-resources).\n\n## Example\n\nThe following example shows an \"API Resource\", for an Eloquent User model.\n\n```php\nuse Aedart\\Http\\Api\\Resources\\ApiResource;\nuse Illuminate\\Http\\Request;\n\nclass UserResource extends ApiResource\n{\n    public function formatPayload(Request $request): array\n    {\n        return $this-\u003ewithTimestamps([\n            'id' =\u003e $this-\u003egetResourceKey(),\n            'name' =\u003e $this-\u003ename,\n            'roles' =\u003e $this-\u003ebelongsToManyReference('roles')\n                -\u003ewithLabel('name')\n                -\u003ewithSelfLink()\n                -\u003ewithResourceType();\n        ]);\n    }\n\n    public function type(): string\n    {\n        return 'user';\n    }\n}\n```\n\nWhen a response is returned for a single user, the following JSON will be output:\n\n```json\n{\n    \"data\": {\n        \"id\": 34,\n        \"name\": \"Retta Altenwerth Jr.\",\n        \"created_at\": \"2022-10-21T14:51:43+00:00\",\n        \"updated_at\": \"2022-10-21T14:51:43+00:00\",\n        \"roles\": [\n            {\n                \"id\": 23,\n                \"name\": \"Machine Operator\",\n                \"type\": \"role\",\n                \"self\": \"http://localhost/roles/23\"\n            },\n            {\n                \"id\": 56,\n                \"name\": \"File Clerk\",\n                \"type\": \"role\",\n                \"self\": \"http://localhost/roles/56\"\n            }\n        ]\n    },\n    \"meta\": {\n        \"type\": \"user\",\n        \"self\": \"http://localhost/users/34\"\n    }\n}\n```\n\n## Documentation\n\nPlease read the [official documentation](https://aedart.github.io/athenaeum/) for additional information.\n\n## Repository\n\nThe mono repository is located at [github.com/aedart/athenaeum](https://github.com/aedart/athenaeum)\n\n## Versioning\n\nThis package follows [Semantic Versioning 2.0.0](http://semver.org/)\n\n## License\n\n[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), Read the LICENSE file included in this package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faedart%2Fathenaeum-http-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faedart%2Fathenaeum-http-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faedart%2Fathenaeum-http-api/lists"}