Skip to content

Flagr is a feature flagging, A/B testing and dynamic configuration microservice

License

Notifications You must be signed in to change notification settings

amondnet/flagr.dart

Repository files navigation

Flagr Client for Dart

Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is "/api/v1".

version license likes sdk-version

MIT codecov build check

Requirements

Dart 1.20.0 or later OR Flutter 0.0.20 or later

Installation & Usage

dependencies:
  flagr: ^1.1.8

Getting Started

Please follow the installation procedure and then run the following:

import 'package:flagr/api.dart';


var api_instance = new ConstraintApi();
var flagID = 789; // int | numeric ID of the flag
var segmentID = 789; // int | numeric ID of the segment
var body = new CreateConstraintRequest(); // CreateConstraintRequest | create a constraint

try {
    var result = api_instance.createConstraint(flagID, segmentID, body);
    print(result);
} catch (e) {
    print("Exception when calling ConstraintApi->createConstraint: $e\n");
}

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1

Class Method HTTP request Description
ConstraintApi createConstraint post /flags/{flagID}/segments/{segmentID}/constraints
ConstraintApi deleteConstraint delete /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}
ConstraintApi findConstraints get /flags/{flagID}/segments/{segmentID}/constraints
ConstraintApi putConstraint put /flags/{flagID}/segments/{segmentID}/constraints/{constraintID}
DistributionApi findDistributions get /flags/{flagID}/segments/{segmentID}/distributions
DistributionApi putDistributions put /flags/{flagID}/segments/{segmentID}/distributions
EvaluationApi postEvaluation post /evaluation
EvaluationApi postEvaluationBatch post /evaluation/batch
ExportApi getExportEvalCacheJSON get /export/eval_cache/json
ExportApi getExportSqlite get /export/sqlite
FlagApi createFlag post /flags
FlagApi deleteFlag delete /flags/{flagID}
FlagApi findFlags get /flags
FlagApi getFlag get /flags/{flagID}
FlagApi getFlagEntityTypes get /flags/entity_types
FlagApi getFlagSnapshots get /flags/{flagID}/snapshots
FlagApi putFlag put /flags/{flagID}
FlagApi setFlagEnabled put /flags/{flagID}/enabled
HealthApi getHealth get /health
SegmentApi createSegment post /flags/{flagID}/segments
SegmentApi deleteSegment delete /flags/{flagID}/segments/{segmentID}
SegmentApi findSegments get /flags/{flagID}/segments
SegmentApi putSegment put /flags/{flagID}/segments/{segmentID}
SegmentApi putSegmentsReorder put /flags/{flagID}/segments/reorder
VariantApi createVariant post /flags/{flagID}/variants
VariantApi deleteVariant delete /flags/{flagID}/variants/{variantID}
VariantApi findVariants get /flags/{flagID}/variants
VariantApi putVariant put /flags/{flagID}/variants/{variantID}

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

Minsu Lee ( amond@amond.net )

About

Flagr is a feature flagging, A/B testing and dynamic configuration microservice

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published