movies_client 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NWU4Yzc0YWEzODM4NjIxM2I1YWJkYzAyMGFkY2QwZTU1M2QwZDA0NA==
4
+ Y2U4YTZjYTk0YzgzMDllNmUxMWExYzU4ZDE3ZTZkZjM4ZDk5ZTNlZg==
5
5
  data.tar.gz: !binary |-
6
- MWJlNTI3NDVlM2QzYjQ3MDEyMGMwZjVjZTkxMmMxYmYxOTc5OWUzNw==
6
+ MzEyMGZmYjMzZGM5MjY2ZGYxYmE2NDI0Y2M1YmEyYTMwYjIwMWJmNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2M5ZGE4ZmI4YWNhYTZlNGM4MzA5N2MxZTcwN2FkMjE3ZDAyOWQwMDZjYjBh
10
- MzVhMjY5MzVhY2ZjNjJkZGE4YWJmYmE2ZDY5N2YzNjQ3OTNmODJlMTZiM2Mx
11
- MjA1NjU4NzE5NTA2YTUwMDQ2ZDVhMGE3NWM5MjBiNmJhNmNlMmQ=
9
+ N2EzOWE0YjcxOWFkNWE1Y2U1NmI2ZjA3ZmFlMmJiZWY5NzNmYjZlZThkMzI5
10
+ Zjc0MGE1YTZmNGFhMmQzNjVmOWQ4ZTIzZmY2NGQ0ZTAxYmI0MGUxNjIxYjhl
11
+ ZjM4ODQyMzI5NTQxNGIwNmM2MGJlOTVkZmEwMzRhYjI0NzE3ODA=
12
12
  data.tar.gz: !binary |-
13
- ZDg5N2ZmOTcyNDg0ZTQwYWZkYWEwNWE0MGIzZjhlYjljNzAxNGRmMWVhNmRh
14
- YmFjMmNjN2RjNDI2NjcyYjcwMDZmY2I5MjAyODFhMzY4MmU3Yzk2N2ZjODU1
15
- ZmZhZDc1NDc5MjNmMTgyYTQ2MzM1ZTNhZjQ0OTUzYzEyYWFmZDk=
13
+ MWZiMDMzZTZiZWRmOTdkMTYzNzAxZmViOTAxODdiMTYzNDU3OTEwYzkyYzM5
14
+ ZDUzNjk5Y2RiOTUzNjhlYTMyYmM4N2MwMGMxMWIwYzU3NzJiY2ViMjdjNjUx
15
+ MmM1M2UzOTEwMTI3NjFhNzU3OTVhYjk4YzZiOWZhMTEzNTYzYjc=
@@ -68,4 +68,12 @@ class MoviesObject
68
68
  @result[movie.to_s][:synopsis]
69
69
  end
70
70
 
71
+ def casting(movie)
72
+ @result[movie.to_s][:casting]
73
+ end
74
+
75
+ def genre(movie)
76
+ @result[movie.to_s][:genre]
77
+ end
78
+
71
79
  end
@@ -1,3 +1,3 @@
1
1
  module MoviesClient
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/movies_client.rb CHANGED
@@ -313,6 +313,7 @@ module MoviesClient
313
313
  Tmdb::Api.key(@config[:key])
314
314
  Tmdb::Api.language("fr")
315
315
  @casts = Tmdb::Movie.casts(id)
316
+ @credits = Tmdb::Movie.credits(id)
316
317
  @casting = {}
317
318
  actor = {}
318
319
  i = 0
@@ -344,6 +345,8 @@ module MoviesClient
344
345
  result[:title] = movie.title
345
346
  result[:title_list] = k
346
347
  result[:synopsis] = movie.overview
348
+ result[:tagline] = movie.tagline
349
+ puts movie.tagline
347
350
  unless movie.genres.nil?
348
351
  result[:genre] = movie.genres.collect { |g| g[:name] }
349
352
  end
@@ -25,5 +25,7 @@ class MovieObjectTest < Test::Unit::TestCase
25
25
  assert_equal 'SOUS LES JUPES DES FILLES' , @cinema_object.title_list(@cinema_object.film1(5))
26
26
  assert_equal "Paris. 28 premiers jours du printemps. 11 femmes.\r M\u00E8res de famille, femmes d'affaires, copines, ma\u00EEtresses ou \u00E9pouses...\r Toutes repr\u00E9sentent une facette de la femme d'aujourd'hui : Complexes, joyeuses, complex\u00E9es, explosives, insolentes, surprenantes... Bref, un \u00EAtre paradoxal, totalement d\u00E9boussol\u00E9, d\u00E9finitivement vivant, FEMMES tout simplement !" , @cinema_object.overview(@cinema_object.film1(5))
27
27
  assert_equal 'http://image.tmdb.org/t/p/w500//qtdx6rnatFNT3xSXcQzGzRAX24H.jpg' , @cinema_object.poster(@cinema_object.film1(5))
28
+ assert_equal 'Sous les jupes des filles' , @cinema_object.casting(@cinema_object.film1(5))
29
+ assert_equal 'Sous les jupes des filles' , @cinema_object.genre(@cinema_object.film1(5))
28
30
  end
29
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: movies_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeanbaptistevilain
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-11 00:00:00.000000000 Z
12
+ date: 2014-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler