public async Task <SuggestResponse <Fullname> > SuggestName(string query, int count = 5, CancellationToken cancellationToken = default) { var request = new SuggestNameRequest(query, count); return(await SuggestName(request, cancellationToken)); }
public void SuggestFioPartsTest() { var query = new SuggestNameRequest("викт"); query.parts = new FullnamePart[] { FullnamePart.SURNAME }; var response = api.SuggestName(query); Assert.AreEqual("Викторова", response.suggestions[0].data.surname); Console.WriteLine(string.Join("\n", response.suggestions)); }
public void SuggestNameGenderTest() { var request = new SuggestNameRequest("виктор") { gender = Gender.FEMALE }; var response = api.SuggestName(request); Assert.Equal("Виктория", response.suggestions[0].data.name); Console.WriteLine(string.Join("\n", response.suggestions)); }
public async Task SuggestNamePartsTest() { var request = new SuggestNameRequest("викт") { parts = new[] { FullnamePart.SURNAME } }; var response = await api.SuggestName(request); Assert.Equal("Викторова", response.suggestions[0].data.surname); Console.WriteLine(string.Join("\n", response.suggestions)); }
public async Task <SuggestResponse <Fullname> > SuggestName(SuggestNameRequest request) { return(await Execute <SuggestResponse <Fullname> >(method : SuggestionsMethod.Suggest, entity : SuggestionsEntity.Name, request : request)); }
public async Task <SuggestResponse <Fullname> > SuggestName(string query, int count = 5) { var request = new SuggestNameRequest(query, count); return(await SuggestName(request)); }
public SuggestResponse <Fullname> SuggestName(string query, int count = 5) { var request = new SuggestNameRequest(query, count); return(SuggestName(request)); }
public async Task <SuggestResponse <Fullname> > SuggestName(SuggestNameRequest request, CancellationToken cancellationToken = default) { return(await Execute <SuggestResponse <Fullname> >(method : SuggestionsMethod.Suggest, entity : SuggestionsEntity.Name, request : request, cancellationToken : cancellationToken)); }