https://github.com/fancellu/github-searcher
Example Scala code showing processing of JSON repo data from Github
https://github.com/fancellu/github-searcher
json play-ws-standalone scala
Last synced: about 2 months ago
JSON representation
Example Scala code showing processing of JSON repo data from Github
- Host: GitHub
- URL: https://github.com/fancellu/github-searcher
- Owner: fancellu
- Created: 2019-12-18T19:22:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-18T22:28:48.000Z (over 6 years ago)
- Last Synced: 2025-01-08T00:58:40.534Z (over 1 year ago)
- Topics: json, play-ws-standalone, scala
- Language: Scala
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-searcher
Example Scala code showing processing of JSON repo data from Github
## Functionality
1. Take a single argument specifying the search term, and error out if one is not provided
2. Using the [Github API](https://developer.github.com/v3/) as a starting point, find all the repositories that have a **description** containing the given search term **as a full phrase** (not just the words individually). To avoid hitting the API rate limit, you should only load **up to 1000** results.
3. Filter out any repos with an empty "language" (`null` or empty String)
4. Group the remaining list of repos by "language", and count the number of occurrences for each
5. Sort the languages by occurrence descending
6. Output a line for each result, in the `{language}: {count}` format
7. After the results, on a separate line, output the total number of search results in the format: `=> {total_count} total result(s) found`
## Dependencies
Using play-ws-standalone and play-ws-standalone-json
## To run
`sbt "run xslt"` or some such