{"action":"created","issue":{"url":"https://api.github.com/repos/jsdelivr/api/issues/78","labels_url":"https://api.github.com/repos/jsdelivr/api/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/jsdelivr/api/issues/78/comments","events_url":"https://api.github.com/repos/jsdelivr/api/issues/78/events","html_url":"https://github.com/jsdelivr/api/issues/78","id":83635463,"number":78,"title":"Closest matching","user":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jsdelivr/api/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jsdelivr/api/labels/v2","name":"v2","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-06-01T18:31:08Z","updated_at":"2015-06-01T18:52:25Z","closed_at":null,"body":"A query endpoint to find the closest match would be extremely convenient (current use case is duckduckgo spice answers).\r\n\r\nWhat this would involve is determining the library that matches a query as close as possible (e.g. `jwuery` may match `jquery` if `jwuery` is not a library). Another thing this should support is searching for plugins\r\n\r\n```\r\n/search?name=jquery carousel => jquery.carousel\r\n/search?name=jquery-carousel => jquery.carousel\r\n``` \r\n\r\nThere should be an arbitrary threshold to cut off in accurate matches based on levenshtein scores. I'd say `Math.min(query.length / 2, 4)`\r\n\r\nImagining the endpoint would be\r\n\r\n```\r\nhttp://api.jsdelivr.com/v2/jsdelivr/find?name={lib}\r\n```\r\n\r\nI'm imagining this returning a single result"},"comment":{"url":"https://api.github.com/repos/jsdelivr/api/issues/comments/107670010","html_url":"https://github.com/jsdelivr/api/issues/78#issuecomment-107670010","issue_url":"https://api.github.com/repos/jsdelivr/api/issues/78","id":107670010,"user":{"login":"jimaek","id":1834071,"avatar_url":"https://avatars.githubusercontent.com/u/1834071?v=3","gravatar_id":"","url":"https://api.github.com/users/jimaek","html_url":"https://github.com/jimaek","followers_url":"https://api.github.com/users/jimaek/followers","following_url":"https://api.github.com/users/jimaek/following{/other_user}","gists_url":"https://api.github.com/users/jimaek/gists{/gist_id}","starred_url":"https://api.github.com/users/jimaek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimaek/subscriptions","organizations_url":"https://api.github.com/users/jimaek/orgs","repos_url":"https://api.github.com/users/jimaek/repos","events_url":"https://api.github.com/users/jimaek/events{/privacy}","received_events_url":"https://api.github.com/users/jimaek/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T18:52:25Z","updated_at":"2015-06-01T18:52:25Z","body":"If its going to return full data then maybe it makes no sense to use a separate endpoint?\r\nThis way it would be cleaner `http://api.jsdelivr.com/v2/jsdelivr/{searchQuery}`"}}