#!/usr/bin/env php
<?php
-
-require __DIR__."/../vendor/autoload.php";
-
-$api = new seekat\API([
- "Authorization" => "token ".getenv("GITHUB_TOKEN")
-]);
+$api = include "examples.inc";
$api(function($api) {
$gists = yield $api->users->m6w6->gists();
foreach ($gists as $gist) {
foreach ($gist->files as $name => $file) {
if ($name == "blog.md") {
- $text = $file->as("raw")->raw();;
+ $text = $file->raw();
$head = $gist->description." ".$gist->created_at;
echo "$head\n";
echo str_repeat("=", strlen($head))."\n\n";