Skip to content

steveworley/lagoon-php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lagoon PHP SDK

CircleCI

The Lagoon SDK for PHP makes it easy for developers to connect their applications to the Lagoon GraphQL service in PHP Code.

Getting started

Require the package using compsoer.

composer require steveworley/lagoon-php-sdk

Define the $endpoint and $token to create a new client instance.

Quick Examples

Fetch all projects

<?php

use Lagoon\LagoonClient;

$client = new LagoonClient($endpoint, $token);
$customers = $client->customer()->all()->execute();

Fetch all project names

<?php

use Lagoon\LagoonClient;

$client = new LagoonClient($endpoint, $token);
$customers = $client->project()->all()->fields(['name'])->execute();

Add a project

<?php

use Lagoon\LagoonClient;

$client = new LagoonClient($endpoint, $token);
$project = [
  'name' => 'my-proejct',
  'customer' => 1,
  'openshift' => 1,
  'gitUrl' => 'git@github.com:test/test.git'
  'productEnvironment' => 'master',
  'branches' => 'master',
];
$customers = $client->project()->add($project)->execute();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages