Просмотр исходного кода

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.
pull/18/head
Rob Loranger 4 лет назад
Родитель
Сommit
3e525f7a24
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: D6F1633A4F0903B8
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      post.go

+ 2
- 2
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


Загрузка…
Отмена
Сохранить