Gogs PHP API Client is a client written in PHP, to easily query a Gogs (Go Git Service) API client.

Joachim M. Giæver 25f5c79e4f Merge branch 'rewrite' 6 سال پیش
client 7616dcda15 Rewritten; see index file for examples. 6 سال پیش
lib 7616dcda15 Rewritten; see index file for examples. 6 سال پیش
.gitignore 216919ecb4 Initial commit 6 سال پیش
LICENSE 216919ecb4 Initial commit 6 سال پیش
README.md 1fec347d41 Update 'README.md' 6 سال پیش
index.php 7616dcda15 Rewritten; see index file for examples. 6 سال پیش

README.md

gogs-php-api-client

A client to query Gogs (https://gogs.io) API from PHP.

Uages:

A guide on how to use will come shortly!

Quick example:

Clone the repo. Set the API_URL and API_TOKEN in the index-file.


$client =  new \Client\GogsAPI(API_URL, API_TOKEN);

$me = $client->user();
$other = $client->user("username");

$repos = $me->get("/repos")->load();

// Loop through every repo
for($repo = $repos->current(); $repo != false; $repo = $repos->next())
    var_dump($repo);