コード例 #1
0
        private async Task <IEnumerable <PhraseCount> > GetTopPhrases(string entityType, string entityValue, int wordCount, PagingState page, string sort)
        {
            Debug.Assert(wordCount >= 1 && wordCount <= 5);

            var parms = new Dictionary <string, object>();

            parms.Add("entity_type", entityType);
            parms.Add("entity_value", entityValue);
            parms.Add("n", wordCount);
            parms.Add("page", page != null ? page.Page : 0);
            parms.Add("sort", sort);

            return(await _service.Get <IEnumerable <PhraseCount> >("phrases.json", parms));
        }
コード例 #2
0
 public async Task <T> GetNext <T>(string request) where T : class
 {
     return(await _service.Get <T>(request));
 }
コード例 #3
0
 public async Task <IEnumerable <MetaData> > GetMetaData()
 {
     return(await _sunlight.Get <IEnumerable <MetaData> >("metadata", new Dictionary <string, object>())); // this is the one method we call without params - make sure we get the overload that adds the api key
 }
コード例 #4
0
        public async Task <Results <Legislator> > LocateLegislators(double lat, double lon)
        {
            var parms = new Dictionary <string, object>();

            parms.Add("latitude", lat);
            parms.Add("longitude", lon);

            return(await _service.Get <Results <Legislator> >("legislators/locate", parms));
        }