Module: RdInsightly::ApiInsightly
- Defined in:
- lib/rd_insightly/insightly/api_insightly.rb
Constant Summary collapse
- AUTHORIZED =
true- UNAUTHORIZED =
false
Class Method Summary collapse
Class Method Details
.authentication ⇒ Object
6 7 8 9 10 11 |
# File 'lib/rd_insightly/insightly/api_insightly.rb', line 6 def self.authentication RestClient.get('https://api.insight.ly/v2.1/contacts', Authorization: ) AUTHORIZED rescue UNAUTHORIZED end |
.authorization_string ⇒ Object
19 20 21 |
# File 'lib/rd_insightly/insightly/api_insightly.rb', line 19 def self. "Basic #{Base64.encode64(RdInsightly.api_token)}" end |
.leads ⇒ Object
13 14 15 16 17 |
# File 'lib/rd_insightly/insightly/api_insightly.rb', line 13 def self.leads RestClient.get('https://api.insight.ly/v2.1/contacts', Authorization: ) rescue nil end |