{"id":15516747,"url":"https://github.com/samrap/store_locator_api","last_synced_at":"2025-03-28T19:29:42.611Z","repository":{"id":81609778,"uuid":"140127484","full_name":"samrap/store_locator_api","owner":"samrap","description":"A store locator API written in Rails","archived":false,"fork":false,"pushed_at":"2018-07-13T23:11:56.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T21:29:07.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/samrap.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":"2018-07-08T00:58:15.000Z","updated_at":"2023-01-14T20:29:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e234ff15-7f1f-4f16-844d-385ef55869c5","html_url":"https://github.com/samrap/store_locator_api","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/samrap%2Fstore_locator_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Fstore_locator_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Fstore_locator_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Fstore_locator_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrap","download_url":"https://codeload.github.com/samrap/store_locator_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246088053,"owners_count":20721620,"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-10-02T10:09:48.990Z","updated_at":"2025-03-28T19:29:42.599Z","avatar_url":"https://github.com/samrap.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Store Locator API\n\nA RESTful API written in Rails that provides functionality for a store locator. Complete with CRUD functionality on both locations and business hours as well as full search functionality by current location (coordinates) and address.\n\n**The main purpose of this project is to learn Ruby and Rails. It is a lighter-weight version of an API I wrote as a Laravel package at my current job.**\n\n## Roadmap\n\n- [x] Implement CRUD functionality for locations\n- [x] Implement all fields for locations\n- [x] Implement search by coordinates\n- [x] Implement search by address (will require integration with the Google Geocoding API)\n\n## API Documentation\n\nIn the following section, we will explore the various endpoints and parameters for the API.\n\n### All locations\n---\n\nReturns JSON data containing every location in the database.\n\n* **URL**\n  `/locations`\n* **Method**\n  `GET`\n* **URL Params**\n  **Optional**\n  `search=[query]`\n  Search for locations within a 20 mile radius of the given query.\n  The `query` can be one of two values:\n  1. A geocodeable string, such as an address or city.\n  2. A set of coordinates: `33.6595,-117.9988`. This is useful in cases where the\n  client has access to the user's location via coordinates and avoids the need\n  to hit an API service before running the database query.\n* **Data Params**\n  None\n* **Success Response**\n  * **Code:** 200\u003cbr\u003e\n    **Content:** `[{\"name\": \"Dimension C-132\",...},...]`\n* **Error Response**\n  There is no error response for this request. If no locations are present, empty JSON will be returned.\n\n### Show Location\n---\n\nReturns JSON for a single location resource.\n\n* **URL**\n  `/locations/:id`\n* **Method**\n  `GET`\n* **URL Params**\n  None\n* **Data Params**\n  None\n* **Success Response**\n  * **Code:** 200\u003cbr\u003e\n    **Content:** `{\"name\": \"Dimension C-132\",...}`\n* **Error Response**\n  * **Code:** 404\u003cbr\u003e\n    **Content:** `{\"message\": \"Couldn't find Location with 'id'=:id\"}`\n\n### Create Location\n---\n\nCreate a new location resource.\n\n* **URL**\n  `/locations`\n* **Method**\n  `POST`\n* **URL Params**\n  None\n* **Data Params**\n  **Required:**\n  `name=[string]`\n  **Optional:**\n  `address=[string]`\n  `address_2=[string]`\n  `city=[string]`\n  `state=[string:2]`\n  `zip=[string]`\n  `latitude=[float]`\n  `longitude=[float]`\n\n  The `latitude` and `longitude` columns will automatically be calculated if the `address` is provided in the request. It is recommended to provide at least `address` and `zip` to ensure proper geocoding for the location's coordinates.\n* **Success Response**\n  * **Code:** 201\u003cbr\u003e\n    **Content:** `{\"name\": \":name\",...}`\n* **Error Response**\n  * **Code:** 422\u003cbr\u003e\n    **Content:** `{\"message\": \"Validation failed: Name can't be blank\"}`\n\n### Update Location\n---\n\nUpdate an existing location resource.\n\n* **URL**\n  `/locations/:id`\n* **Method**\n  `PATCH`\n* **URL Params**\n  None\n* **Data Params**\n  **Optional:**\n  `name=[string]`\n  `address=[string]`\n  `address_2=[string]`\n  `city=[string]`\n  `state=[string:2]`\n  `zip=[string]`\n  `latitude=[float]`\n  `longitude=[float]`\n\n  The `latitude` and `longitude` columns will automatically be _re-calculated_ if the `address` was updated. It is recommended to provide at least `address` and `zip` to ensure proper geocoding for the location's coordinates.\n* **Success Response**\n  * **Code:** 204\u003cbr\u003e\n    **Content:** None\n* **Error Response**\n  * **Code:** 404\u003cbr\u003e\n    **Content:** `{\"message\": \"Couldn't find Location with 'id'=:id\"}`\n\n### Destroy Location\n---\n\nCreate a new location resource.\n\n* **URL**\n  `/locations/:id`\n* **Method**\n  `DELETE`\n* **URL Params**\n  None\n* **Data Params**\n  None\n* **Success Response**\n  * **Code:** 204\u003cbr\u003e\n    **Content:** None\n* **Error Response**\n  * **Code:** 404\u003cbr\u003e\n    **Content:** `{\"message\": \"Couldn't find Location with 'id'=:id\"}`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrap%2Fstore_locator_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrap%2Fstore_locator_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrap%2Fstore_locator_api/lists"}