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)); }
public async Task <T> GetNext <T>(string request) where T : class { return(await _service.Get <T>(request)); }
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 }
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)); }