Class: Obp::Access::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/obp/access/fetcher.rb

Constant Summary collapse

USER_AGENT_PROFILES =
[
  {
    user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) " \
                "AppleWebKit/537.36 (KHTML, like Gecko) " \
                "Chrome/131.0.0.0 Safari/537.36",
    platform: '"macOS"',
    chrome_version: "131",
  },
  {
    user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " \
                "AppleWebKit/537.36 (KHTML, like Gecko) " \
                "Chrome/130.0.0.0 Safari/537.36",
    platform: '"Windows"',
    chrome_version: "130",
  },
  {
    user_agent: "Mozilla/5.0 (X11; Linux x86_64) " \
                "AppleWebKit/537.36 (KHTML, like Gecko) " \
                "Chrome/131.0.0.0 Safari/537.36",
    platform: '"Linux"',
    chrome_version: "131",
  },
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(urn:) ⇒ Fetcher

Returns a new instance of Fetcher.



28
29
30
# File 'lib/obp/access/fetcher.rb', line 28

def initialize(urn:)
  @urn = urn
end

Instance Method Details

#fetch_stateObject



32
33
34
35
# File 'lib/obp/access/fetcher.rb', line 32

def fetch_state
  response = post_ui_request
  parse_state(response)
end