palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Use Authentication API instead of scraping the SessionID #47

Closed palazzem closed 4 years ago

palazzem commented 4 years ago

Overview

Follow-up of #44

This PR introduces the Authentication API instead of using a form and parsing the SessionID from the web page. Introduced changes are:

codecov-io commented 4 years ago

Codecov Report

Merging #47 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #47   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     10           
  Lines         240    217   -23     
=====================================
- Hits          240    217   -23
Impacted Files Coverage Δ
elmo/utils/parser.py 100% <ø> (ø) :arrow_up:
elmo/api/client.py 100% <100%> (ø) :arrow_up:
elmo/api/router.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f8d9498...c6c5334. Read the comment docs.

palazzem commented 4 years ago

This change breaks the Input/Areas endpoints because the client._session doesn't have cookies anymore. Before releasing this change we should include entirely the /api/strings endpoint.