Class: QiitaScouter::QiitaUserJsonLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/qiita_user_json_loader.rb

Overview

QiitaScouter::QiitaUserJsonLoader

Constant Summary collapse

QIITA_URL =
'https://qiita.com/api/v2/users/%s'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#target_userObject (readonly)

Returns the value of attribute target_user.



9
10
11
# File 'lib/qiita_user_json_loader.rb', line 9

def target_user
  @target_user
end

#userObject (readonly)

Returns the value of attribute user.



9
10
11
# File 'lib/qiita_user_json_loader.rb', line 9

def user
  @user
end

Instance Method Details

#load(target_user) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/qiita_user_json_loader.rb', line 12

def load(target_user)
  @target_user = target_user
  tmp_verbose = $VERBOSE
  $VERBOSE = nil
  OpenSSL::SSL.const_set('VERIFY_PEER', OpenSSL::SSL::VERIFY_NONE)
  $VERBOSE = tmp_verbose
  load_page
end