twidi / Repos.io

The source code of the Repos.io site, a site to help you manage all your repositories (your own, and watched/liked/followed ones) hosted by different providers (github, bitbucket)
http://repos.io
Other
102 stars 10 forks source link

Integration with serachco.de APIs (source code mathcing facet) #65

Open decalek opened 11 years ago

decalek commented 11 years ago

searchco.de is an excelent code indexing engine with future plans to regularry index the whole githhub

In a tweet, the autohor boyter expressed interest to provide repos.io with code search API:

Was having a play with repos.io have you considered adding search over repos? I would be happy to help out using searchco.de's api

boyter commented 11 years ago

Just for the record the details are here,

http://searchco.de/api/

To search over a specific repo you can do something like the following,

http://searchco.de/?q=irq_create_mapping+repo%3Alinux+url%3Agithub

In API form it would be the following,

http://searchco.de/api/codesearch_I/?q=irq_create_mapping%20repo:linux%20url:github or JSONP http://searchco.de/api/jsonp_codesearch_I/?q=irq_create_mapping%20repo:linux%20url:github&callback=myCallback

The repo: restricts to a specific repository and the url: restricts to GitHub. The following URL restrictions are all valid,

GitHub irq_create_mapping url:github Google Code irq_create_mapping url:google BitBucket mysql_query url:bitbucket SourceForge mysql_query url:sourceforge CodePlex mysql_query url:codeplex

For the record this is the same API that DuckDuckGo is using so it appears to be fairly stable. Example is here, http://duckduckgo.com/?q=lua+print_r+example or https://duckduckgo.com/?q=perl+%3D~+example