1.0.3 • Published 5 years ago

gatsby-source-citybike v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

gatsby-source-citybike

A Gatsby source plugin for getting city bike station's from Oslo, Bergen, Trondheim and Edinburgh into your Gatsby application.

Install

yarn add gatsby-source-citybike

or with npm

npm install gatsby-source-citybike

How to use

In your gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-source-citybike',
      options: {
        cities: ['Oslo', 'Bergen'],
      },
    },
  ]
}

Options

cities

Type: array Default: ['oslo']

Available cities: Oslo, Bergen, Trondheim and Edinburgh.

How to query

query {
  allCitybikeStation {
    edges {
      node {
        name
        lat
        lon
        city
        address
        capacity
        station_id
      }
    }
  }
}

Filter stations by city

query {
  allCitybikeStation(filter: { city: { eq: "Oslo" } }) {
    edges {
      node {
        name
        lat
        lon
        address
        capacity
        station_id
      }
    }
  }
}
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago