Gullintanni v0.1.0 HardHat

A simple wrapper for the Travis CI API.

Summary

Types

The response to an HTTP request

The HTTP status code

Functions

Issues an authenticated GET request to the given Travis CI API path

Issues an authenticated POST request to the given Travis CI API path

Issues an authenticated PUT request to the given Travis CI API path

Types

response()
response() :: map | {status_code, binary}

The response to an HTTP request.

status_code()
status_code() :: integer

The HTTP status code.

Functions

get(client, path)

Issues an authenticated GET request to the given Travis CI API path.

Returns the decoded response body if the request was successful, otherwise {status_code, body}. Raises an exception in case of failure.

post(client, path, body \\ "")

Issues an authenticated POST request to the given Travis CI API path.

Returns the decoded response body if the request was successful, otherwise {status_code, body}. Raises an exception in case of failure.

put(client, path, body \\ "")

Issues an authenticated PUT request to the given Travis CI API path.

Returns the decoded response body if the request was successful, otherwise {status_code, body}. Raises an exception in case of failure.