transition-zero / tz-client

A client repository for accessing FEO data programmatically.
https://docs.feo.transitionzero.org
Apache License 2.0
21 stars 4 forks source link

refactor: :recycle: Add from_id classmethod to Asset and Node classes #49

Closed joconnor-ecaa closed 9 months ago

joconnor-ecaa commented 9 months ago

Description

Remove API calls from init methods in Node and Asset classes and move into from_id classmethod. Trying to make init able to construct both directly from data as well as from partial data + API call was leading to unnecessary complexity. We now leave the init class for directly instantiating via the inherited schema init and explicity call from_id or search to retrieve from the API.

Checklist

joconnor-ecaa commented 9 months ago

Waiting for PR #28 to be merged to update node tests

Lkruitwagen commented 9 months ago

fix from_id when #28 done