Elixir client for the CIPA Web Filtering lookup API at https://www.cipawebfiltering.com/api/v1/ .
client = CipaWebFiltering.new(System.fetch_env!("CWF_API_KEY"))
{:ok, r} = CipaWebFiltering.classify(client, "example.com")
CipaWebFiltering.Policy.blocks?(CipaWebFiltering.Policy.statutory_core(), r.categories)Functions return {:ok, value} or {:error, %CipaWebFiltering.Error{}}.
Summary
Functions
Database subscribers: key status and plan.
Largest batch per request.
Classify one domain or URL. One credit.
Classify any number of domains, sent in chunks of 1,000. Returns {:ok, results, credits}.
Database subscribers: last update time and size of the database file.
Service health. Free.
Build a client. Options: :base_url, :timeout (milliseconds).
Splits the API's "A|B|C" field, trimming and removing duplicates.
Types
Functions
Database subscribers: key status and plan.
Largest batch per request.
Classify one domain or URL. One credit.
Classify any number of domains, sent in chunks of 1,000. Returns {:ok, results, credits}.
Database subscribers: last update time and size of the database file.
Service health. Free.
Build a client. Options: :base_url, :timeout (milliseconds).
Splits the API's "A|B|C" field, trimming and removing duplicates.