From 4c753cfe16d960833477e3f457b1ee8167441328 Mon Sep 17 00:00:00 2001 From: Eric Duncan Date: Wed, 15 Feb 2017 09:10:55 -0500 Subject: [PATCH] v1.2.1 version bump --- README.md | 35 +++++++++++++++++++++++++---------- doc.go | 4 ++++ example_test.go | 4 ++-- examples_test.go | 2 +- podcast.go | 2 +- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8b040c0..627e76d 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,10 @@ RSS 2.0: https://cyber.harvard. Podcasts: https://help.apple.com/itc/podcasts_connect/#/itca5b22233 ### Release Notes +1.2.1 +* added Podcast.AddSubTitle() and truncating to 64 chars. +* added a number of Guards to protect against empty fields. + 1.2.0 * added Podcast.AddPubDate() and Podcast.AddLastBuildDate() overrides. * added Item.AddImage() to mask some cumbersome addition of IImage. @@ -86,6 +90,7 @@ Podcasts: ht * [func (p \*Podcast) AddItem(i Item) (int, error)](#Podcast.AddItem) * [func (p \*Podcast) AddLastBuildDate(datetime \*time.Time)](#Podcast.AddLastBuildDate) * [func (p \*Podcast) AddPubDate(datetime \*time.Time)](#Podcast.AddPubDate) + * [func (p \*Podcast) AddSubTitle(subTitle string)](#Podcast.AddSubTitle) * [func (p \*Podcast) AddSummary(summary string)](#Podcast.AddSummary) * [func (p \*Podcast) Bytes() []byte](#Podcast.Bytes) * [func (p \*Podcast) Encode(w io.Writer) error](#Podcast.Encode) @@ -284,7 +289,7 @@ extensions (.jpg, .png), and in the RGB colorspace. To optimize images for mobile devices, Apple recommends compressing your image files. -### func (\*Item) [AddPubDate](./item.go#L77) +### func (\*Item) [AddPubDate](./item.go#L79) ``` go func (i *Item) AddPubDate(datetime *time.Time) ``` @@ -292,7 +297,7 @@ AddPubDate adds the datetime as a parsed PubDate. UTC time is used by default. -### func (\*Item) [AddSummary](./item.go#L88) +### func (\*Item) [AddSummary](./item.go#L90) ``` go func (i *Item) AddSummary(summary string) ``` @@ -370,7 +375,7 @@ AddCategory adds the categories to the Podcast in comma delimited format. subCategories are optional. -### func (\*Podcast) [AddImage](./podcast.go#L119) +### func (\*Podcast) [AddImage](./podcast.go#L122) ``` go func (p *Podcast) AddImage(url string) ``` @@ -383,7 +388,7 @@ extensions (.jpg, .png), and in the RGB colorspace. To optimize images for mobile devices, Apple recommends compressing your image files. -### func (\*Podcast) [AddItem](./podcast.go#L167) +### func (\*Podcast) [AddItem](./podcast.go#L173) ``` go func (p *Podcast) AddItem(i Item) (int, error) ``` @@ -431,7 +436,7 @@ Recommendations: https://help.apple.com/itc/podcasts_connect/#/itcb54353390 -### func (\*Podcast) [AddLastBuildDate](./podcast.go#L244) +### func (\*Podcast) [AddLastBuildDate](./podcast.go#L250) ``` go func (p *Podcast) AddLastBuildDate(datetime *time.Time) ``` @@ -439,7 +444,7 @@ AddLastBuildDate adds the datetime as a parsed PubDate. UTC time is used by default. -### func (\*Podcast) [AddPubDate](./podcast.go#L237) +### func (\*Podcast) [AddPubDate](./podcast.go#L243) ``` go func (p *Podcast) AddPubDate(datetime *time.Time) ``` @@ -447,7 +452,17 @@ AddPubDate adds the datetime as a parsed PubDate. UTC time is used by default. -### func (\*Podcast) [AddSummary](./podcast.go#L254) +### func (\*Podcast) [AddSubTitle](./podcast.go#L259) +``` go +func (p *Podcast) AddSubTitle(subTitle string) +``` +AddSubTitle adds the iTunes subtitle that is displayed with the title +in iTunes. + +Note that this field should be just a few words long according to Apple. +This method will truncate the string to 64 chars if too long with "..." + +### func (\*Podcast) [AddSummary](./podcast.go#L276) ``` go func (p *Podcast) AddSummary(summary string) ``` @@ -458,19 +473,19 @@ Limit: 4000 characters Note that this field is a CDATA encoded field which allows for rich text such as html links: http://www.apple.com">Apple. -### func (\*Podcast) [Bytes](./podcast.go#L265) +### func (\*Podcast) [Bytes](./podcast.go#L290) ``` go func (p *Podcast) Bytes() []byte ``` Bytes returns an encoded []byte slice. -### func (\*Podcast) [Encode](./podcast.go#L270) +### func (\*Podcast) [Encode](./podcast.go#L295) ``` go func (p *Podcast) Encode(w io.Writer) error ``` Encode writes the bytes to the io.Writer stream in RSS 2.0 specification. -### func (\*Podcast) [String](./podcast.go#L281) +### func (\*Podcast) [String](./podcast.go#L306) ``` go func (p *Podcast) String() string ``` diff --git a/doc.go b/doc.go index f5aec2a..3746150 100644 --- a/doc.go +++ b/doc.go @@ -37,6 +37,10 @@ // // Release Notes // +// 1.2.1 +// * added Podcast.AddSubTitle() and truncating to 64 chars. +// * added a number of Guards to protect against empty fields. +// // 1.2.0 // * added Podcast.AddPubDate() and Podcast.AddLastBuildDate() overrides. // * added Item.AddImage() to mask some cumbersome addition of IImage. diff --git a/example_test.go b/example_test.go index c600dcf..cf040e8 100644 --- a/example_test.go +++ b/example_test.go @@ -76,7 +76,7 @@ func Example_httpHandlers() { // eduncan911 Podcasts // http://eduncan911.com/ // An example Podcast - // go podcast v1.2.0 (github.com/eduncan911/podcast) + // go podcast v1.2.1 (github.com/eduncan911/podcast) // en-us // Mon, 06 Feb 2017 08:21:52 +0000 // me@janedoe.com (Jane Doe) @@ -165,7 +165,7 @@ func Example_ioWriter() { // Sample Podcasts // http://example.com/ // An example Podcast - // go podcast v1.2.0 (github.com/eduncan911/podcast) + // go podcast v1.2.1 (github.com/eduncan911/podcast) // en-us // Mon, 06 Feb 2017 08:21:52 +0000 // jane.doe@example.com (Jane Doe) diff --git a/examples_test.go b/examples_test.go index 0991c7e..3dc1f9f 100644 --- a/examples_test.go +++ b/examples_test.go @@ -183,7 +183,7 @@ See more at our website: example.com // eduncan911 Podcasts // http://eduncan911.com/ // An example Podcast - // go podcast v1.2.0 (github.com/eduncan911/podcast) + // go podcast v1.2.1 (github.com/eduncan911/podcast) // en-us // Mon, 06 Feb 2017 08:21:52 +0000 // me@janedoe.com (Jane Doe) diff --git a/podcast.go b/podcast.go index f31516d..8650fee 100644 --- a/podcast.go +++ b/podcast.go @@ -12,7 +12,7 @@ import ( ) const ( - pVersion = "1.2.0" + pVersion = "1.2.1" ) // Podcast represents a podcast.