Skip to content

Commit

Permalink
Merge pull request #2 from ButterCMS/module
Browse files Browse the repository at this point in the history
Module improvements
  • Loading branch information
jakelumetta authored May 7, 2021
2 parents b07ee8a + 57efe38 commit caec156
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ type PostMeta struct {
}

type PostAPIResponse struct {
MetaData PostMeta `json:"meta"`
Post Post `json:"data"`
MetaData PostMeta `json:"meta"`
Post Post `json:"data"`
}

// Pages
Expand All @@ -30,8 +30,8 @@ type PagesMeta struct {
}

type PagesAPIResponse struct {
MetaData PagingMeta `json:"meta"`
PageList []Page `json:"data"`
MetaData PagingMeta `json:"meta"`
PageList []Page `json:"data"`
}

type PageAPIResponse struct {
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/ButterCMS/buttercms-go

go 1.15
6 changes: 3 additions & 3 deletions page.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ButterCMS

type Page struct {
Slug string `json:"slug"`
PageType string `json:"page_type"`
Fields map[string]interface{} `json:"fields"`
Slug string `json:"slug"`
PageType string `json:"page_type"`
Fields map[string]interface{} `json:"fields"`
}
6 changes: 3 additions & 3 deletions tag.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ButterCMS

type Tag struct {
Name string `json:"name"`
Slug string `json:"slug"`
RecentPosts []Post `json:"recent_posts"`
Name string `json:"name"`
Slug string `json:"slug"`
RecentPosts []Post `json:"recent_posts"`
}

0 comments on commit caec156

Please sign in to comment.