film_locations_gem 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/film_locations_gem.gemspec +1 -1
- data/lib/film_locations_gem.rb +18 -1
- data/lib/film_locations_gem/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67a4c965e3cc8c271992a4d996147cc21ca28bdb
|
4
|
+
data.tar.gz: 4c6a254c4ed9a6ab94e515f30040b4b09cfe654b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eb2054e87dc3c890ae6d65af8e8ed0b7eb30753dbdfea24c72f3ac8682a180780601104625f0e36c4c1b73494c59ab3a985346c446fa085e61c8ac58fa346a0
|
7
|
+
data.tar.gz: e8922a511e744759451f24e2b8c10e755c2a9a9fb56f5389633634b4741106daa62c4d9c55cccd256e3b269e99ac09183016be2b486cbbdfa078577d095faff8
|
data/film_locations_gem.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["dreafable@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Show film locations in SF}
|
13
|
-
spec.description = %q{Pulls API data}
|
13
|
+
spec.description = %q{Pulls API data from sfdata.gov}
|
14
14
|
spec.homepage = "https://github.com/andrealiz/film_locations_gem"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/lib/film_locations_gem.rb
CHANGED
@@ -3,7 +3,7 @@ require "unirest"
|
|
3
3
|
|
4
4
|
module FilmLocationsGem
|
5
5
|
class FilmInSf
|
6
|
-
|
6
|
+
attr_accessor :actor_1, :actor_2, :actor_3, :director, :locations, :production_company, :release_year, :title, :writer
|
7
7
|
|
8
8
|
def initialize(hash)
|
9
9
|
@actor_1 = hash['actor_1']
|
@@ -24,6 +24,23 @@ module FilmLocationsGem
|
|
24
24
|
# film_locations << film_location
|
25
25
|
# end
|
26
26
|
# film_locations_array
|
27
|
+
create(film_locations_array)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.find(search_term)
|
31
|
+
film_locations_array = Unirest.get("https://data.sfgov.org/resource/wwmu-gmzc.json?$q=#{search_term}").body
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.create(film_locations_array)
|
35
|
+
film_locations = []
|
36
|
+
film_locations_array.each do |film_location|
|
37
|
+
film_locations << FilmLocation.new(film_location)
|
38
|
+
end
|
39
|
+
return film_locations
|
40
|
+
end
|
41
|
+
|
42
|
+
def destroy
|
43
|
+
Unirest.delete("https://data.sfgov.org/resource/wwmu-gmzc.json").body
|
27
44
|
end
|
28
45
|
|
29
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: film_locations_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrealiz Afable
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.1'
|
69
|
-
description: Pulls API data
|
69
|
+
description: Pulls API data from sfdata.gov
|
70
70
|
email:
|
71
71
|
- dreafable@gmail.com
|
72
72
|
executables: []
|