# `Raxol.Gateway.Route`
[🔗](https://github.com/DROOdotFOO/raxol/blob/raxol_gateway-v0.2.0/lib/raxol/gateway/route.ex#L1)

Where a message comes from and goes back to.

A route carries the platform, the chat type, the chat id, and the user id. Its
`key/1` is the unified session key `agent:main:{platform}:{chat_type}:{chat_id}`,
the stable identity a `Raxol.Gateway.SessionRouter` keys sessions by and that a
future cross-platform handoff rebinds.

# `t`

```elixir
@type t() :: %Raxol.Gateway.Route{
  chat_id: String.t() | integer(),
  chat_type: atom(),
  platform: atom(),
  user_id: String.t() | integer() | nil
}
```

# `key`

```elixir
@spec key(t()) :: String.t()
```

The unified session key for a route.

# `new`

```elixir
@spec new(map() | keyword()) :: t()
```

Build a route from a map or keyword list.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
