TheMovieDatabaseURLFactory

internal struct TheMovieDatabaseURLFactory

Builds URLs for themoviedb.org REST Endpoints

  • api

    Base URL for themoviedb.org REST API

    Declaration

    Swift

    private let api: String
  • Base URL for themoviedb.org movie poster images

    Declaration

    Swift

    private let imagesAPI: String
  • The API key for accessing themoviedb.org RESTAPI

    Declaration

    Swift

    private let apiKey: String
  • Builds a URL for searching for movies with a query

    Declaration

    Swift

    func makeSearchMoviesURL(forQuery searchQuery: String) -> URL?

    Parameters

    searchQuery

    The search query

  • Builds a URL for downloading movie posters at a given path

    Declaration

    Swift

    func makeImageDownloadURL(atPath path: String,
                              size: CGSize,
                              quality: ImageQuality) -> URL?

    Parameters

    path

    The movie poster path

    size

    The size of the poster image being requested

    quality

    The quality of the poster image being requested