code: func (octx OAuthContext) PopulateJSONFromURL(result interface{}, method string, apiURL string, keyval ...string) error {
  	if method != http.MethodGet && method != http.MethodPost {
  		return fmt.Errorf("only HTTP Get or Post supported: found %v", method)
  	}
  	if len(keyval)%2 == 1 {
  		return errors.New("incorrect number of keyval arguments. must be even")
  	}
  	form := url.Values{}
  	for i := 0; i < len(keyval); i += 2 {
  		form.Set(keyval[i], keyval[i+1])
  	}
  	hres, err := octx.do(method, apiURL, form)
  	if err != nil {
  		return err
  	}
  	err = httputil.DecodeJSON(hres, result)
  	if err != nil {
  		return fmt.Errorf("could not parse response for %s: %v", apiURL, err)
  	}
  	return err
  }
docs: // PopulateJSONFromURL makes a POST or GET call at apiURL, using keyval as parameters of
  // the associated form. The JSON response is decoded into result.