code: func (s LoginSession) Frontpage(sort PopularitySort, params ListingOptions) ([]*Submission, error) {
  	v, err := query.Values(params)
  	if err != nil {
  		return nil, err
  	}
  
  	var redditUrl string
  
  	if sort == DefaultPopularity {
  		redditUrl = fmt.Sprintf("https://www.reddit.com/.json?%s", v.Encode())
  	} else {
  		redditUrl = fmt.Sprintf("https://www.reddit.com/%s/.json?%s", sort, v.Encode())
  	}
  
  	req := request{
  		url:       redditUrl,
  		cookie:    s.cookie,
  		useragent: s.useragent,
  	}
  	body, err := req.getResponse()
  	if err != nil {
  		return nil, err
  	}
  
  	type Response struct {
  		Data struct {
  			Children []struct {
  				Data *Submission
  			}
  		}
  	}
  	r := &Response{}
  	err = json.NewDecoder(body).Decode(r)
  	if err != nil {
  		return nil, err
  	}
  
  	submissions := make([]*Submission, len(r.Data.Children))
  	for i, child := range r.Data.Children {
  		submissions[i] = child.Data
  	}
  
  	return submissions, nil
  }
docs: // Frontpage returns the submissions on the logged-in user's personal frontpage.