KinopoiskAPI 0.8.2 → 0.9.0

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.
@@ -1,42 +0,0 @@
1
- module KinopoiskAPI
2
- class TodayFilms < Agent
3
- attr_accessor :url
4
-
5
- def initialize
6
- @url = "#{DOMAINS[:api]}/#{METHODS[:get_today_films][:method]}"
7
- @json = json
8
- end
9
-
10
- def all
11
- films.map do |film|
12
- {
13
- id: film['id'],
14
- title: {
15
- :en => film['nameEN'],
16
- :ru => film['nameRU']
17
- },
18
- :premiere => {
19
- :ru => film['premiereRU']
20
- },
21
- poster: "#{DOMAINS[:kinopoisk][:poster][:film]}_#{film['id']}.jpg",
22
- year: film['year'],
23
- rating: film['rating'],
24
- rating_vote_count: film['ratingVoteCount'],
25
- duration: film['filmLength'],
26
- countries: s2a(film['country']),
27
- genres: s2a(film['genre']),
28
- video: film['videoURL'],
29
- is_imax: film['isIMAX'],
30
- is_3d: film['is3D']
31
- }
32
- end
33
- end
34
-
35
- private
36
-
37
- def films
38
- @json['filmsData']
39
- end
40
-
41
- end
42
- end