Minimal Elixir helpers for building tracked wan30.video links and basic
integration utilities.
This package is intentionally small but functional: it gives Elixir projects a simple way to generate canonical landing URLs, UTM-tagged campaign links, referral links, embed links, and verify webhook signatures for wan30.video.
Installation
Add hex_wan30 to your list of dependencies in mix.exs:
def deps do
[
{:hex_wan30, "~> 0.1.1"}
]
endUsage
iex> HexWan30.website_url()
"https://wan30.video"
iex> HexWan30.campaign_url("/pricing", source: "hex", medium: "package", campaign: "launch")
"https://wan30.video/pricing?utm_campaign=launch&utm_medium=package&utm_source=hex"
iex> HexWan30.referral_url("creator-42")
"https://wan30.video?ref=creator-42"
iex> HexWan30.generate_share_url("/gallery", ref: "creator-42", source: "hex")
"https://wan30.video/gallery?ref=creator-42&utm_source=hex"
iex> HexWan30.embed_url("demo-video", autoplay: true)
"https://wan30.video/embed?asset=demo-video&autoplay=1"Webhook example:
payload = ~s({"event":"render.completed"})
signature = HexWan30.sign_webhook(payload, "topsecret")
HexWan30.verify_webhook_signature(payload, signature, "topsecret")
# trueDocumentation
Generate local docs with:
mix docs
open doc/index.html
When the package is published to Hex, the same ExDoc output can be published to HexDocs with:
mix hex.publish docs
Publishing
- Install Elixir and Hex.
- Run
mix hex.user registerif you do not already have a Hex account. - Verify package metadata with
mix hex.build. - Publish with
mix hex.publish.
Convenience script:
./publish.sh
Package Metadata
- Package name:
hex_wan30 - Hex links:
https://wan30.video/https://github.com/DieselNiu/hex-wan30
License
MIT