gatsby-source-is24
v1.3.0
Published
A gatsby source plugin to fetch estates from the immobilienscout24 api
Downloads
7
Maintainers
Readme
gatsby-source-is24
This plugin uses the is24 real estate api and fetches all estates for a single user. It does only work with pregenerated oauth credentials. The estates are fetched for the logged in user.
Install
npm install --save gatsby-source-is24
How to use
// In your gatsby-config.js
plugins: [
resolve: `gatsby-source-is24`,
options: {
// required option properties
oauth_consumer_key: 'oauth_consumer_key',
consumer_secret: 'consumer_secret',
oauth_token: 'oauth_token',
oauth_token_secret: 'oauth_token_secret',
// optional option properties
// baseUrl = 'https://rest.immobilienscout24.de/restapi/api/offer/v1.0/user/me/realestate', // The base url to query
// replacer = { substr: '@' }, // replacer object to be used for sanitizing the properties
// mapping, // mapping object to be used for mapping the properties
}
]
How to query
You can query npm nodes like the following
allEstates {
allIs24Estates {
edges {
node {
id
title
}
}
}
}
singleEstate {
is24Estates(id: { eq: "123456" }) {
id
title
}
}
TODO
- write tests
- Roll out for other types