{"id":18367851,"url":"https://github.com/photon/api-json","last_synced_at":"2025-08-19T00:08:25.537Z","repository":{"id":57039261,"uuid":"106468586","full_name":"photon/api-json","owner":"photon","description":"Helper to write API with json payload","archived":false,"fork":false,"pushed_at":"2020-10-20T13:36:14.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-19T20:43:56.515Z","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":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/photon.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}},"created_at":"2017-10-10T20:37:00.000Z","updated_at":"2020-10-20T13:35:55.000Z","dependencies_parsed_at":"2022-08-23T23:31:00.417Z","dependency_job_id":null,"html_url":"https://github.com/photon/api-json","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/photon/api-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photon%2Fapi-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photon%2Fapi-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photon%2Fapi-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photon%2Fapi-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/photon","download_url":"https://codeload.github.com/photon/api-json/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photon%2Fapi-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271078587,"owners_count":24695473,"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-08-18T02:00:08.743Z","response_time":89,"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":"2024-11-05T23:23:43.305Z","updated_at":"2025-08-19T00:08:25.504Z","avatar_url":"https://github.com/photon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"api-json\n========\n\nViews helper to create REST APIs\n\nQuick start\n-----------\n\n1) Add the module\n\nUse composer to add the module in your project\n\n\tcomposer require \"photon/api-json:dev-master\"\n\nor for a specific version\n\n\tcomposer require \"photon/api-json:1.0.0\"\n\n2) Create an API Endpoint\n\nEach class will handle all HTTP methods for an URL\n\n\tclass MyAPIEndpoint extends \\photon\\views\\APIJson\\Rest\n\t{\n\t  public function GET($request, $match)\n\t  {\n\t\treturn array(\n\t\t  'ok' =\u003e true,\n\t\t  'method' =\u003e $request-\u003emethod\n\t\t);\n\t  }\n\t}\n\n3) Enjoy !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoton%2Fapi-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoton%2Fapi-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoton%2Fapi-json/lists"}