Movie Info Provider: Added format property
[maevies] / examples / test_tmdb.c
1 /*
2  * test_tmdb.c
3  *
4  * This file is part of maevies
5  * Copyright (C) 2009 Simón Pena <spenap@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  */
18
19 #include <glib.h>
20 #include <stdio.h>
21 #include <unistd.h>
22 #include "tmdb_movie.h"
23
24 gint main(gint argc, gchar **argv) {
25
26         TMDBMovie *movie = NULL;
27         const gchar *title = NULL;
28
29         if (argc != 2) {
30                 title = "Zombieland";
31         } else {
32                 title = argv[1];
33         }
34
35         g_thread_init(NULL);
36         g_type_init();
37
38         movie = tmdb_get_info(title);
39
40         tmdb_movie_print(movie);
41
42         tmdb_movie_unref(movie);
43         return 1;
44 }