Skip to content

Commit

Permalink
code formatting and removed debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Siu committed Sep 22, 2015
1 parent bf39304 commit 846f5cb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 32 deletions.
62 changes: 31 additions & 31 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ const (
// Request is a convenient container for API request params. It is a superset of
// all valid request params across all API endpoints.
type Request struct {
ID int // articles
GroupID int // galleries, for some reason
Title string
Slug string
ContentTypeID []int
SectionID []int
SubsectionID []int
CollectionID []int
AdCategoryID []int
ID int // articles
GroupID int // galleries, for some reason
Title string
Slug string
ContentTypeID []int
SectionID []int
SubsectionID []int
CollectionID []int
AdCategoryID []int
AdCategoryName string
Editor1 []int
Editor2 []int
Editor3 []int
PublishedFrom time.Time
PublishedTo time.Time
Visibility Visibility
IgnoreCache bool
AllImages bool
GetImageCuts bool
HDWActive bool
OrderBy string
Start int
Limit int
JsonpCallback string
Editor1 []int
Editor2 []int
Editor3 []int
PublishedFrom time.Time
PublishedTo time.Time
Visibility Visibility
IgnoreCache bool
AllImages bool
GetImageCuts bool
HDWActive bool
OrderBy string
Start int
Limit int
JsonpCallback string

key string
publication Publication
Expand All @@ -67,13 +67,13 @@ type ImageResponse struct {

// Content represents an article or gallery (or listicle, etc.)
type Content struct {
ID int `json:"id"`
ContentID int `json:"content_id"`
GroupID int `json:"group_id"`
Type ResType `json:"resource_type"`
Title string `json:"title"`
Images []Image `json:"images"`
URL string `json:"url"`
ID int `json:"id"`
ContentID int `json:"content_id"`
GroupID int `json:"group_id"`
Type ResType `json:"resource_type"`
Title string `json:"title"`
Images []Image `json:"images"`
URL string `json:"url"`
AdCategory AdCategory `json:"ad_category"`
}

Expand All @@ -95,5 +95,5 @@ type ImageCut struct {
}

type AdCategory struct {
AdCategoryName string `json:"ad_category_name"`
AdCategoryName string `json:"ad_category_name"`
}
1 change: 0 additions & 1 deletion net.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func prepareAPIUri(endpoint Endpoint, req Request) (uri string) {
func doGet(url string) (result []byte, err error) {
resp, err := http.Get(url)
if err != nil {
log.Printf("error :%s", err.Error())
return nil, err
}
defer resp.Body.Close()
Expand Down

0 comments on commit 846f5cb

Please sign in to comment.