A Swift Package for The Movie Database (TMDb) https://www.themoviedb.org
Add the TMDb package as a dependency to your Package.swift
file, and add it as a dependency to your target.
// swift-tools-version:5.7
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(url: "https://github.com/adamayoung/TMDb.git", upToNextMajor: "9.0.0")
],
targets: [
.target(name: "MyPackage", dependencies: ["TMDb"])
]
)
Create an API key from The Movie Database web site https://www.themoviedb.org/documentation/api.
Get an up to date list of the officially supported movie certifications on TMDb.
Get details about companies.
System wide configuration information.
Discover movies by different types of data like average rating, number of votes, genres and certifications.
Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates.
Get the official genres for Movies and TV Shows on TMDb.
Get information about movies.
Get information about people.
Search for movies, TV shows and people.
Get the daily or weekly trending items. The daily trending list tracks items over the period of a day while items have a 24 hour half life. The weekly list tracks items over a 7 day period, with a 7 day half life.
Get information about TV shows.
Get information about TV show seasons.
Get information about TV show episodes.
Get TMDb watch provider data.
First, create an instance of TMDb with your API key.
let tmdb = TMDbAPI(apiKey: "<tmdb-api-key>")
let movieList = try await tmdb.discover.movies()
let movies = movieList.results
let tvShowList = try await tmdb.trending.tvShows(inTimeWindow: .week, page: 2)
let tvShows = list.results
let personList = try await tmdb.people.popular()
let people = personList.results
The latest documentation for the TMDb APIs is available at https://adamayoung.github.io/TMDb/documentation/tmdb.
This library is licensed under the Apache License 2.0. See LICENSE for details.
link |
Stars: 49 |
Last commit: 6 days ago |
Full Changelog: https://github.com/adamayoung/TMDb/compare/8.1.0...9.0.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics