Class AssetPasswordsEndpoint
Provides all the methods required to make calls to the asset_passwords endpoint of the Hudu API.
Inheritance
Namespace: HuduAPI.Endpoints
Assembly: HuduAPI.dll
Syntax
public class AssetPasswordsEndpoint
Remarks
The endpoint is a full CRUD endpoint and provides all methods required to create, read, update delete and archive.
Constructors
AssetPasswordsEndpoint(String, String)
Initializes a new instance of the AssetPasswordsEndpoint class.
Declaration
public AssetPasswordsEndpoint(string huduAPIKey, string huduBaseURL)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | huduAPIKey | The hudu API key. |
| System.String | huduBaseURL | The hudu base URL. |
Properties
HuduAPIKey
Gets or sets the hudu API key that will be used for all calls to this Endpoint.
Declaration
public string HuduAPIKey { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The hudu API key. |
HuduBaseURL
Gets or sets the hudu base URL that will be used for all calls to the Endpoint.
Declaration
public string HuduBaseURL { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The hudu base URL. |
Methods
Archive(ItemById, Boolean)
Declaration
public AssetPassword Archive(ItemById parameters, bool archive)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemById | parameters | |
| System.Boolean | archive |
Returns
| Type | Description |
|---|---|
| AssetPassword |
Create(CreateAssetPassword)
Declaration
public AssetPassword Create(CreateAssetPassword parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAssetPassword | parameters |
Returns
| Type | Description |
|---|---|
| AssetPassword |
Delete(ItemById)
Declaration
public void Delete(ItemById parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemById | parameters |
Get(GetAssetPasswords)
Get AssetPasswords based on the parameters used to filter the resutls
Declaration
public AssetPasswords Get(GetAssetPasswords parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| GetAssetPasswords | parameters | The parameters to use when making the call. |
Returns
| Type | Description |
|---|---|
| AssetPasswords | A single AssetPasswords object that contains all the asset_passwords found |
Exceptions
| Type | Condition |
|---|---|
| RecordNotFoundException | If the asset_password is not found than an exception is raised |
Get(ItemById)
Get a single AssetPassword from Hudu
Declaration
public AssetPassword Get(ItemById parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ItemById | parameters | The parameters to use when making the call. |
Returns
| Type | Description |
|---|---|
| AssetPassword | A single AssetPassword Object as returned by the Hudu API |
Exceptions
| Type | Condition |
|---|---|
| RecordNotFoundException | If the asset_password is not found than an exception is raised |
Update(UpdateAssetPassword)
Declaration
public AssetPassword Update(UpdateAssetPassword parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateAssetPassword | parameters |
Returns
| Type | Description |
|---|---|
| AssetPassword |