{"id":18697517,"url":"https://github.com/adrianosferreira/geophy","last_synced_at":"2025-11-08T16:30:38.533Z","repository":{"id":94272386,"uuid":"196458314","full_name":"adrianosferreira/geophy","owner":"adrianosferreira","description":"This is a gateway API built with PHP","archived":false,"fork":false,"pushed_at":"2019-07-14T23:28:45.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T04:14:05.562Z","etag":null,"topics":["gateway","gateway-api","php","slim"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianosferreira.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-07-11T20:05:59.000Z","updated_at":"2020-05-09T03:46:06.000Z","dependencies_parsed_at":"2023-03-08T22:45:33.461Z","dependency_job_id":null,"html_url":"https://github.com/adrianosferreira/geophy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianosferreira%2Fgeophy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianosferreira%2Fgeophy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianosferreira%2Fgeophy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianosferreira%2Fgeophy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianosferreira","download_url":"https://codeload.github.com/adrianosferreira/geophy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239558928,"owners_count":19658929,"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":["gateway","gateway-api","php","slim"],"created_at":"2024-11-07T11:24:35.684Z","updated_at":"2025-11-08T16:30:38.471Z","avatar_url":"https://github.com/adrianosferreira.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n## GeoPhy Gateway API [![Build Status](https://travis-ci.org/adrianosferreira/geophy.svg?branch=master)](https://travis-ci.org/adrianosferreira/geophy)\n\nThis is a gateway API very useful in situations where you need to gather data from different endpoints without overloading the Client, which can be a Mobile, a Web app or another API.\n\nThe idea is to make a single REST request and let the gateway do the remaining requests and mount the expected response for the Client.\n\nIn this case, we are working with Attom's API: https://api.developer.attomdata.com\n\nPlease look at the image below:\n\n![alt text](example.png \"Gateway API\")\n\nImagine that the Client application needs a list of properties under certain address (zip), sales history information and also schools around. Without the Gateway API, the Client would need to do at least 21 requests.\n\nThis pattern would reduce the Client request into a single one and let the gateway (more robust machine) do the rest of the requests and prepare the response.\n\nI didn't want to take this so long, but this could be also a good solution for aggregating other properties from distinct web services.\n\n## Endpoints\n\nThere are 2 endpoints in here:\n\n- `/api/v1/auth`: this api uses JSON Web Token Authentication, so you should pass any `username` and `password` and it will generate a token which will let you access the other routes. To access the other routes, you must authenticate by adding a header `X-Token=YOUR_TOKEN`\n- `/api/v1/properties`: this returns a list of properties under certain address. It accepts GET method and `zip` parameter, e.g: `/api/v1/properties?zip=80212`\n\nThis app is hosted on Heroku, so routes are:\n\n- https://geophy-gateway-api.herokuapp.com/api/v1/auth\n- https://geophy-gateway-api.herokuapp.com/api/v1/properties\n\nRequest for getting token:\n\n```\ncurl --header \"username: adriano\" --header \"password: pass\" https://geophy-gateway-api.herokuapp.com/api/v1/auth\n```\n\nRequest for properties:\n\n```\ncurl --header \"X-Token: YOUR_TOKEN_GOES_HERE\" https://geophy-gateway-api.herokuapp.com/api/v1/properties?zip=80202\n```\n\n## Stack\n\n- Slim\n- Slim JWT Auth\n- PHP JWT\n- PHPUnit\n- Mockery\n- Guzzle\n- Docker\n- Composer\n- Travis CI","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianosferreira%2Fgeophy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianosferreira%2Fgeophy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianosferreira%2Fgeophy/lists"}