Note: There is a newer version (1.5.1) of this package available. Click here to view docs for the latest version.
Module themoviedb
ballerinax/themoviedb Ballerina library
1.2.0
Overview
This is a generated connector for The Movie Database (TMDB) API v3 OpenAPI specification.
The Movie Database (TMDB) API provide data about movies and tv shows around the world.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create TMDB Account
- Obtaining tokens
- Log into TMDB Account
- Click the
Settings - Click the
APItab in the left sidebar - Click
Createorclick hereon the API page
Quickstart
Step 1: Import connector
Import the ballerinax/themoviedb module into the Ballerina project.
import ballerinax/themoviedb;
Step 2: Create a new connector instance
themoviedb:ApiKeysConfig config = { apiKey : "<your appid>" } themoviedb:Client myclient = check new themoviedb:Client(config);
Step 3: Invoke connector operation
- You can get list of upcoming movies as follows with
getUpcomingMoviesmethod. Successful creation returns the createdGetUpcomingMoviesResponseand the error cases returns anerrorobject.themoviedb:GetUpcomingMoviesResponse result = check myclient->getUpcomingMovies(); - Use
bal runcommand to compile and run the Ballerina program.