View Source URL.UUID (URL v1.5.0)

Parses a geo URL

Summary

Functions

Parse a URI with the :scheme of "uuid"

Types

@type t() :: %URL.UUID{params: map(), uuid: binary()}

Functions

@spec parse(URI.t()) :: t() | {:error, {module(), binary()}}

Parse a URI with the :scheme of "uuid"

Example

iex> uuid = URI.parse("uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6;a=b")
iex> URL.UUID.parse(uuid)
%URL.UUID{params: %{"a" => "b"}, uuid: "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"}

iex> uuid = URI.parse("urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6;a=b")
iex> URL.UUID.parse(uuid)
%URL.UUID{params: %{"a" => "b"}, uuid: "f81d4fae-7dec-11d0-a765-00a0c91e6bf6"}