From 3e525f7a2427559a9d6530796a595cb20079f80a Mon Sep 17 00:00:00 2001 From: Rob Loranger Date: Tue, 11 Jun 2019 19:42:54 -0700 Subject: [PATCH] include collection and id in postparams this changes the JSON tags to include both the ID and Collection in PostParams. Both will be omitted when empty to maintain any unknown backwards compatibility. --- post.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post.go b/post.go index 1f8a55b..a85230f 100644 --- a/post.go +++ b/post.go @@ -38,7 +38,7 @@ type ( // PostParams holds values for creating or updating a post. PostParams struct { // Parameters only for updating - ID string `json:"-"` + ID string `json:"id,omitempty"` Token string `json:"token,omitempty"` // Parameters for creating or updating @@ -55,7 +55,7 @@ type ( Crosspost []map[string]string `json:"crosspost,omitempty"` // Parameters for collection posts - Collection string `json:"-"` + Collection string `json:"collection,omitempty"` } // PinnedPostParams holds values for pinning a post