Class: Qiita::Client
- Inherits:
-
Object
- Object
- Qiita::Client
- Defined in:
- lib/qiita/client.rb,
lib/qiita/client/tags.rb,
lib/qiita/client/items.rb,
lib/qiita/client/users.rb
Defined Under Namespace
Constant Summary collapse
- ROOT_URL =
'https://qiita.com/'
- OPTIONS_KEYS =
[:url_name, :password, :token].freeze
Instance Method Summary collapse
-
#initialize(args) ⇒ Client
constructor
A new instance of Client.
- #rate_limit(params = {}) ⇒ Object
Methods included from Users
#user, #user_following_tags, #user_following_users, #user_items, #user_stocks
Methods included from Tags
Methods included from Items
#delete_item, #item, #post_item, #search_items, #stock_item, #unstock_item, #update_item
Constructor Details
#initialize(args) ⇒ Client
Returns a new instance of Client.
18 19 20 21 22 23 24 25 |
# File 'lib/qiita/client.rb', line 18 def initialize(args) OPTIONS_KEYS.each do |key| send("#{key}=", args[key]) end if token.nil? && url_name && password login end end |
Instance Method Details
#rate_limit(params = {}) ⇒ Object
27 28 29 |
# File 'lib/qiita/client.rb', line 27 def rate_limit params={} get '/rate_limit', params end |