AppHarbor.AppHarborClient.GetHostnames C# (CSharp) Method

GetHostnames() public method

public GetHostnames ( string applicationSlug ) : IEnumerable
applicationSlug string
return IEnumerable
		public IEnumerable<Hostname> GetHostnames(string applicationSlug)
		{
			CheckArgumentNull("applicationSlug", applicationSlug);

			var request = new RestRequest();
			request.Resource = "applications/{applicationSlug}/hostnames";
			request.AddParameter("applicationSlug", applicationSlug, ParameterType.UrlSegment);

			return ExecuteGetListKeyed<Hostname>(request);
		}

Usage Example

Example #1
0
        public IEnumerable <Hostname> GetHostnames(string applicationId)
        {
            var hostnames = _api.GetHostnames(applicationId);

            if (hostnames == null)
            {
                throw new ApiException();
            }

            return(hostnames);
        }