예제 #1
0
        public Task <MeetupResponse <Group> > Get(string groupName)
        {
            if (string.IsNullOrWhiteSpace(groupName))
            {
                throw new ArgumentNullException(nameof(groupName));
            }

            return(MeetupRequestMethods.GetWithRequestAsync <Group>($"/{groupName}", _options, null));
        }
예제 #2
0
        public Task <MeetupResponse <Venue[]> > For(GroupVenueRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            return(MeetupRequestMethods.GetWithRequestAsync <Venue[]>($"/{request.GroupName}/venues", _options, request));
        }
예제 #3
0
        public Task <MeetupResponse <Topic[]> > RecommendedGroupTopic(RecommendedGroupTopicRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            return(MeetupRequestMethods.GetWithRequestAsync <Topic[]>("recommended/group_topics",
                                                                      _options, request));
        }
예제 #4
0
        public Task <MeetupResponse <Topic[]> > Find(FindTopicRequest request)
        {
            if (request == null)
            {
                throw new ArgumentNullException(nameof(request));
            }

            return(MeetupRequestMethods.GetWithRequestAsync <Topic[]>(
                       "find/topics",
                       _options, request));
        }
예제 #5
0
        public Task <MeetupResponse <Venue> > CreateFor(string groupName, Venue venue)
        {
            if (string.IsNullOrWhiteSpace(groupName))
            {
                throw new ArgumentNullException(nameof(groupName));
            }
            if (venue == null)
            {
                throw new ArgumentNullException(nameof(venue));
            }

            return(MeetupRequestMethods.PostWithContentAsync <Venue, Venue>($"/{groupName}/venues?fields=taglist", _options, venue));
        }
예제 #6
0
        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 <MeetupResponse <T> > GoToLink <T>(MeetupLink <T> meetupLink)
        {
            var response = await MeetupRequestMethods.GetAsync(meetupLink.Url, Options);

            return(await response.AsObject <T>(Options));
        }
예제 #8
0
 public Task <MeetupResponse <Location[]> > FindLocation(FindLocationRequest request)
 {
     return(MeetupRequestMethods.GetWithRequestAsync <Location[]>("/find/location", _options, request));
 }
예제 #9
0
        public async Task <MeetupResponse <Status> > Status()
        {
            var response = await MeetupRequestMethods.GetAsync("/status", _options);

            return(await response.AsObject <Status>(_options));
        }
예제 #10
0
 private Task <MeetupResponse <Venue[]> > Recommended(MeetupRequest request)
 {
     return(MeetupRequestMethods.GetWithRequestAsync <Venue[]>("/recommended/venues", _options, request));
 }
예제 #11
0
 public Task <MeetupResponse <TopicCategory[]> > FindCategories(FindTopicCategoriesRequest request)
 {
     return(MeetupRequestMethods.GetWithRequestAsync <TopicCategory[]>(
                "find/topic_categories",
                _options, request));
 }
예제 #12
0
 public Task <MeetupResponse <Event[]> > For(GetEventsRequest request)
 {
     return(MeetupRequestMethods.GetWithRequestAsync <Event[]>($"{request.GroupName}/events", _options, request));
 }
예제 #13
0
 public Task <MeetupResponse <List <Group> > > Find()
 {
     return(MeetupRequestMethods.GetWithRequestAsync <List <Group> >($"/find/groups", _options, null));
 }
예제 #14
0
 public Task <MeetupResponse <Rsvp[]> > For(GetRsvpsRequest request)
 {
     return(MeetupRequestMethods.GetWithRequestAsync <Rsvp[]>($"{request.GroupName}/events/{request.EventId}/rsvps", _options, request));
 }