public MyShowsResponse <Dictionary <DateTime, List <News> > > GetFriendsNews() { //todo check for the easier implementation RestRequest request = new RestRequest(Methods.FriendsNews); MyShowsResponse <Dictionary <string, List <News> > > myShowsResponse = Execute <Dictionary <string, List <News> > >(request); return(new MyShowsResponse <Dictionary <DateTime, List <News> > >(myShowsResponse.Response) { Data = new NewsCollection(myShowsResponse.Data) }); }
public MyShowsResponse Auth(Credentials cred = null) { RestRequest request = new RestRequest(Methods.Auth); cred = cred ?? Credentials; if (cred != null) { request.AddParameter(Methods.Params.Username, cred.Username, ParameterType.GetOrPost); request.AddParameter(Methods.Params.Password, cred.Password, ParameterType.GetOrPost); } MyShowsResponse myShowsResponse = Execute(request); phpSessId = myShowsResponse.Response.Cookies.GetValueByName(Methods.Params.PhpSessionId); return(Execute(request)); }