BaileysEx.Protocol.WMex (baileys_ex v0.1.0-alpha.8)

Copy Markdown View Source

WMex (WhatsApp MEX) query helpers.

Reference: dev/reference/Baileys-master/src/Socket/mex.ts

Summary

Functions

Wraps an encoded GraphQL WMex schema payload.

Extracts the response from the inner GraphQL response body.

Functions

build_query(query_id, variables, message_id)

@spec build_query(String.t(), map(), String.t()) :: BaileysEx.BinaryNode.t()

Wraps an encoded GraphQL WMex schema payload.

extract_result(response_node, data_path \\ nil)

@spec extract_result(BaileysEx.BinaryNode.t(), String.t() | nil) ::
  {:ok, term()} | {:error, term()}

Extracts the response from the inner GraphQL response body.