Skip to content

Commit

Permalink
chore(all) add possibility to define client specific descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo committed Mar 25, 2022
1 parent 24b1c48 commit 5f352b1
Show file tree
Hide file tree
Showing 36 changed files with 1,594 additions and 1,333 deletions.
106 changes: 46 additions & 60 deletions doc/api/AuthenticationApi.md
Expand Up @@ -2,95 +2,81 @@

All URIs are relative to *https://ws.api.video*

Method | HTTP request | Description
------------- | ------------- | -------------
[**authenticate**](AuthenticationApi.md#authenticate) | **POST** /auth/api-key | Authenticate
[**refresh**](AuthenticationApi.md#refresh) | **POST** /auth/refresh | Refresh token
| Method | Description | HTTP request |
| ------------- | ------------- | ------------- |
| [**authenticate**](AuthenticationApi.md#authenticate) | Authenticate | **POST** /auth/api-key |
| [**refresh**](AuthenticationApi.md#refresh) | Refresh token | **POST** /auth/refresh |


<a name="authenticate"></a>
## **authenticate**
## **`authenticate` - Authenticate**


### Example
```js
(async () => {
try {
const client = new ApiVideoClient();

const authenticatePayload = {
apiKey: "apiKey_example", // Your account API key. You can use your sandbox API key, or you can use your production API key.
};

// AccessToken
const result = await client.authentication.authenticate(authenticatePayload);
console.log(result);
} catch (e) {
console.error(e);
}
})();
```
To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication.
All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate)

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**authenticatePayload** | [**AuthenticatePayload**](../model/AuthenticatePayload.md)| |
| Name | Type | Description |
| ------------- | ------------- | ------------- |
| **authenticatePayload** | [**AuthenticatePayload**](../model/AuthenticatePayload.md)| |


### Return type
[**AccessToken**](../model/AccessToken.md)

### HTTP request headers
Promise<[**AccessToken**](../model/AccessToken.md)>.


### Example
```js
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
```


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

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Success | - |
**400** | Bad Request | - |
| **200** | Success | - |
| **400** | Bad Request | - |


---

<a name="refresh"></a>
## **refresh**
## **`refresh` - Refresh token**


### Example
```js
(async () => {
try {
const client = new ApiVideoClient();

const refreshTokenPayload = {
refreshToken: "refreshToken_example", // The refresh token is either the first refresh token you received when you authenticated with the auth/api-key endpoint, or it's the refresh token from the last time you used the auth/refresh endpoint. Place this in the body of your request to obtain a new access token (which is valid for an hour) and a new refresh token.
};

// AccessToken
const result = await client.authentication.refresh(refreshTokenPayload);
console.log(result);
} catch (e) {
console.error(e);
}
})();
```
Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token.


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**refreshTokenPayload** | [**RefreshTokenPayload**](../model/RefreshTokenPayload.md)| |
| Name | Type | Description |
| ------------- | ------------- | ------------- |
| **refreshTokenPayload** | [**RefreshTokenPayload**](../model/RefreshTokenPayload.md)| |


### Return type
[**AccessToken**](../model/AccessToken.md)

### HTTP request headers
Promise<[**AccessToken**](../model/AccessToken.md)>.


### Example
```js
//With the api.video API clients, authentication is taken care of with each client created.
// You get to skip this step!
```


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

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Success | - |
**400** | Bad Request | - |
| **200** | Success | - |
| **400** | Bad Request | - |


---

0 comments on commit 5f352b1

Please sign in to comment.