Macaw-Movies/Development/3rd party API: Difference between revisions
No edit summary |
|||
Line 6: | Line 6: | ||
== Source location == | == Source location == | ||
Everything that concerns requesting the TMDb API is in the folder {{Path|1=src/FetchMetadata}}. If we begin to have more API, we should create a Namespace for this and a {{Path|1=src/Modules}} folder, but it would be currently a little overkilled. | Everything that concerns requesting the TMDb API is in the folder {{Path|1=src/FetchMetadata}}. If we begin to have more API, we should create a Namespace for this and a {{Path|1=src/Modules}} folder, but it would be currently a little overkilled. | ||
== How does it work == | |||
=== Global workflow === | |||
The class <code>Application</code> owns a <code>FetchMetadata</code> object and asks it to get the metadata of some movies. | |||
==== FetchMetadata ==== | |||
<code>FetchMetadata</code> take care of all the intelligence behind the queries, without knowing the detail of the queries. It only deals with <code>Movies</code> objects. | |||
During its construction | |||
Whenever the user has to help for a choice (if the query returns more than one possibility) a <code>FetchMetadataDialog</code> will be constructed and showed to the user. |
Revision as of 12:53, 23 April 2015
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.