Generated Elixir client for Chatto's Connect API
Add chatto to your dependencies in mix.exs:
def deps do
[
{:chatto, "~> 0.1"}
]
endThen build a client and call a service:
client = Chatto.Connect.new("https://chat.example", token)
Chatto.Admin.V1.AdminUserService.get_member(
client,
%Chatto.Admin.V1.GetMemberRequest{target: {:login, "ada"}}
)Pass request: to Chatto.Connect.new/3 to build on an existing Req.Request. Other options are merged into the request as Req options.
Regenerating
lib/chatto/generated is generated from the Chatto release pinned in flake.nix
(lib.chatto). After bumping the pin:
nix develop -c mix chatto.generate