View Source YaBTT.Deconstruct (YaBTT v0.1.5)
To deconstruct the announce request parameters.
Link to this section Summary
Link to this section Functions
@spec deco(term()) :: {:error, String.t()} | {:ok, YaBTT.Deco.t()}
Deconstruct the announce request parameters.
The params can be a map/0 or a Keyword.t/0. If it is a Keyword, it will be converted to
a map first. The params must contain the info_hash and peer_id keys. Otherwise, it will
return an error. The params will be stored in the YaBTT.Deco.t/0 struct.