コード例 #1
0
        public async Task <SuggestResponse <T> > Find <T>(string query) where T : IOutward
        {
            var request = new SuggestOutwardRequest(query);
            var entity  = Outwards.GetEntityName(typeof(T));

            return(await Execute <SuggestResponse <T> >(method : SuggestionsMethod.Find, entity : entity, request : request));
        }
コード例 #2
0
        public async Task <SuggestResponse <T> > Geolocate <T>(double lat, double lon, int radius_meters = 100, int count = 5) where T : IOutward
        {
            var request = new GeolocateRequest(lat, lon, radius_meters, count);
            var entity  = Outwards.GetEntityName(typeof(T));

            return(await Execute <SuggestResponse <T> >(method : SuggestionsMethod.Geolocate, entity : entity, request : request));
        }
コード例 #3
0
        public async Task <SuggestResponse <T> > Suggest <T>(SuggestOutwardRequest request,
                                                             CancellationToken cancellationToken = default) where T : IOutward
        {
            var entity = Outwards.GetEntityName(typeof(T));

            return(await Execute <SuggestResponse <T> >(method : SuggestionsMethod.Suggest, entity : entity,
                                                        request : request, cancellationToken : cancellationToken));
        }
コード例 #4
0
        public SuggestResponse <T> Suggest <T>(SuggestOutwardRequest request) where T : IOutward
        {
            var entity = Outwards.GetEntityName(typeof(T));

            return(Execute <SuggestResponse <T> >(method: SuggestionsMethod.Suggest, entity: entity, request: request));
        }