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(body)
Create user
This can only be done by the logged in user.
library(petstore)
var.body <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Created user object
#Create user
api.instance <- UserApi$new()
api.instance$CreateUser(var.body)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | User| Created user object |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 0 | successful operation | - |
CreateUsersWithArrayInput(body)
Creates list of users with given input array
library(petstore)
var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
#Creates list of users with given input array
api.instance <- UserApi$new()
api.instance$CreateUsersWithArrayInput(var.body)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | list( User )| List of user object |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 0 | successful operation | - |
CreateUsersWithListInput(body)
Creates list of users with given input array
library(petstore)
var.body <- list(User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123)) # array[User] | List of user object
#Creates list of users with given input array
api.instance <- UserApi$new()
api.instance$CreateUsersWithListInput(var.body)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | list( User )| List of user object |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 0 | successful operation | - |
DeleteUser(username)
Delete user
This can only be done by the logged in user.
library(petstore)
var.username <- 'username_example' # character | The name that needs to be deleted
#Delete user
api.instance <- UserApi$new()
api.instance$DeleteUser(var.username)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | character| The name that needs to be deleted |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 400 | Invalid username supplied | - | | 404 | User not found | - |
User GetUserByName(username)
Get user by user name
library(petstore)
var.username <- 'username_example' # character | The name that needs to be fetched. Use user1 for testing.
#Get user by user name
api.instance <- UserApi$new()
result <- api.instance$GetUserByName(var.username)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | character| The name that needs to be fetched. Use user1 for testing. |
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | successful operation | - | | 400 | Invalid username supplied | - | | 404 | User not found | - |
character LoginUser(username, password)
Logs user into the system
library(petstore)
var.username <- 'username_example' # character | The user name for login
var.password <- 'password_example' # character | The password for login in clear text
#Logs user into the system
api.instance <- UserApi$new()
result <- api.instance$LoginUser(var.username, var.password)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | character| The user name for login | password | character| The password for login in clear text |
character
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | successful operation | * X-Rate-Limit - calls per hour allowed by the user * X-Expires-After - date in UTC when token expires | | 400 | Invalid username/password supplied | - |
LogoutUser()
Logs out current logged in user session
library(petstore)
#Logs out current logged in user session
api.instance <- UserApi$new()
api.instance$LogoutUser()
This endpoint does not need any parameter.
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 0 | successful operation | - |
UpdateUser(username, body)
Updated user
This can only be done by the logged in user.
library(petstore)
var.username <- 'username_example' # character | name that need to be deleted
var.body <- User$new(123, "username_example", "firstName_example", "lastName_example", "email_example", "password_example", "phone_example", 123) # User | Updated user object
#Updated user
api.instance <- UserApi$new()
api.instance$UpdateUser(var.username, var.body)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- username | character| name that need to be deleted | body | User| Updated user object |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 400 | Invalid user supplied | - | | 404 | User not found | - |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.