2015年6月15日星期一

SitePoint PHP Blog: Exploring Github's Public Events with PHP and Google BigQuery


The SitePoint PHP blog has a new tutorial posted showing you how to explore GitHubs public events through the GitHub API and handled via the Google BigQuery infrastructure taking the burden off your own systems.



If you've been following along with my previous articles about Github's API, you know that Github's developers are doing their best to ease the pain of interacting with Github data. In this article, we're going to take a look at the Github public events API and we will build a small demo along the way.


They start off with a brief introduction to both GiHub events (like pushes, merges, etc) and the BigQuery system and the problem it solves. They use a stock Laravel framework-based application (on a Homestead Improved VM) and add in the Google API credentials and a BigQueryServiceProvider using Google's own client to make the connection. They also set up a middleware authentication mechanism to redirect the user if they're not authenticated. They then move over to the BigQuery side and show how to use it's web-based console to perform queries and view results. They then translate this over to a simple "top ten" query, listing the top repositories ordered by number of forks. Building on this, they add in a simple form that allows the user to specify the language to search for (PHP, Javascript, etc) and outputs the results via a Blade template.


Link: http://www.sitepoint.com/exploring-githubs-public-events-php-google-bigquery/

没有评论:

发表评论