Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import (
"compress/zlib"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
Expand Down Expand Up @@ -275,17 +274,6 @@ func decodeResponse(resp *http.Response, data interface{}) error {
return json.NewDecoder(resp.Body).Decode(data)
}

func NewApiError(resp *http.Response) *ApiError {
body, _ := ioutil.ReadAll(resp.Body)

return &ApiError{
StatusCode: resp.StatusCode,
Header: resp.Header,
Body: string(body),
URL: resp.Request.URL,
}
}

//query executes a query to the specified url, sending the values specified by form, and decodes the response JSON to data
//method can be either _GET or _POST
func (c TwitterApi) execQuery(urlStr string, form url.Values, data interface{}, method int) error {
Expand Down