{"id":20452624,"url":"https://github.com/lamba01/rest-countries","last_synced_at":"2025-12-06T06:03:01.140Z","repository":{"id":177850165,"uuid":"656205701","full_name":"lamba01/Rest-countries","owner":"lamba01","description":"This is a Challenge to display countries and their data from Rest API using JavaScript","archived":false,"fork":false,"pushed_at":"2023-10-01T12:49:23.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T09:48:01.897Z","etag":null,"topics":["countries-api","fetch-api","javascript","nextjs","responsive-design","responsive-grid","rest-api","restful-api"],"latest_commit_sha":null,"homepage":"https://countrysapis.netlify.app/","language":"JavaScript","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/lamba01.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":"2023-06-20T13:14:56.000Z","updated_at":"2023-07-18T09:32:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5e1320e-dc1c-4473-9c78-1083515fa11d","html_url":"https://github.com/lamba01/Rest-countries","commit_stats":null,"previous_names":["lamba01/rest-countries"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lamba01/Rest-countries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamba01%2FRest-countries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamba01%2FRest-countries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamba01%2FRest-countries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamba01%2FRest-countries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamba01","download_url":"https://codeload.github.com/lamba01/Rest-countries/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamba01%2FRest-countries/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27536591,"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-12-06T02:00:06.463Z","response_time":60,"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":["countries-api","fetch-api","javascript","nextjs","responsive-design","responsive-grid","rest-api","restful-api"],"created_at":"2024-11-15T11:09:48.966Z","updated_at":"2025-12-06T06:03:01.122Z","avatar_url":"https://github.com/lamba01.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rest-countries\n# Frontend Mentor - REST Countries API  solution\n\nThis is a solution to the [REST Countries API challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/rest-countries-api-with-color-theme-switcher-5cacc469fec04111f7b848ca). Frontend Mentor challenges help you improve your coding skills by building realistic projects. \n\n## Table of contents\n\n- [Overview](#overview)\n  - [The challenge](#the-challenge)\n  - [Screenshot](#screenshot)\n  - [Links](#links)\n- [My process](#my-process)\n  - [Built with](#built-with)\n  - [What I learned](#what-i-learned)\n  - [Continued development](#continued-development)\n- [Author](#author)\n- [Acknowledgments](#acknowledgments)\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n- See all countries from the API on the homepage\n- Search for a country using an `input` field\n- Filter countries by region\n- Click on a country to see more detailed information on a separate page\n- Click through to the border countries on the detail page\n\n### Screenshot\n\n![](./screenshot.png)\n\n\n\n### Links\n\n- Solution URL: [https://github.com/lamba01/Rest-countries/]\n- Live Site URL: [Add live site URL here](https://your-live-site-url.com)\n\n## My process\n\n### Built with\n\n- Semantic HTML5 markup\n- CSS custom properties\n- Flexbox\n- CSS Grid\n- JavaScript fetch API\n\n\n### What I learned\n\nUse this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.\n\nTo see how you can add code snippets, see below:\n\n```js\n    // Fetch the full names of the bordering countries\n    const borderCountryNames = borderCountries.map((code) =\u003e {\n      const borderCountry = countries.find((c) =\u003e c.cca3 === code);\n      return borderCountry ? borderCountry.name.common : \"Unknown Country\";\n    });\n\n    const borderCountriesElement = document.createElement(\"p\");\n\n    if (borderCountryNames.length \u003e 0) {\n      borderCountriesElement.textContent = \"Border Countries:\";\n    } else {\n      borderCountriesElement.textContent = \"No bordering countries.\";\n    }\n\n    // Assuming you have already calculated the 'borderCountryNames' array\n\n    borderCountryNames.forEach((borderCountryName) =\u003e {\n      const borderCountryElement = document.createElement(\"span\");\n      borderCountryElement.textContent = borderCountryName;\n      borderCountryElement.classList.add(\"bordercountries\");\n      borderCountryElement.onclick = () =\u003e {\n        const borderCountryData = getCountryByName(borderCountryName);\n        displaySingleCountry(borderCountryData);\n      };\n      borderCountriesElement.appendChild(borderCountryElement);\n      borderCountriesElement.classList.add(\"border\");\n    });\n```\n\n\n### Continued development\n\nThis is my third project using the fetch API, I think I am finally comfortable with it. I'll move on to learn React now.\n\n\n## Author\n\n- Frontend Mentor - [@lamba01](https://www.frontendmentor.io/profile/lamba01)\n- Twitter - [@lambacodes](https://www.twitter.com/lambacodes)\n\n\n## Acknowledgments\nOnce again, thank myself for not giving up.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamba01%2Frest-countries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamba01%2Frest-countries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamba01%2Frest-countries/lists"}