Giter Club home page Giter Club logo

chargemap-graphql-api's Introduction

Chargemap GraphQl API

Server URL-secured: https://tamanji.jelastic.metropolia.fi/graphql (please refresh the page if the response is 502)

Mutations:

  • addStation

     addStation- Use Query Variables: {"Location": {"coordinates": [60.2040745,24.6657767]},"Connections":[{"Quantity":3,"ConnectionTypeID":"5e39eecac5598269fdad81a1","LevelID":"5e39edf7bb7ae768f05cf2bd","CurrentTypeID":"5e39ef4a6921476aaf62404a"}],"Postcode":"02720","Title":"Entresse","AddressLine1":"Siltakatu 11","StateOrProvince":"Uusimaa","Town":"Espoo"}
    
      mutation AddStation($Location: PointInput!, $Connections: [ConnectionInput]!, $Postcode: String! $Title: String!, $AddressLine1: String!, $StateOrProvince: String!, $Town: String!) {
        addStation( 
             Location: $Location,
             Connections: $Connections,
             Postcode: $Postcode,
             Title: $Title,
             AddressLine1: $AddressLine1,
             StateOrProvince: $StateOrProvince,
             Town: $Town,
          )
             {
             Title
             AddressLine1
             Town
             Connections {
                 Quantity
                 CurrentTypeID {
                     Title
                     Description
                 }
                 ConnectionTypeID {
                     Title
                     FormalName
                 }
                 LevelID {
                     Title
                     IsFastChargeCapable
                 }
             }
         }
     }
    
  • modifyStation

      modifyStation - Use Query Variables: {"id":"606f1218b01f16791748b52f","Connections":[{"id": "5e590b0b7536c009841db37a","Quantity":5,"ConnectionTypeID":"5e39eecac5598269fdad81a1","LevelID":"5e39edf7bb7ae768f05cf2bd","CurrentTypeID":"5e39ef4a6921476aaf62404a"}],"Postcode":"02770","Title":"K-Market","AddressLine1":"Espoontori","StateOrProvince":"Uusimaa","Town":"Espoo"}
    
       mutation ModifyStation($id: ID!, $Connections: [ConnectionInput]!, $Postcode: String! $Title: String!, $AddressLine1: String!, $StateOrProvince: String!, $Town: String!) {
         modifyStation( 
              id: $id,
              Connections: $Connections,
              Postcode: $Postcode,
              Title: $Title,
              AddressLine1: $AddressLine1,
              StateOrProvince: $StateOrProvince,
              Town: $Town,
           )
              {
              Title
              AddressLine1
              Town
              id
          }
      }
    
  • deleteStation

      deleteStation - Use ids: "606f1adfb01f16791748b533", "606f1b1eb01f16791748b537"
       
      mutation {
      deleteStation(id: "606f1a81b01f16791748b531"){
         id
        }
      }
    

Query:

  • stations

     stations {
             Title
             Town
             AddressLine1
             Location {
             type
             coordinates
             }
             Connections {
             Quantity
             ConnectionTypeID {
                 Title
             }
             CurrentTypeID {
                 Title
             }
             LevelID {
                 Title
                 Comments
                 IsFastChargeCapable
             }
             }
         }
     }
     
    
     # filtering by geo polygon/ boundaries 
    
         {
     stations(bounds: {_southWest: {lat: 60.0918986743294, lng: 24.60319519042969}, _northEast: {lat: 60.38196898834704, lng: 24.94033813476563}}, limit:5) {
         Title
         Town
         AddressLine1
         Location {
         type
         coordinates
         }
         Connections {
         Quantity
         ConnectionTypeID {
             Title
         }
         CurrentTypeID {
             Title
         }
         LevelID {
             Title
             Comments
             IsFastChargeCapable
         }
         }
     }
     }
     
      # query station with start and limit parameters
    
         {
         stations(start: 20, limit: 2) {
             Title
             Town
             AddressLine1
             Location {
             type
             coordinates
             }
             Connections {
             Quantity
             ConnectionTypeID {
                 Title
             }
             CurrentTypeID {
                 Title
             }
             LevelID {
                 Title
                 Comments
                 IsFastChargeCapable
             }
             }
         }
     }
    
     # query station by id, use id:  "5e590b0b7536c009841db37c" 
    
         {
         station(stationID: "5e590b0b7536c009841db37c") {
             Title
             Town
             AddressLine1
             Location {
             type
             coordinates
             }
             Connections {
             Quantity
             ConnectionTypeID {
                 Title
             }
             CurrentTypeID {
                 Title
             }
             LevelID {
                 Title
                 Comments
                 IsFastChargeCapable
             }
             }
         }
     }
    

chargemap-graphql-api's People

Contributors

ambeche avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.