getEntityGroupAllByOwnerAndType method

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

Implementation

Future<EntityGroupInfo?> getEntityGroupAllByOwnerAndType(
    EntityId ownerId, EntityType groupType,
    {RequestConfig? requestConfig}) async {
  return nullIfNotFound(
    (RequestConfig requestConfig) async {
      var response = await _tbClient.get<Map<String, dynamic>>(
          '/api/entityGroup/all/${ownerId.entityType.toShortString()}/${ownerId.id}/${groupType.toShortString()}',
          options: defaultHttpOptionsFromConfig(requestConfig));
      return response.data != null
          ? EntityGroupInfo.fromJson(response.data!)
          : null;
    },
    requestConfig: requestConfig,
  );
}