Documentation ¶
Index ¶
- Constants
- Variables
- func GetChunksFromString(startTag string, endTag string, content string) []string
- func GetGenres(movieName string, year *int, proxyUrl string) ([]string, error)
- func GetMovieTitle(movieName string, year *int, proxyUrl string) (string, error)
- func RemoveSpecialChars(raw string) string
- type RTMovieInfo
- type RTSchemaAggregateRating
- type RTSchemaCompany
- type RTSchemaJson
- type RTSchemaPerson
- type RTScore
- type RTScoreDetails
- type RTScoreboard
- type SearchListing
Constants ¶
View Source
const RT_HOST string = "www.rottentomatoes.com"
Variables ¶
View Source
var REQUEST_HEADERS http.Header = http.Header{
"User-Agent": {"Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"},
"Accept-Language": {"en-US"},
"Accept": {"text/html"},
"Referer": {"https://www.google.com"},
}
Functions ¶
func GetChunksFromString ¶
func GetMovieTitle ¶
func RemoveSpecialChars ¶
Types ¶
type RTMovieInfo ¶
type RTMovieInfo struct { AudienceScore RTScore `json:"audienceScore"` Rating string `json:"rating"` TomatometerScore RTScore `json:"tomatometerScore"` Title string `json:"title"` Year int `json:"year"` Runtime string `json:"runtime"` Genres []string `json:"genres"` }
func GetMovieInfo ¶
func GetMovieInfo(movieName string, year *int, proxyUrl string) (*RTMovieInfo, error)
type RTSchemaAggregateRating ¶
type RTSchemaAggregateRating struct { Type string `json:"@type"` BestRating string `json:"bestRating"` Description string `json:"description"` Name string `json:"name"` RatingCount int `json:"ratingCount"` RatingValue string `json:"ratingValue"` ReviewCount int `json:"reviewCount"` WorstRating string `json:"worstRating"` }
type RTSchemaCompany ¶
type RTSchemaJson ¶
type RTSchemaJson struct { Context string `json:"@context"` Type string `json:"@type"` Actors []RTSchemaPerson `json:"actors"` AggregateRating RTSchemaAggregateRating `json:"aggregateRating"` Author []RTSchemaPerson `json:"author"` Character []string `json:"character"` ContentRating string `json:"contentRating"` DateCreated string `json:"dateCreated"` DateModified string `json:"dateModified"` Director []RTSchemaPerson `json:"director"` Genre []string `json:"genre"` Image string `json:"image"` Name string `json:"name"` ProductionCompany RTSchemaCompany `json:"productionCompany"` Url string `json:"url"` }
type RTSchemaPerson ¶
type RTSchemaPerson struct { Name string `json:"name"` Url string `json:"sameAs"` Image string `json:"image"` }
func GetDirectors ¶
type RTScore ¶
type RTScore struct { AverageRating string `json:"averageRating"` BandedRatingCount string `json:"bandedRatingCount"` LikedCount int `json:"likedCount"` NotLikedCount int `json:"notLikedCount"` RatingCount int `json:"ratingCount"` ReviewCount int `json:"reviewCount"` State string `json:"state"` Value int `json:"value"` }
type RTScoreDetails ¶
type RTScoreDetails struct { MediaType string `json:"mediaType"` PrimaryImageUrl string `json:"primaryImageUrl"` Scoreboard RTScoreboard `json:"scoreboard"` }
type RTScoreboard ¶
Click to show internal directories.
Click to hide internal directories.