Foyer API
![MIT License](https://img.shields.io/npm/l/@foyer-inc/api-sdk.svg)
Additional documentation at Docs
Additional details on filter structure available at Sequelize
Listed below is example usage of the Foyer api-sdk
import { OpenAPI, PropertyService } from '@foyer-inc/api-sdk';
OpenAPI.BASE = 'remote api endpoint';
OpenAPI.TOKEN = 'token';
const properties = await PropertyService.getProperties();
PropertyService.getProperties().then((value) => console.log(value));
const filter = {
where: {
BedroomsTotal: 2
BathroomsTotalInteger: {
gt: 2
}
},
attributes: ["ListingKey", "StreetNumber"],
include: [
{ association: "Media" }
],
limit: 10,
offset: 10,
};
const properties = await PropertyService.getProperties(JSON.stringify(filter));
PropertyService.getProperties(undefined, 'card').then((value) =>
console.log(value)
);
RESO
Available Foyer models comply with RESO Spec
See RESO Data Dictionary for a comprehensive look at RESO
See Reference Worksheet for Standard Relationships