Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-source-is24

Build Status npm Code Style semantic-release

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
© 2024 Gatsby, Inc.