public async Task FindVenueOrderedNameGeneratesCorrectUrl() { var request = new FindVenuesRequest("rock city"); var options = new MeetupClientOptions { Client = FakeHttpClient.AssertUrl("/find/venues?text=rock+city&fields=taglist&order=rating") }; var meetup = MeetupClient.WithApiToken("testToken", options); await meetup.Venues.Find("rock city", VenueOrderBy.Rating); }
public Task <MeetupResponse <Venue[]> > Find(FindVenuesRequest request) { if (request == null) { throw new ArgumentNullException(nameof(request)); } if (!string.IsNullOrWhiteSpace(request.Country) && request.Country.Length != 2) { throw new ArgumentOutOfRangeException(nameof(request), "Country must be a 2 character code"); } return(MeetupRequestMethods.GetWithRequestAsync <Venue[]>("/find/venues", _options, request)); }
public async Task FindVenueRequestGeneratesCorrectUrl() { var request = new FindVenuesRequest("rock city") { Country = "UK", Latitude = 2.3, Longitude = 20.5, Location = "nottingham", MilesRadius = 25.6, Zip = "NG6", Descending = true, OrderBy = VenueOrderBy.Rating_Count }; var options = new MeetupClientOptions { Client = FakeHttpClient.AssertUrl("/find/venues?text=rock+city&fields=taglist&country=UK&lat=2.3&lon=20.5&location=nottingham&radius=25.6&zip=NG6&order=rating_count&desc=true") }; var meetup = MeetupClient.WithApiToken("testToken", options); await meetup.Venues.Find(request); }