Skip to content

Commit

Permalink
Update SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
dnaranjo89 committed Nov 19, 2020
1 parent fbadb63 commit 2bbf1c5
Show file tree
Hide file tree
Showing 19 changed files with 1,523 additions and 1 deletion.
18 changes: 18 additions & 0 deletions sdk/docs/Link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EchaloasuerteJsSdk.Link

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [readonly]
**createdAt** | **Date** | | [optional] [readonly]
**updatedAt** | **Date** | | [optional] [readonly]
**title** | **String** | | [optional]
**description** | **String** | | [optional]
**privateId** | **String** | | [optional] [readonly]
**metadata** | [**[DrawMetadata]**](DrawMetadata.md) | | [optional]
**itemsSet1** | **[String]** | | [optional]
**itemsSet2** | **[String]** | | [optional]
**results** | [**[LinkResult]**](LinkResult.md) | | [optional] [readonly]


11 changes: 11 additions & 0 deletions sdk/docs/LinkAllOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EchaloasuerteJsSdk.LinkAllOf

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**itemsSet1** | **[String]** | | [optional]
**itemsSet2** | **[String]** | | [optional]
**results** | [**[LinkResult]**](LinkResult.md) | | [optional] [readonly]


139 changes: 139 additions & 0 deletions sdk/docs/LinkApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# EchaloasuerteJsSdk.LinkApi

All URIs are relative to *http://localhost/should-be-overriden*

Method | HTTP request | Description
------------- | ------------- | -------------
[**linkCreate**](LinkApi.md#linkCreate) | **POST** /link/ |
[**linkRead**](LinkApi.md#linkRead) | **GET** /link/{id}/ |
[**linkToss**](LinkApi.md#linkToss) | **POST** /link/{id}/toss/ |



## linkCreate

> Link linkCreate(link)


### Example

```javascript
import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk';

let apiInstance = new EchaloasuerteJsSdk.LinkApi();
let link = new EchaloasuerteJsSdk.Link(); // Link |
apiInstance.linkCreate(link).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});

```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**link** | [**Link**](Link.md)| |

### Return type

[**Link**](Link.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json


## linkRead

> Link linkRead(id)


### Example

```javascript
import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk';

let apiInstance = new EchaloasuerteJsSdk.LinkApi();
let id = "id_example"; // String |
apiInstance.linkRead(id).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});

```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |

### Return type

[**Link**](Link.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


## linkToss

> LinkResult linkToss(id, drawTossPayload)


### Example

```javascript
import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk';

let apiInstance = new EchaloasuerteJsSdk.LinkApi();
let id = "id_example"; // String |
let drawTossPayload = new EchaloasuerteJsSdk.DrawTossPayload(); // DrawTossPayload |
apiInstance.linkToss(id, drawTossPayload).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});

```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
**drawTossPayload** | [**DrawTossPayload**](DrawTossPayload.md)| |

### Return type

[**LinkResult**](LinkResult.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

12 changes: 12 additions & 0 deletions sdk/docs/LinkResult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EchaloasuerteJsSdk.LinkResult

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [readonly]
**createdAt** | **Date** | | [optional] [readonly]
**scheduleDate** | **Date** | | [optional]
**value** | [**[LinkResultAllOfValue]**](LinkResultAllOfValue.md) | | [optional]


9 changes: 9 additions & 0 deletions sdk/docs/LinkResultAllOf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# EchaloasuerteJsSdk.LinkResultAllOf

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**[LinkResultAllOfValue]**](LinkResultAllOfValue.md) | | [optional]


10 changes: 10 additions & 0 deletions sdk/docs/LinkResultAllOfValue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# EchaloasuerteJsSdk.LinkResultAllOfValue

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**element1** | **String** | | [optional]
**element2** | **String** | | [optional]


177 changes: 177 additions & 0 deletions sdk/src/api/LinkApi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/**
* EAS API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*
*/


import ApiClient from "../ApiClient";
import DrawTossPayload from '../model/DrawTossPayload';
import Link from '../model/Link';
import LinkResult from '../model/LinkResult';

/**
* Link service.
* @module api/LinkApi
* @version 0.0.1
*/
export default class LinkApi {

/**
* Constructs a new LinkApi.
* @alias module:api/LinkApi
* @class
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}



/**
* @param {module:model/Link} link
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
*/
linkCreateWithHttpInfo(link) {
let postBody = link;
// verify the required parameter 'link' is set
if (link === undefined || link === null) {
throw new Error("Missing the required parameter 'link' when calling linkCreate");
}

let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};

let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Link;
return this.apiClient.callApi(
'/link/', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}

/**
* @param {module:model/Link} link
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
*/
linkCreate(link) {
return this.linkCreateWithHttpInfo(link)
.then(function(response_and_data) {
return response_and_data.data;
});
}


/**
* @param {String} id
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response
*/
linkReadWithHttpInfo(id) {
let postBody = null;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling linkRead");
}

let pathParams = {
'id': id
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};

let authNames = [];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = Link;
return this.apiClient.callApi(
'/link/{id}/', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}

/**
* @param {String} id
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link}
*/
linkRead(id) {
return this.linkReadWithHttpInfo(id)
.then(function(response_and_data) {
return response_and_data.data;
});
}


/**
* @param {String} id
* @param {module:model/DrawTossPayload} drawTossPayload
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LinkResult} and HTTP response
*/
linkTossWithHttpInfo(id, drawTossPayload) {
let postBody = drawTossPayload;
// verify the required parameter 'id' is set
if (id === undefined || id === null) {
throw new Error("Missing the required parameter 'id' when calling linkToss");
}
// verify the required parameter 'drawTossPayload' is set
if (drawTossPayload === undefined || drawTossPayload === null) {
throw new Error("Missing the required parameter 'drawTossPayload' when calling linkToss");
}

let pathParams = {
'id': id
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};

let authNames = [];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = LinkResult;
return this.apiClient.callApi(
'/link/{id}/toss/', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, null
);
}

/**
* @param {String} id
* @param {module:model/DrawTossPayload} drawTossPayload
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LinkResult}
*/
linkToss(id, drawTossPayload) {
return this.linkTossWithHttpInfo(id, drawTossPayload)
.then(function(response_and_data) {
return response_and_data.data;
});
}


}
Loading

0 comments on commit 2bbf1c5

Please sign in to comment.