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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 552d908784c6b6c0ccec017f953ebe1f21e39cba
4
- data.tar.gz: 3edac0d8bfe31f1188442361bb899b2e78b1eb37
3
+ metadata.gz: 67a4c965e3cc8c271992a4d996147cc21ca28bdb
4
+ data.tar.gz: 4c6a254c4ed9a6ab94e515f30040b4b09cfe654b
5
5
  SHA512:
6
- metadata.gz: ce1b4328a493832a9e2aef4b4f9cb49e93514584461dd29f4f55f95304148844533bfaf5dc74cee6c4372c3b7e914bc5f2adc5da70341203eda65220fe79f5fb
7
- data.tar.gz: 7286d583b6dcc86f0838e1f9e86b1b73f723a9257e2d47c3f2d34f68dd146dfa400cda6de88c88edfc1cb1894c087696d8eb12441efa8f8f0acd1be62a880c11
6
+ metadata.gz: 5eb2054e87dc3c890ae6d65af8e8ed0b7eb30753dbdfea24c72f3ac8682a180780601104625f0e36c4c1b73494c59ab3a985346c446fa085e61c8ac58fa346a0
7
+ data.tar.gz: e8922a511e744759451f24e2b8c10e755c2a9a9fb56f5389633634b4741106daa62c4d9c55cccd256e3b269e99ac09183016be2b486cbbdfa078577d095faff8
@@ -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
 
@@ -3,7 +3,7 @@ require "unirest"
3
3
 
4
4
  module FilmLocationsGem
5
5
  class FilmInSf
6
- attr_reader :actor_1, :actor_2, :actor_3, :director, :locations, :production_company, :release_year, :title, :writer
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
@@ -1,3 +1,3 @@
1
1
  module FilmLocationsGem
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.1"
3
3
  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.1.1
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: []