module Efatura

Constants

VERSION

Public Class Methods

configuration() click to toggle source

EFATURA SCRAPER GEM. IT USES MECHANIZE TO SIMULATE A LOGIN TO EFATURA WEBSITE IT THEN REDIRECTS TO CONSUMIDOR PAGE IN ORDER TO FETCH THE NECESSARY COOKIES TO BUILD A REST-CLIENT REQUEST WITH COOKIES AS HEADERS EFATURA WEBSITE IS POPULATED WITH AJAX REQUESTS SO THE GOAL IS FETCH THE SAME JSONS THEY USE TO FEED DATA TO THE WEBSITE

# File lib/efatura.rb, line 16
def self.configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source
# File lib/efatura.rb, line 24
def self.configure
  yield(configuration)
end
invoices(from_date, to_date) click to toggle source
# File lib/efatura.rb, line 28
def self.invoices(from_date, to_date)
  client = Client.new(from_date, to_date)
  Client.new(from_date, to_date).invoices if client.date_valid?(from_date, to_date)
end
reset() click to toggle source
# File lib/efatura.rb, line 20
def self.reset
  @configuration = Configuration.new
end