putProjectsBySlugStar method

Future<ProjectsStar?> putProjectsBySlugStar(
  1. String slug
)

Bookmarks a project for the person calling, and answers whether it is starred afterwards.

Bookmarks a project for the person calling, and answers whether it is starred afterwards. The star is YOURS: it is keyed by you as well as by the project, so two people see two answers for the same one and starring it says nothing about anybody else's list. Starring a project you have already starred leaves it starred.

Parameters:

  • String slug (required): Slug is the project to act on, from the path. It is unique within the caller's org and nowhere else, so another tenant's slug is a 404.

Implementation

Future<ProjectsStar?> putProjectsBySlugStar(String slug,) async {
  final response = await putProjectsBySlugStarWithHttpInfo(slug,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ProjectsStar',) as ProjectsStar;

  }
  return null;
}