Class: RaindropIo::Api
- Inherits:
 - 
      Object
      
        
- Object
 - RaindropIo::Api
 
 
- Defined in:
 - lib/raindrop_io/api.rb
 
Overview
Api configuration Usage: RaindropIo::Api.configure do |config| config.api_token = ENV["RAINDROP_TOKEN"] end
Defined Under Namespace
Classes: Configuration
Class Method Summary collapse
- .configuration ⇒ Object
 - .configure {|configuration| ... } ⇒ Object
 - .delete(path, options = {}) ⇒ Object
 - .get(path, options = {}) ⇒ Object
 - .get_config ⇒ Object
 - .post(path, options = {}) ⇒ Object
 - .put(path, options = {}) ⇒ Object
 
Class Method Details
.configuration ⇒ Object
      48 49 50  | 
    
      # File 'lib/raindrop_io/api.rb', line 48 def configuration @configuration ||= Configuration.new end  | 
  
.configure {|configuration| ... } ⇒ Object
      52 53 54  | 
    
      # File 'lib/raindrop_io/api.rb', line 52 def configure yield(configuration) end  | 
  
.delete(path, options = {}) ⇒ Object
      74 75 76 77 78  | 
    
      # File 'lib/raindrop_io/api.rb', line 74 def delete(path, = {}) resp = HTTP.headers(headers).delete(build_url(path), ) log_response_headers(resp) resp end  | 
  
.get(path, options = {}) ⇒ Object
      56 57 58 59 60  | 
    
      # File 'lib/raindrop_io/api.rb', line 56 def get(path, = {}) resp = HTTP.headers(headers).get(build_url(path), params: ) log_response_headers(resp) resp end  | 
  
.get_config ⇒ Object
      80 81 82  | 
    
      # File 'lib/raindrop_io/api.rb', line 80 def get_config configuration end  | 
  
.post(path, options = {}) ⇒ Object
      68 69 70 71 72  | 
    
      # File 'lib/raindrop_io/api.rb', line 68 def post(path, = {}) resp = HTTP.headers(headers).post(build_url(path), ) log_response_headers(resp) resp end  | 
  
.put(path, options = {}) ⇒ Object
      62 63 64 65 66  | 
    
      # File 'lib/raindrop_io/api.rb', line 62 def put(path, = {}) resp = HTTP.headers(headers).put(build_url(path), ) log_response_headers(resp) resp end  |