...
From the command-line, use the following and you'll be prompted for your password:
Code Block # Supply username to search private repos curl --user "REPLACE_WITH_GITHUB_USERNAME" https://api.github.com/search/code?q=edx-drf-extensions+org:edx curl --user "REPLACE_WITH_GITHUB_USERNAME" https://api.github.com/search/code?q=REPLACE_WITH_SEARCH_TERM+org:edx # Skip username to quickly search public repos curl https://api.github.com/search/code?q=edx-drf-extensions+org:edx
- If you have jq installed (e.g. brew install jq), you can get a sorted/filtered list using the following:
Code Block # Pipe results to jq to get a filtered list of repositories curl -s "https://api.github.com/search/code?q=edx-drf-extensions+org:edx" 2>&1 | jq "[.items[].repository.full_name] | unique" # Note: Add '--user "REPLACE_WITH_GITHUB_USERNAME"' like above to search private repos.
- Or, use jq-play online to filter the output:
- Copy the search output into the JSON field inĀ https://jqplay.org/
Enter the following filter in jq-play:
Code Block .items[].repository.full_name
Github API from Python
Info |
---|
This script has the advantage of sorting and filtering results to the unique set of repositories. |
...