npm package: @redbrick-sdk/challenge
Description: Redbrick_Challenge_API
Latest version: 2.0.0-rc221115131825

# redbrick_challenge

RedbrickChallenge - JavaScript client for redbrick_challenge
Redbrick Challenge API
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2.0.0-rc221115131825
- Package version: 2.0.0-rc221115131825
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install redbrick_challenge --save
```

#### git

#

If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

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):

```shell
browserify main.js > bundle.js
```

Then include _bundle.js_ in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false,
      },
    },
  ];
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var RedbrickChallenge = require('redbrick_challenge');
var defaultClient = RedbrickChallenge.ApiClient.instance;

var api = new RedbrickChallenge.ChallengeApi();
var opts = {
  body: new RedbrickChallenge.ChallengeCommentBody(), // {ChallengeCommentBody}
};
var callback = function (error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createChallengeComment(opts, callback);
```

## Documentation for API Endpoints

All URIs are relative to _http://localhost:8083/{version}_

| Class                            | Method                                                                                | HTTP request                               | Description |
| -------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------ | ----------- |
| _RedbrickChallenge.ChallengeApi_ | [**createChallengeComment**](docs/ChallengeApi.md#createChallengeComment)             | **POST** /challenge/comment                |
| _RedbrickChallenge.ChallengeApi_ | [**createChallengeCommentLike**](docs/ChallengeApi.md#createChallengeCommentLike)     | **POST** /challenge/comment/like/{id}      |
| _RedbrickChallenge.ChallengeApi_ | [**createChallengeReComment**](docs/ChallengeApi.md#createChallengeReComment)         | **POST** /challenge/re/comment/{id}        |
| _RedbrickChallenge.ChallengeApi_ | [**createChallengeReCommentLike**](docs/ChallengeApi.md#createChallengeReCommentLike) | **POST** /challenge/re/comment/like/{id}   |
| _RedbrickChallenge.ChallengeApi_ | [**createVoteChallenge**](docs/ChallengeApi.md#createVoteChallenge)                   | **POST** /challenge/vote                   |
| _RedbrickChallenge.ChallengeApi_ | [**deleteChallengeComment**](docs/ChallengeApi.md#deleteChallengeComment)             | **DELETE** /challenge/comment              |
| _RedbrickChallenge.ChallengeApi_ | [**deleteChallengeCommentLike**](docs/ChallengeApi.md#deleteChallengeCommentLike)     | **DELETE** /challenge/comment/like/{id}    |
| _RedbrickChallenge.ChallengeApi_ | [**deleteChallengeReComment**](docs/ChallengeApi.md#deleteChallengeReComment)         | **DELETE** /challenge/re/comment/{id}      |
| _RedbrickChallenge.ChallengeApi_ | [**deleteChallengeReCommentLike**](docs/ChallengeApi.md#deleteChallengeReCommentLike) | **DELETE** /challenge/re/comment/like/{id} |
| _RedbrickChallenge.ChallengeApi_ | [**deleteVoteChallenge**](docs/ChallengeApi.md#deleteVoteChallenge)                   | **DELETE** /challenge/vote                 |
| _RedbrickChallenge.ChallengeApi_ | [**listChallenge**](docs/ChallengeApi.md#listChallenge)                               | **GET** /challenge/list                    |
| _RedbrickChallenge.ChallengeApi_ | [**listChallengeComment**](docs/ChallengeApi.md#listChallengeComment)                 | **GET** /challenge/comment                 |
| _RedbrickChallenge.ChallengeApi_ | [**listChallengeReComment**](docs/ChallengeApi.md#listChallengeReComment)             | **GET** /challenge/re/comment/{id}         |
| _RedbrickChallenge.ChallengeApi_ | [**updateChallengeComment**](docs/ChallengeApi.md#updateChallengeComment)             | **PATCH** /challenge/comment               |
| _RedbrickChallenge.ChallengeApi_ | [**updateChallengeReComment**](docs/ChallengeApi.md#updateChallengeReComment)         | **PATCH** /challenge/re/comment/{id}       |
| _RedbrickChallenge.ChallengeApi_ | [**updateChallengeVotecount**](docs/ChallengeApi.md#updateChallengeVotecount)         | **PATCH** /challenge/votecount/{id}        |
| _RedbrickChallenge.ServiceApi_   | [**liveness**](docs/ServiceApi.md#liveness)                                           | **GET** /liveness                          |
| _RedbrickChallenge.ServiceApi_   | [**ready**](docs/ServiceApi.md#ready)                                                 | **GET** /ready                             |

## Documentation for Models

- [RedbrickChallenge.ChallengeCommentBody](docs/ChallengeCommentBody.md)
- [RedbrickChallenge.ChallengeCommentBody1](docs/ChallengeCommentBody1.md)
- [RedbrickChallenge.CommentIdBody](docs/CommentIdBody.md)
- [RedbrickChallenge.CommentIdBody1](docs/CommentIdBody1.md)
- [RedbrickChallenge.CommentResponse](docs/CommentResponse.md)
- [RedbrickChallenge.ListChallengeResponse](docs/ListChallengeResponse.md)
- [RedbrickChallenge.ResponseMessage](docs/ResponseMessage.md)
- [RedbrickChallenge.VotecountIdBody](docs/VotecountIdBody.md)

## Documentation for Authorization

### ApiKeyAuth

- **Type**: API key
- **API key parameter name**: X-API-Key
- **Location**: HTTP header

### BasicAuth

- **Type**: HTTP basic authentication

### BearerAuth

### OAuth2AuthorizationCode

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://api.redbrick.land/v2/oauth/authorize
- **Scopes**:
  - :

### OAuth2Client

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**:
- **Scopes**:
  - :

### OAuth2Password

- **Type**: OAuth
- **Flow**: password
- **Authorization URL**:
- **Scopes**:
  - :