typedb/typedb-docs

get_players() method takes an iterator of roles rather than a single role as argument

Closed this issue · 2 comments

The docs state that the get_players() method takes a role as argument.
However, the method, as implemented in the Java, Python and node.js clients (and possibly others), actually takes an iterator of role. At least with the Python client) if provided a single role, the method fails.

location: https://docs.vaticle.com/docs/concept-api/thing#retrieve-role-players

Thanks for reporting! @alexjpwalker could you see if we really intend for users to supply an iterator (sounds like it if we have this across all three clients..) before updating the docs to reflect this.

Yeah this issue report is correct, see the protocol for get_players:

message Relation {
    message GetPlayers {
        message Req {
            repeated Type role_types = 1;
        }
        message ResPart {
            repeated Thing things = 1;
        }
    }
}

source https://github.com/vaticle/typedb-protocol/blob/fcb6dbd7c13f75174c975ecaafdcfa4a82c92f6b/common/concept.proto#L239