require "browshot"
require "json"

client = Browshot.new(ENV.fetch("BROWSHOT_API_KEY"))
puts JSON.pretty_generate(client.app_create({
  "type" => "s3",
  "app_id" => "archive",
  "name" => "Screenshot archive",
  "config" => {
    "bucket" => "your-capture-bucket",
    "region" => "us-east-1",
    "accessKeyId" => "YOUR_ACCESS_KEY_ID",
    "secretAccessKey" => "YOUR_SECRET_ACCESS_KEY",
    "pathTemplate" => "captures/{domain}/{id}-{shot}.png"
  }
}))
