Overview
The creator types module contains TypeScript interfaces for movie creators, including actors, directors, and other film industry professionals.
CSFDCreator
The main interface representing a creator’s complete profile.
ČSFD person ID. You can assemble the URL: https://www.csfd.cz/tvurce/${id}
Date of birth (formatted string) or null if unknown
Current age (number) or formatted string (e.g., “deceased at 75”)
films
CSFDCreatorScreening[]
required
Array of films the creator has worked on
CSFDCreatorScreening
Represents a film in a creator’s filmography.
Overall aggregated rating color: ‘bad’, ‘average’, ‘good’, or ‘unknown’
CSFDCreatorScreening is a simplified version of CSFDScreening that omits the url and type properties. It extends Omit<CSFDScreening, 'url' | 'type'>.
Import Example
import type {
CSFDCreator,
CSFDCreatorScreening,
} from 'node-csfd-api';
TypeScript Interface
import { CSFDScreening } from './global';
export interface CSFDCreator {
id: number;
name: string;
birthday: string | null;
birthplace: string;
photo: string;
age: number | string;
bio: string;
films: CSFDCreatorScreening[];
}
export type CSFDCreatorScreening = Omit<CSFDScreening, 'url' | 'type'>;
Usage Example
import { CSFD } from 'node-csfd-api';
const csfd = new CSFD();
// Get creator by ID
const creator = await csfd.creator(2158); // Christopher Nolan
console.log(`Name: ${creator.name}`);
console.log(`Born: ${creator.birthday} in ${creator.birthplace}`);
console.log(`Age: ${creator.age}`);
console.log(`Bio: ${creator.bio}`);
console.log(`Films: ${creator.films.length}`);
// List filmography
creator.films.forEach((film) => {
console.log(`${film.title} (${film.year}) - ${film.colorRating}`);
});
For creator references within movie data, see: