Ejemplo n.º 1
0
 public Base.Response <LocationIDSearchResult> Download(string[] keywords, IResultIndexSettings opt)
 {
     return(this.Download(new LocationIDSearchDownloadSettings()
     {
         Keywords = keywords, Index = opt.Index, Count = opt.Count
     }));
 }
 public PlacesDownloadSettings(IResultIndexSettings resultsCount)
 {
     this.Index      = resultsCount.Index;
     this.Count      = resultsCount.Count;
     this.Culture    = new Culture(Language.en, Country.US);
     this.Collection = string.Empty;
     this.Query      = string.Empty;
 }
 public void DownloadAsync(IEnumerable <string> keywords, bool metricValues, IResultIndexSettings opt, object userArgs = null)
 {
     if (keywords == null)
     {
         throw new ArgumentNullException("keywords", "The passed list is null.");
     }
     else
     {
         base.DownloadAsync(new WeatherFeedKeywordDownloadSettings()
         {
             Count = opt.Count, Index = opt.Index, IsMetric = metricValues, Keywords = MyHelper.EnumToArray(keywords)
         }, userArgs);
     }
 }
 public Base.Response<WeatherFeedResult> Download(IEnumerable<string> keywords, bool metricValues, IResultIndexSettings opt)
 {
     return base.Download(new WeatherFeedKeywordDownloadSettings() { Keywords = MyHelper.EnumToArray(keywords), IsMetric = metricValues });
 }
 public Base.Response<WeatherFeedResult> Download(string keyword, bool metricValues, IResultIndexSettings opt)
 {
     return this.Download(new string[] { keyword }, metricValues, opt);
 }
 public YahooManaged.Base.Response <LocationIDSearchResult> Download(string keyword, IResultIndexSettings opt)
 {
     return(this.Download(new string[] { keyword }, opt));
 }
Ejemplo n.º 7
0
 public static string YqlStatement(string fields, string table, string whereParam, IResultIndexSettings opt)
 {
     System.Text.StringBuilder stmt = new System.Text.StringBuilder(60);
     stmt.Append("select ");
     stmt.Append(fields);
     stmt.Append(" from ");
     stmt.Append(table);
     if (opt != null && opt.Count > 0)
     {
         stmt.Append("(");
         stmt.Append(opt.Index.ToString());
         stmt.Append(",");
         stmt.Append(opt.Count.ToString());
         stmt.Append(")");
     }
     if (whereParam.Trim() != string.Empty)
     {
         stmt.Append(" where ");
         stmt.Append(whereParam);
     }
     return(stmt.ToString());
 }
Ejemplo n.º 8
0
 public static string YqlUrl(string fields, string table, string whereParam, IResultIndexSettings opt, bool json)
 {
     return(YqlUrl(YqlStatement(fields, table, whereParam, opt), json));
 }
 public void DownloadAsync(string keyword, bool metricValues, IResultIndexSettings opt, object userArgs = null)
 {
     this.DownloadAsync(new string[] { keyword }, metricValues, opt);
 }
 public Base.Response<LocationIDSearchResult> Download(string[] keywords, IResultIndexSettings opt)
 {
     return this.Download(new LocationIDSearchDownloadSettings() { Keywords = keywords, Index = opt.Index, Count = opt.Count });
 }
 public Base.Response<LocationIDSearchResult> Download(string keyword, IResultIndexSettings opt)
 {
     return this.Download(new string[] { keyword }, opt);
 }
 public Base.Response <WeatherFeedResult> Download(IEnumerable <string> keywords, bool metricValues, IResultIndexSettings opt)
 {
     return(base.Download(new WeatherFeedKeywordDownloadSettings()
     {
         Keywords = MyHelper.EnumToArray(keywords), IsMetric = metricValues
     }));
 }
 public Base.Response <WeatherFeedResult> Download(string keyword, bool metricValues, IResultIndexSettings opt)
 {
     return(this.Download(new string[] { keyword }, metricValues, opt));
 }