Documentation
¶
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) Do(ctx context.Context, method, path string, query url.Values, body interface{}) (*Response, error)
- func (c *Client) DoRaw(ctx context.Context, method, path string, query url.Values, rawBody []byte) (*Response, error)
- func (c *Client) Get(ctx context.Context, path string, query url.Values, out interface{}) error
- func (c *Client) Post(ctx context.Context, path string, body, out interface{}) error
- func (c *Client) Put(ctx context.Context, path string, body, out interface{}) error
- type ErrorDetail
- type NextPage
- type Response
Constants ¶
View Source
const DefaultBaseURL = "https://app.asana.com/api/1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
StatusCode int `json:"-"`
Errors []ErrorDetail `json:"errors"`
RawBody string `json:"-"`
}
type Client ¶
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, method, path string, query url.Values, body interface{}) (*Response, error)
Do wraps body in Asana's `{"data": ...}` envelope before sending.
func (*Client) DoRaw ¶
func (c *Client) DoRaw(ctx context.Context, method, path string, query url.Values, rawBody []byte) (*Response, error)
DoRaw sends rawBody verbatim — caller is responsible for any envelope wrapping.
type ErrorDetail ¶
type Response ¶
type Response struct {
Data json.RawMessage `json:"data"`
NextPage *NextPage `json:"next_page,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.