Class: Qiita::Client

Inherits:
Object
  • Object
show all
Includes:
Items, Tags, Users
Defined in:
lib/qiita/client.rb,
lib/qiita/client/tags.rb,
lib/qiita/client/items.rb,
lib/qiita/client/users.rb

Defined Under Namespace

Modules: Items, Tags, Users

Constant Summary collapse

ROOT_URL =
'https://qiita.com/'
OPTIONS_KEYS =
[:url_name, :password, :token].freeze

Instance Method Summary collapse

Methods included from Users

#user, #user_following_tags, #user_following_users, #user_items, #user_stocks

Methods included from Tags

#tag_items, #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
    
  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