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

Make client.query() a public API #50

Closed palazzem closed 4 years ago

palazzem commented 4 years ago

Overview

This PR makes the client._query() a public API. Now it's possible to query individual parts of the system as follows:

from elmo import query

sectors_armed, sectors_disarmed = client.query(query.SECTORS)
inputs_alerted, inputs_wait = client.query(query.INPUTS)

Client check() method is now considered a shortcut that returns a dict for the entire status of the system.

codecov-io commented 4 years ago

Codecov Report

Merging #50 into master will not change coverage by %. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #50   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          242       242           
=========================================
  Hits           242       242           
Impacted Files Coverage Δ
elmo/api/client.py 100.00% <100.00%> (ø)

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 54b3c94...a2bfc1f. Read the comment docs.