-
Notifications
You must be signed in to change notification settings - Fork 5
GetClientsDomains()
Through this explanation we assume that you have using WHMCS_API;
on the begining of the file
And the API()
class initialized as _api
If needed check the Getting Started page
Prototype: public GetClientsDomains.GetClientsDomains GetClientsDomains(int LimitStart = 0, int LimitNumber = 25, int ClientID = -1, int DomainID = -1, string Domain = "")
Input:
- LimitStart: The offset for the returned log data (optional [default: 0])
- LimitNumber: The number of records to return (optional [default: 25])
- ClientID: The client id to obtain the details for (optional)
- DomainID: The specific domain id to obtain the details for (optional)
- Domain: The specific domain to obtain the details for (optional [default: false])
Output: GetClientsDomains
Model
To call it just use GetClientsDomains.GetClientsDomains clientDomains = _api.GetClientsDomains(DomainID: 1);
This way we are searching for the domain with the corresponding ID (not passing any arguments will retrieve all the domains in the WHMCS platform)
The GetClientsDomains model is inside it's own namespace (more info)
View all details about GetClientsDomains Model
WHMCS API Reference: https://developers.whmcs.com/api-reference/getclientsdomains/
using WHMCS_API;
namespace YourApp
{
class YourClass
{
public void YourFunction()
{
API _api = new API("username", "password", "accesskey", "url");
GetClientsDomains.GetClientsDomains clientDomains = _api.GetClientsDomains(DomainID: 1);
GetClientsDomains.Domain domain = clientDomains.Domains.Domain.FirstOrDefault();
Console.WriteLine("The Domain: {0} Registered in {1} expires at {2}", domain.DomainName,
domain.RegistryDate, domain.ExpiricyDate);
}
}
}
PCDev Open Source Development Team 2017