example
This commit is contained in:
47
example/clients/javascript/docs/GreetApi.md
Normal file
47
example/clients/javascript/docs/GreetApi.md
Normal file
@ -0,0 +1,47 @@
|
||||
# SwaggerJsClient.GreetApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**ping**](GreetApi.md#ping) | **GET** /user/ping |
|
||||
|
||||
|
||||
<a name="ping"></a>
|
||||
# **ping**
|
||||
> Object ping()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerJsClient = require('swagger-js-client');
|
||||
|
||||
var apiInstance = new SwaggerJsClient.GreetApi();
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
apiInstance.ping(callback);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
9
example/clients/javascript/docs/LoginReq.md
Normal file
9
example/clients/javascript/docs/LoginReq.md
Normal file
@ -0,0 +1,9 @@
|
||||
# SwaggerJsClient.LoginReq
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**username** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
|
||||
|
10
example/clients/javascript/docs/RegisterReq.md
Normal file
10
example/clients/javascript/docs/RegisterReq.md
Normal file
@ -0,0 +1,10 @@
|
||||
# SwaggerJsClient.RegisterReq
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**username** | **String** | | [optional]
|
||||
**password** | **String** | | [optional]
|
||||
**mobile** | **String** | | [optional]
|
||||
|
||||
|
193
example/clients/javascript/docs/UserApiApi.md
Normal file
193
example/clients/javascript/docs/UserApiApi.md
Normal file
@ -0,0 +1,193 @@
|
||||
# SwaggerJsClient.UserApiApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getUserInfo**](UserApiApi.md#getUserInfo) | **GET** /api/user/{id} | 获取用户信息
|
||||
[**login**](UserApiApi.md#login) | **POST** /api/user/login | 登录
|
||||
[**register**](UserApiApi.md#register) | **POST** /api/user/register | 注册
|
||||
[**searchUser**](UserApiApi.md#searchUser) | **GET** /api/user/search | 用户搜索
|
||||
|
||||
|
||||
<a name="getUserInfo"></a>
|
||||
# **getUserInfo**
|
||||
> UserInfoReply getUserInfo(id, body)
|
||||
|
||||
获取用户信息
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerJsClient = require('swagger-js-client');
|
||||
|
||||
var apiInstance = new SwaggerJsClient.UserApiApi();
|
||||
|
||||
var id = "id_example"; // String |
|
||||
|
||||
var body = new SwaggerJsClient.UserInfoReq(); // UserInfoReq |
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
apiInstance.getUserInfo(id, body, callback);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **String**| |
|
||||
**body** | [**UserInfoReq**](UserInfoReq.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserInfoReply**](UserInfoReply.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="login"></a>
|
||||
# **login**
|
||||
> Object login(body)
|
||||
|
||||
登录
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerJsClient = require('swagger-js-client');
|
||||
|
||||
var apiInstance = new SwaggerJsClient.UserApiApi();
|
||||
|
||||
var body = new SwaggerJsClient.LoginReq(); // LoginReq |
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
apiInstance.login(body, callback);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**LoginReq**](LoginReq.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="register"></a>
|
||||
# **register**
|
||||
> Object register(body)
|
||||
|
||||
注册
|
||||
|
||||
注册一个用户
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerJsClient = require('swagger-js-client');
|
||||
|
||||
var apiInstance = new SwaggerJsClient.UserApiApi();
|
||||
|
||||
var body = new SwaggerJsClient.RegisterReq(); // RegisterReq |
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
apiInstance.register(body, callback);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**RegisterReq**](RegisterReq.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="searchUser"></a>
|
||||
# **searchUser**
|
||||
> UserSearchReply searchUser(body)
|
||||
|
||||
用户搜索
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerJsClient = require('swagger-js-client');
|
||||
|
||||
var apiInstance = new SwaggerJsClient.UserApiApi();
|
||||
|
||||
var body = new SwaggerJsClient.UserSearchReq(); // UserSearchReq |
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
apiInstance.searchUser(body, callback);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**UserSearchReq**](UserSearchReq.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
[**UserSearchReply**](UserSearchReply.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
12
example/clients/javascript/docs/UserInfoReply.md
Normal file
12
example/clients/javascript/docs/UserInfoReply.md
Normal file
@ -0,0 +1,12 @@
|
||||
# SwaggerJsClient.UserInfoReply
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
**age** | **Number** | | [optional]
|
||||
**birthday** | **String** | | [optional]
|
||||
**description** | **String** | | [optional]
|
||||
**tag** | **[String]** | | [optional]
|
||||
|
||||
|
8
example/clients/javascript/docs/UserInfoReq.md
Normal file
8
example/clients/javascript/docs/UserInfoReq.md
Normal file
@ -0,0 +1,8 @@
|
||||
# SwaggerJsClient.UserInfoReq
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | | [optional]
|
||||
|
||||
|
8
example/clients/javascript/docs/UserSearchReply.md
Normal file
8
example/clients/javascript/docs/UserSearchReply.md
Normal file
@ -0,0 +1,8 @@
|
||||
# SwaggerJsClient.UserSearchReply
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**keyWord** | [**[UserInfoReply]**](UserInfoReply.md) | | [optional]
|
||||
|
||||
|
8
example/clients/javascript/docs/UserSearchReq.md
Normal file
8
example/clients/javascript/docs/UserSearchReq.md
Normal file
@ -0,0 +1,8 @@
|
||||
# SwaggerJsClient.UserSearchReq
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**keyWord** | **String** | | [optional]
|
||||
|
||||
|
Reference in New Issue
Block a user