getEntityGroupsByOwnerAndType method

Future<List<EntityGroupInfo>> getEntityGroupsByOwnerAndType(
  1. EntityId ownerId,
  2. EntityType groupType, {
  3. RequestConfig? requestConfig,
})

Implementation

Future<List<EntityGroupInfo>> getEntityGroupsByOwnerAndType(
    EntityId ownerId, EntityType groupType,
    {RequestConfig? requestConfig}) async {
  var response = await _tbClient.get<List<dynamic>>(
      '/api/entityGroups/${ownerId.entityType.toShortString()}/${ownerId.id}/${groupType.toShortString()}',
      options: defaultHttpOptionsFromConfig(requestConfig));
  return response.data!.map((e) => EntityGroupInfo.fromJson(e)).toList();
}