assembla

package
v0.0.0-...-094980f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Users    *UserService
	Webhooks *WebhookService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client, apiKey string, apiSecret string) *Client

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request, error)

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(urlStr string) error

type Filter

type Filter struct {
	Code          string `json:"code"`
	Code_Reviews  string `json:"code_reviews"`
	Build_Tool    string `json:"build_tool"`
	Flow          string `json:"flow"`
	File          string `json:"file"`
	Ssh_Tool      string `json:"ssh_tool"`
	Scrum_Reports string `json:"scrum_reports"`
	Stream        string `json:"stream"`
	Team          string `json:"team"`
	Trac          string `json:"trac"`
	Wiki          string `json:"wiki"`
}

type Hook

type Hook struct {
	Id                    int    `json:"id"`
	Title                 string `json:"title" validate:"required"`
	Enabled               bool   `json:"enabled"`
	Authentication_Type   int    `json:"authentication_type" validate:"required"`
	App_Api_Key           string `json:"app_api_key"`
	App_Secret            string `json:"app_secret"`
	App_Request_Token_Url string `json:"app_request_token_url"`
	App_Access_Token_Url  string `json:"app_access_token_url"`
	App_Authorize_Url     string `json:"app_authorize_url"`
	App_Authorize_Query   string `json:"app_authorize_query"`
	Access_Token          string `json:"access_token"`
	Access_Token_Secret   string `json:"access_token_secret"`
	External_Url          string `json:"external_url"`
	Http_Method           int    `json:"http_method" validate:"required"`
	Content_Type          string `json:"content_type"`
	Content               string `json:"content"`
	Filter                Filter `json:"filter"`
	Created_At            string `json:"created_at"`
	Updated_At            string `json:"updated_at"`
}

type User

type User struct {
	ID           string `json:"id"`
	Login        string `json:"login"`
	Name         string `json:"name"`
	Picture      string `json:"picture"`
	Email        string `json:"email"`
	Organization string `json:"organization"`
	Phone        string `json:"phone"`
}

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func (*UserService) ListAuthenticatedUser

func (s *UserService) ListAuthenticatedUser() (User, *http.Response, error)

GET /v1/user Returns currently authenticated user

type Webhook

type Webhook struct {
	Webhook Hook `json:"webhook"`
}

type WebhookService

type WebhookService struct {
	// contains filtered or unexported fields
}

func (*WebhookService) CreateWebhook

func (s *WebhookService) CreateWebhook(spaceId string, wb Webhook) (Hook, *http.Response, error)

POST /v1/spaces/:space_id/webhooks Create a Webhook

func (*WebhookService) DeleteWebhook

func (s *WebhookService) DeleteWebhook(spaceId, webhookId string) (*http.Response, error)

DELETE /v1/spaces/:space_id/webhooks/:webhook_id Delete a Webhook by ID. This request is only available to users with All permissions in space.

func (*WebhookService) UpdateWebhook

func (s *WebhookService) UpdateWebhook(spaceId, webhookId string, wb Webhook) (Hook, *http.Response, error)

PUT /v1/spaces/:space_id/webhooks/:webhook_id Update a webhook

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL