{"id":16099134,"url":"https://github.com/drapegnik/search-wikipedia-links","last_synced_at":"2025-09-05T22:35:33.748Z","repository":{"id":79505611,"uuid":"483419277","full_name":"Drapegnik/search-wikipedia-links","owner":"Drapegnik","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-06T19:59:49.000Z","size":958,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T22:44:02.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"search-wikipedia-links.vercel.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/Drapegnik.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":"2022-04-19T21:46:32.000Z","updated_at":"2023-09-25T15:48:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2d5dfb8-402b-41ca-870d-1b5ce61f9df5","html_url":"https://github.com/Drapegnik/search-wikipedia-links","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Drapegnik/search-wikipedia-links","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drapegnik%2Fsearch-wikipedia-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drapegnik%2Fsearch-wikipedia-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drapegnik%2Fsearch-wikipedia-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drapegnik%2Fsearch-wikipedia-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Drapegnik","download_url":"https://codeload.github.com/Drapegnik/search-wikipedia-links/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drapegnik%2Fsearch-wikipedia-links/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273832460,"owners_count":25176262,"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-09-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2024-10-09T18:26:04.046Z","updated_at":"2025-09-05T22:35:33.725Z","avatar_url":"https://github.com/Drapegnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# search-wikipedia-links\n\n## task\n\nAs an user, I should be able to:\n\n- search Wikipedia links with a search term\n- re-run my search at any time\n- keep a distinct history list of my last five search terms + the time when the last search happened\n\n![](https://codesignal.s3.amazonaws.com/uploads/1639800404400/Screen_Shot_2021-12-17_at_8.06.25_PM.png)\n\n## initial code\n\n```jsx\n// Import State hook\nconst { useState } = React;\n\n/*\nAs an user, I should be able:\n  # to search Wikipedia links with a search term\n  # to keep a distinct history list of my last five search terms + the time when the last search happened\n**/\n\nconst WikepediaLinksView = () =\u003e {\n  const [searchTerm, setSearchTerms] = useState('');\n  const [fetchedAt, setFetchedAt] = useState(new Date());\n  const [links, setLinks] = useState([]);\n\n  const fetchData = () =\u003e {\n    const urlSearch =\n      'https://en.wikipedia.org/w/api.php?origin=*\u0026action=opensearch\u0026search=' + searchTerm;\n    fetch(urlSearch, { mode: 'cors' })\n      .then(response =\u003e response.json())\n      .then(response =\u003e {\n        setFetchedAt(new Date());\n        setLinks(response[1]);\n      });\n  };\n\n  return (\n    \u003cdiv className=\"container\"\u003e\n      \u003cdiv className=\"columns\"\u003e\n        \u003cinput\n          type=\"text\"\n          placeholder=\"You Know, for Search…\"\n          value={searchTerm}\n          onChange={e =\u003e {\n            setSearchTerms(e.target.value);\n          }}\n        /\u003e\n        \u003cbutton onClick={() =\u003e fetchData()}\u003eSearch\u003c/button\u003e\n      \u003c/div\u003e\n      \u003cdiv\u003e\n        \u003cdl\u003e\n          \u003cdt\u003eYour Wikipedia links (fetched at {fetchedAt.toISOString()}):\u003c/dt\u003e\n          \u003cdd\u003e\n            {links.map(l =\u003e (\n              \u003c\u003e\n                {l} \u003cbr /\u003e\n              \u003c/\u003e\n            ))}\n          \u003c/dd\u003e\n          \u003cdt\u003ePrevious search term:\u003c/dt\u003e\n          \u003cdd\u003e\u003c/dd\u003e\n        \u003c/dl\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  );\n};\n\n// Render React element into the DOM\nconst rootElement = document.getElementById('root');\nReactDOM.render(\u003cWikepediaLinksView /\u003e, rootElement);\n```\n\n## demo\n\n[![](https://res.cloudinary.com/dzsjwgjii/image/upload/v1650409253/wikilinks.png)](https://search-wikipedia-links.vercel.app/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrapegnik%2Fsearch-wikipedia-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrapegnik%2Fsearch-wikipedia-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrapegnik%2Fsearch-wikipedia-links/lists"}