Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

GetClientsDomains()

hitmanpt edited this page Feb 10, 2017 · 3 revisions

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

Contents


Function Overview

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


Function Details

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/

Donate


Full example

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);
    }
  }
}