HTTPS SSH

In this first implementation, this library only consumes the Listings endpoint. In addition, it caches the token for as long as it lasts so it does not have to be retrieved when it is not needed. There is a quota applied to the number of times a new token is retrieved.

This C# solution is composed by two projects. 1. Console application to show how to use the library. 2. The DomainConnector library that interacts with the Domain API and retrieves the listings.

For examples on how to use, refer to the file names Program.cs

Example:

``
var clientId = "client-id-here";
var clientSecret = "client-secret-here";
// Instantiates API client.
var client = new Client(clientId, clientSecret);

// Instantiates listing request with its default values.
var request = ListingRequest.GetDefault();
request.PageSize = 200; // Max Page size.
request.PropertyFeatures = new[] { PropertyFeature.PetsAllowed, PropertyFeature.Furnished };
request.ListingType = ListingType.Rent; 
request.ListingAttributes = new[] { ListingAttribute.HasPhotos };
request.MinBathrooms = 1;
request.MaxBathrooms = 3;
request.MinCarspaces = "1";
request.MaxPrice = "2000";
request.Locations = new Location[] { new Location
                                         {
                                             State = "NSW",
                                             Area = "North Shore - Lower",
                                             Region = "Sydney Region",
                                             Suburb = "Chatswood"
                                         } };
request.Sort.SortKey = SortKey.Price;

// Gets the listing from Domain!
var listing = client.GetListing(request);
``