View Source cfapi_client_api (cfapi v1.0.1)
Link to this section Summary
Functions
Authenticate with the admin server. Used to retrieve all target segments for certain account id.
Retrieve all segments. Used to retrieve all segments for certain account id.
Get feature evaluations for target
Get feature evaluations for target
Get all feature flags activations All feature flags with activations in project environment
Get feature config
Retrieve a segment by identifier Used to retrieve a segment for a certain account id by identifier
Stream endpoint.
Link to this section Functions
-spec authenticate(ctx:ctx()) -> {ok, cfapi_authentication_response:cfapi_authentication_response(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec authenticate(ctx:ctx(), maps:map()) -> {ok, cfapi_authentication_response:cfapi_authentication_response(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_all_segments(ctx:ctx(), binary()) -> {ok, [cfapi_segment:cfapi_segment()], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_all_segments(ctx:ctx(), binary(), maps:map()) -> {ok, [cfapi_segment:cfapi_segment()], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
Link to this function
get_evaluation_by_identifier(Ctx, EnvironmentUUID, Feature, Target)
View Source-spec get_evaluation_by_identifier(ctx:ctx(), binary(), binary(), binary()) -> {ok, cfapi_evaluation:cfapi_evaluation(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
Link to this function
get_evaluation_by_identifier(Ctx, EnvironmentUUID, Feature, Target, Optional)
View Source-spec get_evaluation_by_identifier(ctx:ctx(), binary(), binary(), binary(), maps:map()) -> {ok, cfapi_evaluation:cfapi_evaluation(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_evaluations(ctx:ctx(), binary(), binary()) -> {ok, cfapi_get_evaluations_200_response:cfapi_get_evaluations_200_response(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_evaluations(ctx:ctx(), binary(), binary(), maps:map()) -> {ok, cfapi_get_evaluations_200_response:cfapi_get_evaluations_200_response(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_feature_config(ctx:ctx(), binary()) -> {ok, [cfapi_feature_config:cfapi_feature_config()], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_feature_config(ctx:ctx(), binary(), maps:map()) -> {ok, [cfapi_feature_config:cfapi_feature_config()], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
Link to this function
get_feature_config_by_identifier(Ctx, Identifier, EnvironmentUUID)
View Source-spec get_feature_config_by_identifier(ctx:ctx(), binary(), binary()) -> {ok, cfapi_feature_config:cfapi_feature_config(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
Link to this function
get_feature_config_by_identifier(Ctx, Identifier, EnvironmentUUID, Optional)
View Source-spec get_feature_config_by_identifier(ctx:ctx(), binary(), binary(), maps:map()) -> {ok, cfapi_feature_config:cfapi_feature_config(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec get_segment_by_identifier(ctx:ctx(), binary(), binary()) -> {ok, cfapi_segment:cfapi_segment(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
Link to this function
get_segment_by_identifier(Ctx, Identifier, EnvironmentUUID, Optional)
View Source-spec get_segment_by_identifier(ctx:ctx(), binary(), binary(), maps:map()) -> {ok, cfapi_segment:cfapi_segment(), cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec stream(ctx:ctx(), binary()) -> {ok, [], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.
-spec stream(ctx:ctx(), binary(), maps:map()) -> {ok, [], cfapi_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), cfapi_utils:response_info()}.