Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

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

Notifications You must be signed in to change notification settings

augustskare/gatsby-source-citybike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
      }
    }
  }
}

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published