Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
wana4jpPublic archive

About

A simple wrapper for Codenberg API, written with PHP5.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

42 Commits

Folders and files

Repository files navigation

⭐️This project's code is generated by Swagger Codegen ⭐️

codenberg-php

Build Status License

A simple wrapper for Codenberg API, written with PHP5.

Requirements

  • PHP >= 5.6
  • Guzzle library,
  • (optional) PHPUnit to run tests.

Install

Via Composer:

$ composer require kanekoelastic/codenberg-php dev-master

Basic usage

<?php

require_once(__DIR__ . '/vendor/autoload.php');

$config = \Kanekoelastic\PhpCodenberg\Configuration::getInstance(
    'your-api-key',
    'your-secret-key'
);

try {
    // Get Access Token first
    $authApi = new \Kanekoelastic\PhpCodenberg\Api\AuthApi($config);
    $token = $authApi->getAccessToken();
    $config->setAccessToken($token->getAccessToken());

    // Then call API
    $templatesApi = new \Kanekoelastic\PhpCodenberg\Api\TemplatesApi($config);
    print_r($templatesApi->getTemplates());
} catch (Exception $e) {
    echo 'Exception when calling codenberg Api', $e->getMessage(), PHP_EOL;
}
?>

License

codenberg-php is licensed under the Apache License 2.0 - see the LICENSE file for details

About

A simple wrapper for Codenberg API, written with PHP5.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages