File tree Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 2020require 'ruby-stackoverflow/client/badges_helper'
2121require 'ruby-stackoverflow/client/comments_helper'
2222require 'ruby-stackoverflow/client/search_helper'
23+ require 'ruby-stackoverflow/client/tag_helper'
2324require 'ruby-stackoverflow/client/parse_options'
2425
2526module RubyStackoverflow
@@ -30,6 +31,7 @@ class Client
3031 include RubyStackoverflow ::Client ::BadgesHelper
3132 include RubyStackoverflow ::Client ::CommentsHelper
3233 include RubyStackoverflow ::Client ::SearchHelper
34+ include RubyStackoverflow ::Client ::TagHelper
3335
3436 attr_accessor :configuration
3537
Original file line number Diff line number Diff line change 11module RubyStackoverflow
22 class Client
33 class Tag < Resource
4- #def initialize(attributes_hash)
5- #Tag.define_atribute_methods(attributes_hash)
6- #end
7-
8- #class << self
9- #def define_atribute_methods(attributes_hash)
10- #attributes_hash.each do|k,v|
11- #define_method(k) do v; end
12- #end
13- #end
14- #end
154 end
165 end
176end
Original file line number Diff line number Diff line change 1+ module RubyStackoverflow
2+ class Client
3+ module TagHelper
4+
5+ def tags ( options = { } )
6+ tags_response ( options )
7+ end
8+
9+ private
10+
11+ def tags_response ( options = { } )
12+ getr 'tags/' , 'tag' , options
13+ end
14+
15+ end
16+ end
17+ end
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
1818 spec . test_files = spec . files . grep ( %r{^(test|spec|features)/} )
1919 spec . require_paths = [ "lib" ]
2020
21- spec . add_runtime_dependency "httparty" , "~> 0.11.0 "
21+ spec . add_runtime_dependency "httparty" , "~> 0.13.3 "
2222 spec . add_runtime_dependency "json"
2323
2424 spec . add_development_dependency "rspec" , "~> 2.1"
You can’t perform that action at this time.
0 commit comments