Skip to content

Christian-Oleson/flagr-net-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flagr.Api - the C# library for the Flagr

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

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.1.12
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext
  • UWP >=10.0

Dependencies

  • FubarCoder.RestSharp.Portable.Core >=4.0.7
  • FubarCoder.RestSharp.Portable.HttpClient >=4.0.7
  • Newtonsoft.Json >=10.0.3

Installation

Generate the DLL using your preferred tool

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Flagr.Api.Api;
using Flagr.Api.Client;
using Flagr.Api.Model;

Getting Started

using System;
using System.Diagnostics;
using Flagr.Api.Api;
using Flagr.Api.Client;
using Flagr.Api.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

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

            try
            {
                Constraint result = apiInstance.CreateConstraint(flagID, segmentID, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ConstraintApi.CreateConstraint: " + e.Message );
            }

        }
    }
}

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 RestoreFlag PUT /flags/{flagID}/restore
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
TagApi CreateTag POST /flags/{flagID}/tags
TagApi DeleteTag DELETE /flags/{flagID}/tags/{tagID}
TagApi FindAllTags GET /tags
TagApi FindTags GET /flags/{flagID}/tags
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.

About

.NET Standard Flagr API Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages