pockethub / PocketHub

PocketHub Android App
Apache License 2.0
9.39k stars 3.46k forks source link

Discover Section #288

Open rufuscoder opened 11 years ago

rufuscoder commented 11 years ago

I like to browse for repos when I am on the go. I would like to make a Discover section for the github app. Would you put it into the mainstream app?

kevinsawicki commented 11 years ago

Yes, I would be willing to put this in the app, it is a great feature to have in there.

My initial thoughts would be to put it in the dropdown below the Issue Dashboard, and Gist options.

There isn't direct API support for all the contents of the explore page but you can use the search API to include most starred and forked broken down by language.

Related to #220

sagarsane commented 11 years ago

Hey,

How about using some project like Github Archives Project. As @kevinsawicki mentioned, there isn't a direct API for contents of explore page, but using this project, a simple query like this :

SELECT repository_language, count(repository_language) as language_count
FROM [githubarchive:github.timeline]
WHERE (type="WatchEvent" OR type="ForkEvent" 
      OR type="PushEvent" OR type="PullRequestEvent" 
      OR type="IssuesEvent" OR type="DownloadEvent")
    AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-08-01 00:00:00')
GROUP BY repository_language
ORDER BY language_count DESC
LIMIT 20;

Can give the top languages on Github for past 3 months. I have used this Archives API via Google's BigQuery, it works pretty well!