Class: IAuditor::Base
- Inherits:
-
Object
- Object
- IAuditor::Base
- Includes:
- BaseModules::Methods
- Defined in:
- lib/iAuditor/base.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from BaseModules::Methods
Class Method Details
.token(username, password, grant_type) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/iAuditor/base.rb', line 23 def self.token(username, password, grant_type) token = HTTParty.post('https://api.safetyculture.io/auth', :body => { "username": username, "password": password, "grant_type":"password" } ).parsed_response["access_token"] token end |
Instance Method Details
#actions ⇒ Object
15 16 17 |
# File 'lib/iAuditor/base.rb', line 15 def actions IAuditor::Actions.new(@options) end |
#audits ⇒ Object
7 8 9 |
# File 'lib/iAuditor/base.rb', line 7 def audits IAuditor::Audit.new(@options) end |