Method Calls
    • Dark
      Light
    • PDF

    Method Calls

    • Dark
      Light
    • PDF

    Article summary

    Method calls are used to perform actions based on given data. The response to these calls is asynchronous, meaning they don't occur in a specific order. To track the outcome of a call, it's essential to use a unique ID. This ID will be used in the response, allowing the client to identify and retrieve the result of the corresponding call.

    Here is an example of a method call and response for creating a channel:

    Example call

    {
        "msg": "method",
        "method": "createChannel",
        "id": "2",
        "params": [
            "test-websocket",
            ["doe.john"],
            false
        ]
    }

    Example response

    {
        "msg": "result",
        "id": "2",
        "result": [
            { "rid": "BBkfgYT2azf7RPTTg" }
        ]
    }

    The id is the only way to recognize which method call a response belongs to.


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence