Documentation ¶
Index ¶
- Constants
- Variables
- func ContentToParagraphs(content []Content) []string
- func GetShortNewsURL() (string, error)
- func RegionIdToName(id int) (string, error)
- type Article
- type AspectRation
- type Content
- type ImageData
- type ImageSize
- type ImageSpec
- type ImageVariants
- type News
- type RegionID
- type RegionName
- type Tag
- type Video
- type VideoVariants
Constants ¶
View Source
const ( SMALL ImageSize = iota MEDIUM LARGE SQUARE AspectRation = iota RECT )
Variables ¶
View Source
var ENGLISH_NAMES = map[RegionID]RegionName{ DE: "Germany", BW: "Baden-Württemberg", BY: "Bavaria", BE: "Berlin", BB: "Brandenburg", HB: "Bremen", HH: "Hamburg", HE: "Hessen", MV: "Mecklenburg-Western Pomerania", NI: "Lower Saxony", NW: "North Rhine-Westphalia", RP: "Rhineland-Palatinate", SL: "Saarland", SN: "Saxony", ST: "Saxony-Anhalt", SH: "Schleswig-Holstein", TH: "Thuringia", }
View Source
var GERMAN_NAMES = map[RegionID]RegionName{ DE: "Deutschland", BW: "Baden-Württemberg", BY: "Bayern", BE: "Berlin", BB: "Brandenburg", HB: "Bremen", HH: "Hamburg", HE: "Hessen", MV: "Mecklenburg-Vorpommern", NI: "Niedersachsen", NW: "Nordrhein-Westfalen", RP: "Rheinland-Pfalz", SL: "Saarland", SN: "Sachsen", ST: "Sachsen-Anhalt", SH: "Schleswig-Holstein", TH: "Thüringen", }
Functions ¶
func ContentToParagraphs ¶ added in v0.0.7
func GetShortNewsURL ¶
func RegionIdToName ¶ added in v0.1.3
Types ¶
type Article ¶ added in v0.1.3
type Article struct { Topline string `json:"topline"` Desc string `json:"title"` Introduction string `json:"firstSentence"` Tags []Tag `json:"tags"` Type string `json:"type"` Ressort string `json:"ressort"` RegionID RegionID `json:"regionId"` RegionIDs []RegionID `json:"regionIds"` URL string `json:"shareURL"` Breaking bool `json:"breakingNews"` Date time.Time `json:"date"` ImageData ImageData `json:"teaserImage"` Content []Content `json:"content"` Video Video `json:"video"` ID string `json:"sophoraId"` Thumbnail image.Image }
func (Article) Description ¶ added in v0.1.3
func (Article) FilterValue ¶ added in v0.1.3
type AspectRation ¶ added in v0.1.3
type AspectRation int
type ImageData ¶ added in v0.1.3
type ImageData struct { Title string `json:"alttext"` Type string `json:"type"` ImageVariants ImageVariants `json:"imageVariants"` }
type ImageSpec ¶ added in v0.1.3
type ImageSpec struct { Size ImageSize Ratio AspectRation }
type ImageVariants ¶ added in v0.1.3
type News ¶
func (*News) EnrichWithThumbnails ¶ added in v0.1.3
func (*News) GetArticlesOfRegion ¶ added in v0.1.3
type RegionName ¶ added in v0.1.3
type RegionName string
type Video ¶
type Video struct { Title string `json:"title"` Date time.Time `json:"date"` VideoVariants VideoVariants `json:"streams"` }
type VideoVariants ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.