Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
more calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bhubbard committed Sep 27, 2016
1 parent bb90d4f commit c9b2248
Showing 1 changed file with 73 additions and 8 deletions.
81 changes: 73 additions & 8 deletions wp-deploybot-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class DeployBotAPI {
* __construct function.
*
* @access public
* @param mixed $api_token
* @param mixed $account_subdomain
* @param mixed $api_token API Token.
* @param mixed $account_subdomain Account Subdomain.
* @return void
*/
public function __construct( $api_token, $account_subdomain ) {
Expand Down Expand Up @@ -154,27 +154,92 @@ function trigger_deployment( $environment_id ) {

}

function get_repository() {

/**
* Get Repository.
*
* @access public
* @return void
*/
function get_repository( $repository_id ) {

$request = $this->base_uri . '/repositories/' . $repository_id;
return $this->fetch( $request );

}

function list_repositories() {
/**
* List Repositories
*
* @access public
* @param string $list (default: '')
* @param string $after (default: '')
* @return void
*/
function list_repositories( $list = '', $after = '' ) {

$request = $this->base_uri . '/repositories' . '?limit=' . $limit . '&after=' . $after;
return $this->fetch( $request );

}

function get_environment() {

/**
* get_environment function.
*
* @access public
* @return void
*/
function get_environment( $environment_id ) {

$request = $this->base_uri . '/environments/' . $environment_id;
return $this->fetch( $request );
}

function list_environments() {


/**
* List Environments.
*
* @access public
* @param mixed $limit
* @param mixed $after
* @return void
*/
function list_environments( $limit, $after ) {

$request = $this->base_uri . '/environments' . '?limit=' . $limit . '&after=' . $after;
return $this->fetch( $request );

}

function get_server() {

/**
* Get Server Details.
*
* @access public
* @return void
*/
function get_server( $server_id ) {

$request = $this->base_uri . '/servers/';
return $this->fetch( $request );

}

function list_servers() {

/**
* List Servers.
*
* @access public
* @param mixed $limit Limit.
* @param mixed $after After.
* @return void
*/
function list_servers( $limit, $after ) {

$request = $this->base_uri . '/servers' . '?limit=' . $limit . '&after=' . $after;
return $this->fetch( $request );

}

Expand Down

0 comments on commit c9b2248

Please sign in to comment.