PDFShift.Config (PDFShift v0.1.0)

View Source

Configuration module for PDFShift API client.

Summary

Functions

Gets the API key from environment variables.

Creates a new configuration with the given options.

Types

t()

@type t() :: %PDFShift.Config{api_key: String.t(), base_url: String.t()}

Functions

get_api_key_from_env()

@spec get_api_key_from_env() :: String.t() | nil

Gets the API key from environment variables.

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new configuration with the given options.

Options

  • :api_key - API key for authentication with PDFShift
  • :base_url - Base URL for the PDFShift API (defaults to "https://api.pdfshift.io/v3")

Examples

iex> PDFShift.Config.new(api_key: "api_key123")
%PDFShift.Config{api_key: "api_key123", base_url: "https://api.pdfshift.io/v3"}