GitHub search results as a feed?
Is there a way to search the git hub results so you can have a feed of recently updated repositories or users you follow etc?
The answer is yes
GitHub has an API for search https://developer.github.com/v3/search/
Example of how it works?
Let's say you want to search all test automation repositories written in Java.
Your query might look like this.
https://api.github.com/search/repositories?q=automation+language:java&sort=stars&order=desc
In the above example q is the search item automation
and language is java
and sort is based on stars
and order is desc
Parameters
Name | Type | Description |
---|---|---|
q | string | The search keywords, as well as any qualifiers. |
sort | string | The sort field. One of stars , forks , or updated . Default: results are sorted by best match. |
order | string | The sort order if sort parameter is provided. One of asc or desc . Default:desc |
To check for more queries and search parameters read these:
https://help.github.com/articles/searching-repositories/
https://help.github.com/articles/search-syntax/
Use http://codebeautify.org/jsonviewer or any other JSON viewer to get your results the way you would like.
https://help.github.com/articles/searching-repositories/
https://help.github.com/articles/search-syntax/
Use http://codebeautify.org/jsonviewer or any other JSON viewer to get your results the way you would like.
Comments
Post a Comment