View Source ExTwilio.Resource (ExTwilio v0.10.0)
Mixin to include ExTwilio.Api
module functionality in a module with slightly
prettier syntax.
Under the hood, it delegates all the work to other ExTwilio
modules,
primarily ExTwilio.Api
.
Examples
Define a module, and use ExTwilio.Resource
.
defmodule ExTwilio.Call do
use ExTwilio.Resource, import: [:stream, :all]
defstruct sid: nil, ...
end
The import
option specifies which methods you want to be able to use.