Explorar el Código

Support setting categories on posts

main
Matt Baer hace 2 años
padre
commit
89c047d266
Se han modificado 2 ficheros con 10 adiciones y 1 borrados
  1. +8
    -0
      category.go
  2. +2
    -1
      post.go

+ 8
- 0
category.go Ver fichero

@@ -0,0 +1,8 @@
package writeas

// Category represents a post tag with additional metadata, like a title and slug.
type Category struct {
Hashtag string `json:"hashtag"`
Slug string `json:"slug"`
Title string `json:"title"`
}

+ 2
- 1
post.go Ver fichero

@@ -52,7 +52,8 @@ type (
IsRTL *bool `json:"rtl,omitempty"`
Language *string `json:"lang,omitempty"`

AuthorSlug *string `json:"author"`
AuthorSlug *string `json:"author,omitempty"`
Categories []Category `json:"categories,omitempty"`

// Parameters only for creating
Crosspost []map[string]string `json:"crosspost,omitempty"`


Cargando…
Cancelar
Guardar