getEntityGroupInfoByOwnerAndNameAndType method

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

Implementation

Future<EntityGroupInfo?> getEntityGroupInfoByOwnerAndNameAndType(
    EntityId ownerId, EntityType groupType, String groupName,
    {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()}/$groupName',
          options: defaultHttpOptionsFromConfig(requestConfig));
      return response.data != null
          ? EntityGroupInfo.fromJson(response.data!)
          : null;
    },
    requestConfig: requestConfig,
  );
}