{"id":21125352,"url":"https://github.com/mikebionic/country-api","last_synced_at":"2025-03-14T11:40:31.140Z","repository":{"id":263664579,"uuid":"891097988","full_name":"mikebionic/country-api","owner":"mikebionic","description":"Golang Gin Countries and Cities locale api, easy configurable and ready to deploy!","archived":false,"fork":false,"pushed_at":"2025-01-19T12:31:03.000Z","size":3732,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T13:25:27.349Z","etag":null,"topics":["city","country","gin","go","golang","information","location"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mikebionic.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":"2024-11-19T18:11:26.000Z","updated_at":"2025-01-19T12:30:44.000Z","dependencies_parsed_at":"2024-11-19T19:49:54.987Z","dependency_job_id":"f48ca527-6150-4edc-a48e-f09798eb62ab","html_url":"https://github.com/mikebionic/country-api","commit_stats":null,"previous_names":["mikebionic/country-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fcountry-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fcountry-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fcountry-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fcountry-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikebionic","download_url":"https://codeload.github.com/mikebionic/country-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573162,"owners_count":20312879,"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":["city","country","gin","go","golang","information","location"],"created_at":"2024-11-20T04:32:59.274Z","updated_at":"2025-03-14T11:40:31.117Z","avatar_url":"https://github.com/mikebionic.png","language":"Go","readme":"# CountryApi Go\n\nThis application is a standalone service designed specifically to provide server country and city information. It uses a dedicated database and can be seamlessly integrated into other applications to supply geolocation data.\n\n## Docker Image Deployment\n\n```bash\n# Ensure you've installed docker on your machine.\ncd country-api/\ndocker compose up -d\n```\n\nCheck **.env.docker** for more info\nAPP runs on port **7888**, configure your proxy manager accordingly\n\n---\n\n## Manual Deployment\n\n\u003e Please double check scripts in case if they work incorrectly, check folders, permissions and configurations!\n\nPut this repo folder in:\n**~/country_backend/countryApi**\n\n### BE CAREFUL, **make db** drops the whole db, modify script beforehand\n\nUpdate the application using script:\n\n```bash\nbash ~/country_backend/countryApi/scripts/update.sh\n```\n\n```bash\nmake db\nmake dev\n```\n\nBuilding the application:\n\n```bash\nmake build\n```\n\n---\n\n## Postman Collection\n\nThis repository includes a Postman collection to help you test and interact with the application's API endpoints. The collection contains pre-configured requests for retrieving server country and city information.\n\n### How to Use the Collection\n\n1. **Install Postman**  \n   Make sure you have [Postman](https://www.postman.com/downloads/) installed on your system.\n\n2. **Import the Collection**\n\n   - Download the Postman collection JSON file from this repository.\n   - Open Postman, click on the **Import** button, and upload the JSON file.\n\n3. **Set Up Environment Variables** _(Optional but recommended)_\n\n   - The collection supports environment variables to simplify testing.\n   - Create a new environment in Postman and define the following variables:\n     - `BASE_URL`: The base URL of your API (e.g., `http://localhost:7888` or your production URL).\n\n4. **Run the Requests**\n   - After importing, you can test each API endpoint directly from the collection.\n   - Ensure the server is running, and make sure the `BASE_URL` is set correctly.\n\n### API Endpoints Overview\n\nHere are some key endpoints included in the Postman collection:\n\n- **`GET /country`**  \n  Retrieves the country information for the server.  \n  **Example Response:**\n\n  ```json\n  {\n    \"country\": \"United States\"\n  }\n  ```\n\n- **`GET /city`**  \n  Retrieves the city information for the server.  \n  **Example Response:**\n\n  ```json\n  {\n    \"city\": \"San Francisco\"\n  }\n  ```\n\n- **`GET /location`**  \n  Combines both country and city information.  \n  **Example Response:**\n  ```json\n  {\n    \"country\": \"United States\",\n    \"city\": \"San Francisco\"\n  }\n  ```\n\n### Contributing\n\nIf you find an issue with the Postman collection or would like to enhance it, feel free to submit a pull request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fcountry-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebionic%2Fcountry-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fcountry-api/lists"}