ExUrlbox.Utils (ExUrlbox v0.3.0)

View Source

Various helper utilities for working with Urlbox's API

Summary

Functions

Build the screenshot request URL. Used with get, delete and head requests.

Generates a URL token by taking the HMAC SHA1 of the query string and signing it with your :api_secret.

Functions

build_url(opts)

@spec build_url(list()) :: String.t()

Build the screenshot request URL. Used with get, delete and head requests.

  • Example URL:
    /png?url=https%3A%2F%2Fgoogle.com&width=1024&height=768"

generate_url_token(opts)

@spec generate_url_token(String.t()) :: String.t()

Generates a URL token by taking the HMAC SHA1 of the query string and signing it with your :api_secret.

  • Example URL Format:
    https://api.urlbox.io/v1/:api_key/hmac(:api_secret)/format?[options]