/// <summary>
        /// Returns meta information about the dataset
        /// </summary>
        /// <returns></returns>
        public static string GetMeta()
        {
            //Create client to talk to OpenDat API Endpoint
            var client = new SodaClient(_APIEndPointHost, _AppToken);
            
            //read metadata of a dataset using the resource identifier (Socrata 4x4)
            var metadata = client.GetMetadata(_APIEndPoint4x4);

            return string.Format("{0} has {1} views. Last updated on {2:g}", metadata.Name, metadata.ViewsCount, metadata.RowsLastUpdated);
        }
示例#2
0
        public static string GetMeta()
        {
            //Create client to talk to OpenDat API Endpoint
            var client = new SodaClient(_APIEndPointHost, _AppToken);

            //read metadata of a dataset using the resource identifier (Socrata 4x4)
            var metadata = client.GetMetadata(_APIEndPoint4x4);

            return(string.Format("{0} has {1} views. Last updated on {2:g}", metadata.Name, metadata.ViewsCount, metadata.RowsLastUpdated));
        }
示例#3
0
 public void GetMetadata_With_Invalid_ResourceId_Throws_ArgumentOutOfRangeException(string input)
 {
     mockClient.GetMetadata(input);
 }
示例#4
0
 public void GetMetadata_With_Invalid_ResourceId_Throws_ArgumentOutOfRangeException(string input)
 {
     Assert.That(() => mockClient.GetMetadata(input), Throws.TypeOf <ArgumentOutOfRangeException>());
 }