6.7 KiB
\UserApi
All URIs are relative to http://petstore.swagger.io/v2
Method | HTTP request | Description |
---|---|---|
CreateUser | Post /user | Create user |
CreateUsersWithArrayInput | Post /user/createWithArray | Creates list of users with given input array |
CreateUsersWithListInput | Post /user/createWithList | Creates list of users with given input array |
DeleteUser | Delete /user/{username} | Delete user |
GetUserByName | Get /user/{username} | Get user by user name |
LoginUser | Get /user/login | Logs user into the system |
LogoutUser | Get /user/logout | Logs out current logged in user session |
UpdateUser | Put /user/{username} | Updated user |
CreateUser
CreateUser(ctx, body)
Create user
This can only be done by the logged in user.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | User | Created user object |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateUsersWithArrayInput
CreateUsersWithArrayInput(ctx, body)
Creates list of users with given input array
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | []User | List of user object |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateUsersWithListInput
CreateUsersWithListInput(ctx, body)
Creates list of users with given input array
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | []User | List of user object |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteUser
DeleteUser(ctx, username)
Delete user
This can only be done by the logged in user.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | The name that needs to be deleted |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetUserByName
User GetUserByName(ctx, username)
Get user by user name
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | The name that needs to be fetched. Use user1 for testing. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoginUser
string LoginUser(ctx, username, password)
Logs user into the system
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | The user name for login | |
password | string | The password for login in clear text |
Return type
string
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LogoutUser
LogoutUser(ctx, )
Logs out current logged in user session
Required Parameters
This endpoint does not need any parameter.
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateUser
UpdateUser(ctx, username, body)
Updated user
This can only be done by the logged in user.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
username | string | name that need to be deleted | |
body | User | Updated user object |
Return type
(empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]