Macaw-Movies/Development/3rd party API

From KDE Community Wiki
Revision as of 12:53, 23 April 2015 by Ochurlaud (talk | contribs)

3rd party API

Description

This part of the code is used to get the metadata of the movies over Internet. Currently we only work with the public API of The Movie Database (TMDb).

Source location

Everything that concerns requesting the TMDb API is in the folder src/FetchMetadata. If we begin to have more API, we should create a Namespace for this and a src/Modules folder, but it would be currently a little overkilled.

How does it work

Global workflow

The class Application owns a FetchMetadata object and asks it to get the metadata of some movies.

FetchMetadata

FetchMetadata take care of all the intelligence behind the queries, without knowing the detail of the queries. It only deals with Movies objects.

During its construction

Whenever the user has to help for a choice (if the query returns more than one possibility) a FetchMetadataDialog will be constructed and showed to the user.