getGuideStrategies method

Future<CorpusView?> getGuideStrategies({
  1. String? category,
  2. String? stage,
  3. String? workload,
})

Strategies returns the ENABLED tactics corpus for the caller's org: the tactics library narrowed by the explicit category/workload filters AND by the org's OBSERVED growth stage and capability signals (a tactic's tags are preconditions, so it surfaces only once the org can act on it).

Strategies returns the ENABLED tactics corpus for the caller's org: the tactics library narrowed by the explicit category/workload filters AND by the org's OBSERVED growth stage and capability signals (a tactic's tags are preconditions, so it surfaces only once the org can act on it). Passing stage PREVIEWS the corpus at that stage instead of the observed one. The content is shared platform data — no org's records — and the read is never a billable effect.

Parameters:

  • String category: Category filters to tactics in exactly this category.

  • String stage: Stage previews the corpus at a chosen growth stage (research|formed|launched|activated|scaling), overriding the org's observed one. An unknown value is ignored and the observed stage stands.

  • String workload: Workload filters to tactics with exactly this workload.

Implementation

Future<CorpusView?> getGuideStrategies({ String? category, String? stage, String? workload, }) async {
  final response = await getGuideStrategiesWithHttpInfo( category: category, stage: stage, workload: workload, );
  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), 'CorpusView',) as CorpusView;

  }
  return null;
}