Skip to main content
bannerify-go is the Bannerify client for Go. It takes a context.Context on each request and returns errors as values.

Install

Create a client

You need an API key. Create one on the API Keys page of the dashboard and keep it on the server.

Generate an image

Every Modification field except Name is a pointer. The examples build them with this helper:
result.Result is a []byte that holds the image.

Methods

Render videos covers the video methods. The Go SDK has no method for stored images. Call Create stored image over REST. Create images and PDFs covers the first two, and Signed URL covers the last one.

Handle errors

CreateImage and CreatePDF return a *Response. Check Error before you read Result.
When the API answers with a status other than 200, the SDK returns the code HTTP_ERROR. For CreateImage the message holds the status and the response body, which is the JSON error object from the API. For CreatePDF the message holds the status only. The SDK creates a few other errors itself. GenerateImageSignedURL returns an error when the format is not supported.

Options

Pass options to NewClient after the API key.