edmunds_ruby 0.0.3 → 0.1.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,4 +1,4 @@
1
- module EdmundsImages
1
+ module EdmundsRuby::ImageFinders
2
2
 
3
3
  def get_image(style_id)
4
4
  @url = "photo/service/findphotosbystyleid?styleId=#{style_id}&"
@@ -1,5 +1,4 @@
1
- module EdmundsMakes
2
-
1
+ module EdmundsRuby::MakeFinders
3
2
  # Makes
4
3
  def find_all_makes
5
4
  @url = "/makerepository/findall?"
@@ -1,4 +1,4 @@
1
- module EdmundsModels
1
+ module EdmundsRuby::ModelFinders
2
2
 
3
3
  # models
4
4
  def find_model_by_id(model_id)
@@ -1,4 +1,4 @@
1
- module EdmundsModelYears
1
+ module EdmundsRuby::ModelYearFinders
2
2
 
3
3
  def get_model_years_from_model_id(model_id)
4
4
  @url = "/modelyearrepository/formodelid?modelid=#{model_id}&"
@@ -1,4 +1,4 @@
1
- module EdmundsStyles
1
+ module EdmundsRuby::StyleFinders
2
2
 
3
3
  # styles
4
4
  def get_model_year_styles(model_year_id)
data/lib/edmunds_ruby.rb CHANGED
@@ -1,11 +1,17 @@
1
+ require 'edmunds_ruby/make_finders'
2
+ require 'edmunds_ruby/model_finders'
3
+ require 'edmunds_ruby/model_year_finders'
4
+ require 'edmunds_ruby/style_finders'
5
+ require 'edmunds_ruby/image_finders'
6
+
1
7
  module EdmundsRuby
2
8
 
3
- class EdmundsAPI
4
- include EdmundsMakes
5
- include EdmundsModels
6
- include EdmundsModelYears
7
- include EdmundsStyles
8
- include EdmundsImages
9
+ class API
10
+ include MakeFinders
11
+ include ModelFinders
12
+ include ModelYearFinders
13
+ include StyleFinders
14
+ include ImageFinders
9
15
 
10
16
  # Using this model requires setting your Edmunds API key in your ~/.bashrc file like so:
11
17
  # export EDMUNDS_VEHICLE="your_api_key_here"
@@ -13,7 +19,6 @@ module EdmundsRuby
13
19
  require 'rest_client'
14
20
  require 'crack'
15
21
  require 'crack/json'
16
- require 'pry'
17
22
 
18
23
  attr_reader :data, :image, :images
19
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edmunds_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -66,14 +66,13 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - lib/edmunds_makes.rb
70
- - lib/edmunds_styles.rb
71
69
  - lib/tasks/edmunds_ruby_tasks.rake
72
- - lib/edmunds_images.rb
73
- - lib/edmunds_models.rb
74
- - lib/edmunds_model_years.rb
75
- - lib/edmunds_api.rb
70
+ - lib/edmunds_ruby/image_finders.rb
71
+ - lib/edmunds_ruby/model_year_finders.rb
76
72
  - lib/edmunds_ruby/version.rb
73
+ - lib/edmunds_ruby/make_finders.rb
74
+ - lib/edmunds_ruby/model_finders.rb
75
+ - lib/edmunds_ruby/style_finders.rb
77
76
  - lib/edmunds_ruby.rb
78
77
  - MIT-LICENSE
79
78
  - Rakefile
data/lib/edmunds_api.rb DELETED
@@ -1,3 +0,0 @@
1
-
2
-
3
-