Download the PHP package justdev/lomnio-api-connector without Composer
On this page you can find all versions of the php package justdev/lomnio-api-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download justdev/lomnio-api-connector
More information about justdev/lomnio-api-connector
Files in justdev/lomnio-api-connector
Package lomnio-api-connector
Short Description Connects WordPress with the Lomnio API.
License GPL-2.0-or-later
Informations about the package lomnio-api-connector
Lomnio API Connector
WordPress plugin for syncing Lomnio data into local database tables and reading it from theme code.
Installation
Recommended project install:
When the plugin is installed from the project Composer file, Composer installs the plugin into wp-content/plugins/lomnio-api-connector through composer/installers. Plugin dependencies are installed by the root project.
Keep woocommerce/action-scheduler in root vendor, not in wp-content/plugins/action-scheduler. Add this exception before the generic type:wordpress-plugin installer path in the root project:
Local plugin development install:
Activate the plugin in WordPress admin:
Admin Pages
Endpoint management page:
This page allows admins to:
- enable or disable endpoints;
- set sync frequency;
- configure which
WP_ENVvalues may send Leads; - run all syncs manually;
- run Project, Units, or Floors sync separately;
- check Status, Message, and Fetched / Used At.
Hidden API token settings page:
The page is available only to users with manage_options. The API token is stored encrypted in wp_options.
You can paste either a raw token or the full header:
After saving a valid token, the plugin queues immediate Project, Units, and Floors sync when the endpoints are active.
Sync
The plugin uses Action Scheduler.
Project action hook:
Units action hook:
Floors action hook:
Default schedules:
- Project: once per day;
- Units: every 10 minutes.
- Floors: every 10 minutes.
Available schedules include 5 minutes, 10 minutes, 30 minutes, hourly, twice daily, and daily.
Leads
Leads are sent through:
The endpoint is managed on the endpoint management page. If Leads is inactive, calls to the sender return a skipped result and do not send, note, or log anything.
Allowed environments are controlled per endpoint. By default, only production sends real API requests. If the current WP_ENV is not allowed, the payload is recorded locally instead of being sent. The All environments option allows real sending from every environment.
Use the global class when you do not want to import a namespace:
When GFAPI exists and entry_id is passed, the plugin writes the request result to the Gravity Forms entry notes. For other forms, the plugin writes to:
The sender returns either a result array or WP_Error.
Stored Data
Project data is stored in:
The table stores ProjectResource without the API data wrapper.
Units data is stored in:
Units sync uses one detailed list request:
The plugin does not call:
Each unit row stores the full UnitDetailResource in payload_json, plus separate columns for filtering and sorting: project_id, identifiers, status, type, layout, orientation, building, floor, phase, areas, pricing, floor plan, and bundle fields.
Legacy unit columns such as list_payload_json, detail_payload_json, list_hash, and detail_hash are not used. If lomnio_units was created by an older plugin version, recreate or migrate the table before running the current sync.
Floors data is stored in:
Floors sync uses:
Each floor row stores the full FloorResource in payload_json, plus separate columns for filtering and sorting: project_id, id, name, number, sort_order, building, availability, unit counts, facade_map_id, and floor_plan_url.
Local table relations:
These are indexed local relation columns, not database-level foreign key constraints.
Theme Usage
Use global Lomnio classes in theme code. Do not instantiate repository classes directly unless you need low-level plugin internals.
Project as object:
Project as array:
Project ID:
Units list:
Units with filters:
Single unit by ID:
Single unit by code:
Units by floor:
Floors list:
Floors with filters:
Single floor by ID:
Single floor by number:
Floors by project:
Available Unit Filters
\LomnioUnits::get() supports these filters:
idproject_idunit_idcodestatusstatus_codestatus_labelstatus_colorstatus_is_systemtypelayout_typeorientationfloorfloor_numberfloor_idfloor_namebuilding_idbuilding_namephase_idphase_nameroom_countareaarea_floorarea_grossarea_buildingarea_landprice_without_vatprice_with_vatdiscount_without_vatdiscount_with_vatdiscounted_price_without_vatdiscounted_price_with_vatprice_per_sqmvat_ratepricing_hiddenpricing_display_textfloor_plan_urlbundle_idbundle_name
Filter values can be scalar values or arrays:
Available Floor Filters
\LomnioFloors::get() supports these filters:
idproject_idfloor_idnamenumberfloor_numbersort_orderbuilding_idbuilding_nameavailabilitystatusunits_countavailable_units_countfacade_map_idfloor_plan_url
Filter values can be scalar values or arrays:
Direct Authorization Header
If plugin code needs the configured authorization header:
The result is either a headers array or WP_Error.