@@ -143,12 +143,12 @@ func configDebug(cartel *Client) {
143143 }
144144}
145145
146- // Do sends an API request and returns the API response. The API response is
146+ // do sends an API request and returns the API response. The API response is
147147// JSON decoded and stored in the value pointed to by v, or returned as an
148148// error if an API error has occurred. If v implements the io.Writer
149149// interface, the raw response body will be written to v, without attempting to
150150// first decode it.
151- func (c * Client ) Do (req * http.Request , v interface {}) (* Response , error ) {
151+ func (c * Client ) do (req * http.Request , v interface {}) (* Response , error ) {
152152 if c .debugFile != nil {
153153 dumped , _ := httputil .DumpRequest (req , true )
154154 fmt .Fprintf (c .debugFile , "REQUEST: %s\n " , string (dumped ))
@@ -179,25 +179,25 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
179179 if err != nil {
180180 return response , err
181181 }
182- err = CheckResponse (resp )
182+ err = checkResponse (resp )
183183 return response , err
184184}
185185
186- // CheckResponse checks the API response for errors, and returns them if present.
187- func CheckResponse (r * http.Response ) error {
186+ // checkResponse checks the API response for errors, and returns them if present.
187+ func checkResponse (r * http.Response ) error {
188188 switch r .StatusCode {
189189 case 200 , 201 , 202 , 204 , 304 :
190190 return nil
191191 }
192192 return ErrNonHttp20xResponse
193193}
194194
195- // NewRequest creates an API request. A relative URL path can be provided in
195+ // newRequest creates an API request. A relative URL path can be provided in
196196// urlStr, in which case it is resolved relative to the base URL of the Client.
197197// Relative URL paths should always be specified without a preceding slash. If
198198// specified, the value pointed to by body is JSON encoded and included as the
199199// request body.
200- func (c * Client ) NewRequest (method , path string , opt * RequestBody , options []OptionFunc ) (* http.Request , error ) {
200+ func (c * Client ) newRequest (method , path string , opt * RequestBody , options []OptionFunc ) (* http.Request , error ) {
201201 u := * c .baseURL
202202 u .Opaque = c .baseURL .Path + path
203203
0 commit comments