View Source cfapi_client_api (cfapi v1.0.1)

Link to this section Summary

Link to this section Functions

Authenticate with the admin server. Used to retrieve all target segments for certain account id.
Link to this function

authenticate(Ctx, Optional)

View Source
-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()}.
Link to this function

get_all_segments(Ctx, EnvironmentUUID)

View Source
-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()}.
Retrieve all segments. Used to retrieve all segments for certain account id.
Link to this function

get_all_segments(Ctx, EnvironmentUUID, Optional)

View Source
-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()}.
Get feature evaluations for target
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()}.
Link to this function

get_evaluations(Ctx, EnvironmentUUID, Target)

View Source
-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()}.
Get feature evaluations for target
Link to this function

get_evaluations(Ctx, EnvironmentUUID, Target, Optional)

View Source
-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()}.
Link to this function

get_feature_config(Ctx, EnvironmentUUID)

View Source
-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()}.
Get all feature flags activations All feature flags with activations in project environment
Link to this function

get_feature_config(Ctx, EnvironmentUUID, Optional)

View Source
-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()}.
Get feature config
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()}.
Link to this function

get_segment_by_identifier(Ctx, Identifier, EnvironmentUUID)

View Source
-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()}.
Retrieve a segment by identifier Used to retrieve a segment for a certain account id by identifier
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()}.
Stream endpoint.
Link to this function

stream(Ctx, APIKey, Optional)

View Source
-spec stream(ctx:ctx(), binary(), maps:map()) ->
          {ok, [], cfapi_utils:response_info()} |
          {ok, hackney:client_ref()} |
          {error, term(), cfapi_utils:response_info()}.