예제 #1
0
        public async Task <List <SessionDTO> > GetAllSessions()
        {
            //SessionsLink.SetDay(1);
            var sessionsResponse = await _HttpClient.SendAsync(SessionsLink.BuildRequestMessage());

            sessionsResponse.EnsureSuccessStatusCode();
            var collection = await SessionsLink.ParseResponseAsync(sessionsResponse);

            return(SessionsLink.ParseSessions(collection));
        }
예제 #2
0
        public async Task <List <SessionDTO> > GetSessionsBySpeakerName(string speakerName)
        {
            var response = await _HttpClient.SendAsync(SessionsLink.BuildRequestMessage(new Dictionary <string, object> {
                { "{speakername}", speakerName }
            }));

            response.EnsureSuccessStatusCode();

            var collection = await SessionsLink.ParseResponseAsync(response);

            return(SessionsLink.ParseSessions(collection));
        }