{"id":29635037,"url":"https://github.com/schalkneethling/country-hub","last_synced_at":"2025-07-21T16:09:22.540Z","repository":{"id":300842505,"uuid":"1007328298","full_name":"schalkneethling/country-hub","owner":"schalkneethling","description":"A simple REST based service for country data","archived":false,"fork":false,"pushed_at":"2025-06-23T21:30:06.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T22:37:29.178Z","etag":null,"topics":["country-codes","country-data","netlify-functions","rest-api","typescript"],"latest_commit_sha":null,"homepage":"https://rad-kashata-f52c8e.netlify.app/country-hub","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schalkneethling.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":"2025-06-23T20:28:31.000Z","updated_at":"2025-06-23T21:42:45.000Z","dependencies_parsed_at":"2025-06-23T22:37:30.811Z","dependency_job_id":"ec2630fc-176f-43b4-87a9-b5450c16456b","html_url":"https://github.com/schalkneethling/country-hub","commit_stats":null,"previous_names":["schalkneethling/country-hub"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schalkneethling/country-hub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Fcountry-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Fcountry-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Fcountry-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Fcountry-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schalkneethling","download_url":"https://codeload.github.com/schalkneethling/country-hub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schalkneethling%2Fcountry-hub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266332665,"owners_count":23912663,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["country-codes","country-data","netlify-functions","rest-api","typescript"],"created_at":"2025-07-21T16:09:20.687Z","updated_at":"2025-07-21T16:09:22.528Z","avatar_url":"https://github.com/schalkneethling.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# country-hub\n\nA simple REST based service for country data\n\n## Live Demo\n\nThe API is deployed and available at: https://rad-kashata-f52c8e.netlify.app/country-hub\n\n## Usage\n\nThe API provides two endpoints:\n\n1. Get all countries:\n\n```bash\nGET /country-hub\n```\n\n**Response:**\n\n```json\n[\n  {\n    \"countryName\": \"Afghanistan\",\n    \"countryCode\": \"AF\"\n  },\n  {\n    \"countryName\": \"Åland Islands\",\n    \"countryCode\": \"AX\"\n  },\n  {\n    \"countryName\": \"South Africa\",\n    \"countryCode\": \"ZA\"\n  }\n  // ... more countries\n]\n```\n\n2. Get a specific country by country code:\n\n```bash\nGET /country-hub/{countryCode}\n```\n\n**Example:**\n\n```bash\nGET /country-hub/ZA\n```\n\n**Response:**\n\n```json\n{\n  \"countryName\": \"South Africa\",\n  \"countryCode\": \"ZA\"\n}\n```\n\n**Error Response (404):**\n\n```json\n{\n  \"error\": \"Country not found\"\n}\n```\n\n## Local Development\n\n### Prerequisites\n\n- Node.js (v18 or higher)\n- Netlify CLI\n\n### Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/schalkneethling/country-hub.git\ncd country-hub\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Start the local development server:\n\n```bash\nnetlify functions:serve\n```\n\nThe API will be available at `http://localhost:9999/country-hub`\n\n### Development Notes\n\n- **Path Parameters**: Due to a limitation in the local Netlify development environment, path parameters (`/country-hub/{countryCode}`) may not work correctly locally. For testing path parameters, use the production environment or deploy to a preview branch.\n- **Basic Endpoint**: The `/country-hub` endpoint (without parameters) works correctly in local development.\n\n## Data Format\n\nEach country object contains:\n\n- `countryName`: Full name of the country\n- `countryCode`: ISO 3166-1 alpha-2 country code\n\n## Deployment\n\nThis project is deployed on Netlify Functions. The function automatically handles routing for both endpoints:\n\n- `/country-hub` - Returns all countries\n- `/country-hub/:code` - Returns a specific country by code\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkneethling%2Fcountry-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschalkneethling%2Fcountry-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschalkneethling%2Fcountry-hub/lists"}