func (c *Client) GetDeployment(projectID string, deploymentID string) (Deployment, error) {
	path := fmt.Sprintf("/api/projects/%s/deployments/%s", projectID, deploymentID)
	result := Deployment{}
	err := c.request("GET", path, nil, nil, &result)
	if err != nil {
		return result, err
	}
	return result, nil
}
GetDeployment returns the information about a given Deployment.
package client
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"log"
	"net/url"
)
type Project struct {
	ID                      string      `json:"id"`
	Name                    string      `json:"name"`
	Git                     *GitHubLink `json:"git,omitempty"`
	ProductionDeployment    *Deployment `json:"productionDeployment,omitempty"`
	HasProductionDeployment bool        `json:"hasProductionDeployment"`
	EnvVars                 EnvVars     `json:"envVars"`
	UpdatedAt               string      `json:"updatedAt"`
	CreatedAt               string      `json:"createdAt"`
}
type EnvVars []string
type GitHubLink struct {
	Repository Repository `json:"repository"`
	Entrypoint string     `json:"entrypoint"`
	UpdatedAt  string     `json:"updatedAt"`
	CreatedAt  string     `json:"createdAt"`
}
type Repository struct {
	ID    int    `json:"id"`
	Owner string `json:"owner"`
	Name  string `json:"name"`
}
type Deployment struct {
	ID             string          `json:"id"`
	URL            string          `json:"url"`
	DomainMappings []DomainMapping `json:"domainMappings"`
	RelatedCommit  *CommitInfo     `json:"relatedCommit,omitempty"`
	Project        *Project        `json:"project"`
	ProjectID      string          `json:"projectId"`
	EnvVars        EnvVars         `json:"envVars"`
	UpdatedAt      string          `json:"updatedAt"`
	CreatedAt      string          `json:"createdAt"`
}
type DomainMapping struct {
	Domain    string `json:"domain"`
	UpdatedAt string `json:"updatedAt"`
	CreatedAt string `json:"createdAt"`
}
type CommitInfo struct {
	Hash                 string `json:"hash"`
	Message              string `json:"message"`
	AuthorName           string `json:"authorName"`
	AuthorEmail          string `json:"authorEmail"`
	AuthorGitHubUsername string `json:"authorGithubUsername,omitempty"`
	URL                  string `json:"url,omitempty"`
}
type Domain struct {
	Domain               string                `json:"domain"`
	Token                string                `json:"token,omitempty"`
	IsValidated          bool                  `json:"isValidated,omitempty"`
	Certificates         []Certificate         `json:"certificates,omitempty"`
	ProvisioningAttempts []ProvisioningAttempt `json:"provisioningAttempts,omitempty"`
	ProjectID            string                `json:"projectId,omitempty"`
	UpdatedAt            string                `json:"updatedAt,omitempty"`
	CreatedAt            string                `json:"createdAt,omitempty"`
}
const (
	TLSCipherRsa         = "rsa"
	TLSCipherEc          = "ec"
	TLSStrategyAutomatic = "automatic"
	TLSStrategyManual    = "manual"
)
type Certificate struct {
	Cipher               string `json:"cipher"`
	ProvisioningStrategy string `json:"provisioningStrategy"`
	UpdatedAt            string `json:"updatedAt"`
	CreatedAt            string `json:"createdAt"`
	ExpiresAt            string `json:"expiresAt"`
}
type ProvisioningAttempt struct {
	Domain      string `json:"domain"`
	Cipher      string `json:"cipher"`
	Error       string `json:"error,omitempty"`
	UpdatedAt   string `json:"updatedAt"`
	CreatedAt   string `json:"createdAt"`
	CompletedAt string `json:"completedAt,omitempty"`
}
func (c *Client) ListProjects() ([]Project, error) {
	result := []Project{}
	err := c.request("GET", "/api/projects", nil, nil, &result)
	if err != nil {
		return result, err
	}
	return result, nil
}
type CreateProjectRequest struct {
	Name    string     `json:"name"`
	EnvVars NewEnvVars `json:"envVars"`
}
type NewEnvVars map[string]string
func (c *Client) CreateProject(name string, envVars NewEnvVars) (Project, error) {
	project := CreateProjectRequest{
		Name:    name,
		EnvVars: envVars,
	}
	bs, err := json.Marshal(project)
	if err != nil {
		return Project{}, err
	}
	res := Project{}
	err = c.request("POST", "/api/projects", nil, bytes.NewBuffer(bs), &res)
	if err != nil {
		return res, err
	}
	return res, nil
}
type UpdateProjectRequest struct {
	Name string `json:"name"`
}
func (c *Client) UpdateProject(projectID string, newName string) error {
	path := fmt.Sprintf("/api/projects/%s", projectID)
	project := UpdateProjectRequest{
		Name: newName,
	}
	bs, err := json.Marshal(project)
	if err != nil {
		return err
	}
	return c.request("PATCH", path, nil, bytes.NewBuffer(bs), nil)
}
func (c *Client) DeleteProject(projectID string) error {
	path := fmt.Sprintf("/api/projects/%s", projectID)
	return c.request("DELETE", path, nil, nil, nil)
}
func (c *Client) GetProject(projectID string) (Project, error) {
	path := fmt.Sprintf("/api/projects/%s", projectID)
	result := Project{}
	log.Printf("[DEBUG] GET %s", path)
	err := c.request("GET", path, nil, nil, &result)
	if err != nil {
		log.Printf("[DEBUG] Could not find project: %s", err)
		return result, err
	}
	bs, _ := json.Marshal(result)
	log.Printf("[DEBUG] GET Project response body: %s", string(bs))
	return result, nil
}
type NewDeploymentRequest struct {
	URL        string `json:"url"`
	Production bool   `json:"production,omitempty"`
}
func (c *Client) NewProjectDeployment(projectID string, depl NewDeploymentRequest) (Deployment, error) {
	path := fmt.Sprintf("/api/projects/%s/deployments", projectID)
	bs, err := json.Marshal(depl)
	if err != nil {
		return Deployment{}, err
	}
	res := Deployment{}
	err = c.request("POST", path, nil, bytes.NewBuffer(bs), &res)
	if err != nil {
		return res, err
	}
	return res, nil
}
func (c *Client) ListDeployments(projectID string, pageOpts PageOptions) ([]Deployment, PagingInfo, error) {
	path := fmt.Sprintf("/api/projects/%s/deployments", projectID)
	result := []interface{}{}
	qs := url.Values{}
	if pageOpts.Page != 0 {
		qs.Set("page", fmt.Sprint(pageOpts.Page))
	}
	if pageOpts.Limit != 0 {
		qs.Set("limit", fmt.Sprint(pageOpts.Limit))
	}
	err := c.request("GET", path, qs, nil, &result)
	if err != nil {
		return []Deployment{}, PagingInfo{}, err
	}
	return result[0].([]Deployment), result[1].(PagingInfo), nil
}