Skip to content

Commit

Permalink
Merge pull request #1 from vayan/bump-1.0.8
Browse files Browse the repository at this point in the history
Generate client for API Version 1.0.8
  • Loading branch information
zhouzhuojie authored Jul 20, 2018
2 parents 643e676 + 2491ca4 commit fc65463
Show file tree
Hide file tree
Showing 47 changed files with 3,667 additions and 3,227 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.0-SNAPSHOT
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Flagr - JavaScript client for flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 1.0.0
- Package version: 1.0.0
- API version: 1.0.8
- Package version: 1.0.8
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen

## Installation
Expand All @@ -23,6 +23,30 @@ Then install it via:
npm install flagr --save
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

Finally, switch to the directory you want to use your flagr from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

You should now be able to `require('flagr')` in javascript files from the directory you ran the last
command above from.

#### git
#
If the library is hosted at a git repository, e.g.
Expand All @@ -37,7 +61,8 @@ then install it via:

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):
perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually
use this library):

```shell
browserify main.js > bundle.js
Expand Down Expand Up @@ -111,6 +136,7 @@ Class | Method | HTTP request | Description
*Flagr.FlagApi* | [**getFlagSnapshots**](docs/FlagApi.md#getFlagSnapshots) | **GET** /flags/{flagID}/snapshots |
*Flagr.FlagApi* | [**putFlag**](docs/FlagApi.md#putFlag) | **PUT** /flags/{flagID} |
*Flagr.FlagApi* | [**setFlagEnabled**](docs/FlagApi.md#setFlagEnabled) | **PUT** /flags/{flagID}/enabled |
*Flagr.HealthApi* | [**healthGet**](docs/HealthApi.md#healthGet) | **GET** /health |
*Flagr.SegmentApi* | [**createSegment**](docs/SegmentApi.md#createSegment) | **POST** /flags/{flagID}/segments |
*Flagr.SegmentApi* | [**deleteSegment**](docs/SegmentApi.md#deleteSegment) | **DELETE** /flags/{flagID}/segments/{segmentID} |
*Flagr.SegmentApi* | [**findSegments**](docs/SegmentApi.md#findSegments) | **GET** /flags/{flagID}/segments |
Expand Down
60 changes: 32 additions & 28 deletions docs/ConstraintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,25 @@ Method | HTTP request | Description

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.ConstraintApi();
var apiInstance = new Flagr.ConstraintApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment

let body = new Flagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint
var body = new Flagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint


apiInstance.createConstraint(flagID, segmentID, body, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.createConstraint(flagID, segmentID, body, callback);
```

### Parameters
Expand Down Expand Up @@ -67,24 +68,25 @@ No authorization required

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.ConstraintApi();
var apiInstance = new Flagr.ConstraintApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment

let constraintID = 789; // Number | numeric ID of the constraint
var constraintID = 789; // Number | numeric ID of the constraint


apiInstance.deleteConstraint(flagID, segmentID, constraintID, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
};
apiInstance.deleteConstraint(flagID, segmentID, constraintID, callback);
```

### Parameters
Expand Down Expand Up @@ -116,22 +118,23 @@ No authorization required

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.ConstraintApi();
var apiInstance = new Flagr.ConstraintApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment


apiInstance.findConstraints(flagID, segmentID, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.findConstraints(flagID, segmentID, callback);
```

### Parameters
Expand Down Expand Up @@ -162,26 +165,27 @@ No authorization required

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.ConstraintApi();
var apiInstance = new Flagr.ConstraintApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment

let constraintID = 789; // Number | numeric ID of the constraint
var constraintID = 789; // Number | numeric ID of the constraint

let body = new Flagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint
var body = new Flagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint


apiInstance.putConstraint(flagID, segmentID, constraintID, body, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.putConstraint(flagID, segmentID, constraintID, body, callback);
```

### Parameters
Expand Down
28 changes: 15 additions & 13 deletions docs/DistributionApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ Method | HTTP request | Description

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.DistributionApi();
var apiInstance = new Flagr.DistributionApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment


apiInstance.findDistributions(flagID, segmentID, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.findDistributions(flagID, segmentID, callback);
```

### Parameters
Expand Down Expand Up @@ -64,24 +65,25 @@ replace the distribution with the new setting

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.DistributionApi();
var apiInstance = new Flagr.DistributionApi();

let flagID = 789; // Number | numeric ID of the flag
var flagID = 789; // Number | numeric ID of the flag

let segmentID = 789; // Number | numeric ID of the segment
var segmentID = 789; // Number | numeric ID of the segment

let body = new Flagr.PutDistributionsRequest(); // PutDistributionsRequest | array of distributions
var body = new Flagr.PutDistributionsRequest(); // PutDistributionsRequest | array of distributions


apiInstance.putDistributions(flagID, segmentID, body, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.putDistributions(flagID, segmentID, body, callback);
```

### Parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/EvalContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entityID** | **String** | |
**entityID** | **String** | entityID is used to deterministically at random to evaluate the flag result. If it&#39;s empty, flagr will randomly generate one. | [optional]
**entityType** | **String** | |
**entityContext** | **Object** | | [optional]
**enableDebug** | **Boolean** | | [optional]
Expand Down
22 changes: 12 additions & 10 deletions docs/EvaluationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ Method | HTTP request | Description

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.EvaluationApi();
var apiInstance = new Flagr.EvaluationApi();

let body = new Flagr.EvalContext(); // EvalContext | evalution context
var body = new Flagr.EvalContext(); // EvalContext | evalution context


apiInstance.postEvaluation(body, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.postEvaluation(body, callback);
```

### Parameters
Expand Down Expand Up @@ -59,20 +60,21 @@ No authorization required

### Example
```javascript
import Flagr from 'flagr';
var Flagr = require('flagr');

let apiInstance = new Flagr.EvaluationApi();
var apiInstance = new Flagr.EvaluationApi();

let body = new Flagr.EvaluationBatchRequest(); // EvaluationBatchRequest | evalution batch request
var body = new Flagr.EvaluationBatchRequest(); // EvaluationBatchRequest | evalution batch request


apiInstance.postEvaluationBatch(body, (error, data, response) => {
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
};
apiInstance.postEvaluationBatch(body, callback);
```

### Parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/EvaluationEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entityID** | **String** | |
**entityID** | **String** | | [optional]
**entityType** | **String** | |
**entityContext** | **Object** | | [optional]

Expand Down
Loading

0 comments on commit fc65463

Please sign in to comment.