Skip to content

Standalone green-verification queries

GreenVerificationClient remains exported from wfrmls, but WFRMLSClient has no green attribute. Instantiate this compatibility class directly. Source and mocked tests establish its interface; current provider availability, schema, and account permissions have not been verified.

Construct the client and query a page

GreenVerificationClient(bearer_token=None, base_url=None) resolves an explicit token or WFRMLS_BEARER_TOKEN immediately. Missing credentials raise AuthenticationError. See BaseClient for the default service root, sessions, and error handling.

get_green_verifications(top=None, skip=None, filter_query=None, select=None, orderby=None, expand=None, count=None) requests one PropertyGreenVerification collection page.

Parameter Type Default Request behavior
top int \| None None $top; values above 200 are clamped
skip int \| None None $skip, unchanged
filter_query str \| None None Raw $filter
select list[str] \| str \| None None $select; lists are joined with commas
orderby str \| None None Raw $orderby
expand list[str] \| str \| None None $expand; lists are joined with commas
count bool \| None None Lowercase $count value

None omits a parameter. The result is handled provider JSON, commonly a dictionary with value. The method does not paginate or validate field names, filter syntax, or positive pagination values.

This complete example validates the property filter with a fake token and a mock:

from unittest.mock import patch
from wfrmls import GreenVerificationClient

with patch.object(GreenVerificationClient, "get", return_value={"value": []}) as request:
    green = GreenVerificationClient(bearer_token="example-token")
    response = green.get_verifications_for_property("12345", top=5)
    assert response == {"value": []}
    request.assert_called_once_with(
        "PropertyGreenVerification",
        params={"$top": 5, "$filter": "ListingKey eq '12345'"},
    )

Key and property lookup behavior

get_green_verification(verification_key: str) requests PropertyGreenVerification('<key>'). It returns handled provider JSON without unwrapping a value array or applying the property client's single-record normalization.

get_verifications_for_property(listing_key: str, **kwargs) adds ListingKey eq '<key>'. An existing filter_query is joined using and, without extra parentheses. Other keyword arguments must match get_green_verifications(); arbitrary OData keywords are not accepted.

Keys and filter strings are inserted without escaping. Escape apostrophes in OData literals yourself and verify actual fields through your account's metadata.

Verification-type constants

GreenVerificationType contains ENERGY_STAR (Energy Star), LEED, GREEN_BUILDING (Green Building), HERS, and OTHER (Other). These are package constants, not a freshly verified provider enumeration. Use .value when constructing a text filter.

The client does not validate a certification, interpret a rating, or verify that a listing holds a current credential. It only constructs the requests above and handles the response.

See compatibility clients, provider verification, and response conventions.

Generated signatures and constants

PropertyGreenVerification client for WFRMLS API.

Classes

GreenVerificationClient

GreenVerificationClient(
    bearer_token: Optional[str] = None, base_url: Optional[str] = None
)

Bases: BaseClient

Standalone compatibility interface for PropertyGreenVerification requests.

WFRMLSClient has no green attribute. Exported methods and mocked tests do not establish current provider availability or access permissions.

Parameters:

Name Type Description Default
bearer_token Optional[str]

Explicit token, or None to use WFRMLS_BEARER_TOKEN.

None
base_url Optional[str]

OData service root, or None for the package default.

None

Raises:

Type Description
AuthenticationError

If neither an explicit nor environment token exists.

Methods:

get_green_verification
get_green_verification(verification_key: str) -> Dict[str, Any]

Request PropertyGreenVerification('') without normalization.

Parameters:

Name Type Description Default
verification_key str

String inserted without escaping into a quoted key URL.

required

Returns:

Type Description
Dict[str, Any]

Handled provider JSON.

get_green_verifications
get_green_verifications(
    top: Optional[int] = None,
    skip: Optional[int] = None,
    filter_query: Optional[str] = None,
    select: Optional[Union[List[str], str]] = None,
    orderby: Optional[str] = None,
    expand: Optional[Union[List[str], str]] = None,
    count: Optional[bool] = None,
) -> Dict[str, Any]

Request one PropertyGreenVerification page with named OData parameters.

Parameters:

Name Type Description Default
top Optional[int]

Optional $top; values above 200 are clamped to 200.

None
skip Optional[int]

Optional $skip offset, passed unchanged.

None
filter_query Optional[str]

Optional raw $filter expression.

None
select Optional[Union[List[str], str]]

Optional field list or comma-separated $select string.

None
orderby Optional[str]

Optional raw $orderby expression.

None
expand Optional[Union[List[str], str]]

Optional relationship list or comma-separated $expand string.

None
count Optional[bool]

Optional $count, converted to lowercase true or false.

None

Returns:

Type Description
Dict[str, Any]

Parsed JSON dictionary from one request, commonly containing value.

Dict[str, Any]

Counts, next links, and individual fields are server-provided and optional.

Raises:

Type Description
WFRMLSError

For shared HTTP or transport failures.

get_verifications_for_property
get_verifications_for_property(
    listing_key: str, **kwargs: Any
) -> Dict[str, Any]

Filter green-verification records by quoted ListingKey.

Parameters:

Name Type Description Default
listing_key str

Text inserted without escaping into a quoted literal.

required
**kwargs Any

Collection parameters, including optional filter_query.

{}

Returns:

Type Description
Dict[str, Any]

Provider collection JSON; an existing filter is joined with and.

GreenVerificationType

Bases: Enum

Green verification type options.