C# Class OneAndOne.Client.Endpoints.Users.Users

Inheritance: ResourceBase
显示文件 Open project: 1and1/oneandone-cloudserver-sdk-dotnet

Public Methods

Method Description
Create ( CreateUserRequest user ) : UserResponse

Creates a new user.

Delete ( string user_id ) : UserResponse

Removes a user.

Get ( int page = null, int perPage = null, string sort = null, string query = null, string fields = null ) : List

Returns a list with all users.

Show ( string user_id ) : UserResponse

Returns information about a user.

Update ( UpdateUserRequest updateUser, string user_id ) : UserResponse

Modifies user information.

Users ( object _apiUrl = null, object _apiKey = null ) : System

Method Details

Create() public method

Creates a new user.
public Create ( CreateUserRequest user ) : UserResponse
user OneAndOne.POCO.Requests.Users.CreateUserRequest
return OneAndOne.POCO.Respones.Users.UserResponse

Delete() public method

Removes a user.
public Delete ( string user_id ) : UserResponse
user_id string Unique user's identifier.
return OneAndOne.POCO.Respones.Users.UserResponse

Get() public method

Returns a list with all users.
public Get ( int page = null, int perPage = null, string sort = null, string query = null, string fields = null ) : List
page int Allows to use pagination. Sets the number of servers that will be shown in each page.
perPage int Current page to show.
sort string Allows to sort the result by priority:sort=name retrieves a list of elements ordered by their names.sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
query string Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q: q=My server
fields string Returns only the parameters requested: fields=id,name,description,hardware.ram
return List

Show() public method

Returns information about a user.
public Show ( string user_id ) : UserResponse
user_id string Unique user's identifier.
return OneAndOne.POCO.Respones.Users.UserResponse

Update() public method

Modifies user information.
public Update ( UpdateUserRequest updateUser, string user_id ) : UserResponse
updateUser OneAndOne.POCO.Requests.Users.UpdateUserRequest
user_id string Unique user's identifier.
return OneAndOne.POCO.Respones.Users.UserResponse

Users() public method

public Users ( object _apiUrl = null, object _apiKey = null ) : System
_apiUrl object
_apiKey object
return System