Comments (5)
Hello @testower
This is probably a nice update !
Can you make a PR ?
Are you a GBFS producer or consumer ? I'm not sure to have this kind on feed to correctly test it.
For the update, i would see a new option on auth select on website with 3 inputs (username / password / endpoint ?)
Then something here
gbfs-validator/gbfs-validator/gbfs.js
Lines 61 to 81 in 596378a
from gbfs-validator.
From the point of view of this request I'm a consumer. Yes I'd be happy to make a PR on this.
Yes I think 3 options as you mention makes sense.
However, retrieving the access token in the constructor is a tricky affair since it needs to be an async operation, and constructors can't be async (?). So I think it maybe be better to do it lazily on the first actual request and then save the token for the subsequent requests.
Let me know if that makes sense.
from gbfs-validator.
I need to correct myself: While it is technically possible to make the constructor async / return a promise, it is a bit unorthodox and would possibly feel strange in this case, unless you actually need to use this particular feature.
from gbfs-validator.
Hello, sorry for the late reply.
I agree for the async constructor, it's a bad idea.
At first, i thinking of making the auth roundtrip on the frontend and return the access token to the back.
Or you can add an async function on the validation
function https://github.com/MobilityData/gbfs-validator/blob/master/gbfs-validator/gbfs.js#L262 . Others functions are not write to be called outside of the class.
from gbfs-validator.
Yeah I think on the validation function is the better option. I'll have a PR ready today hopefully 👍
from gbfs-validator.
Related Issues (20)
- Response code 500 on the LINK Knoxville feed HOT 1
- Map may not be displayed when the feed has errors
- Create different error messages HOT 1
- Zoom on visualization only focuses on stations
- Major issue with static-server HOT 7
- Provide conditional local file based input/output parameters for CLI usage similar to the Canonical GTFS Validator HOT 4
- Data sanity rules HOT 2
- Human Friendly Error Messages
- Errors in the manifest file are not displayed
- Authentication is misspelled
- Object dependency relationships validation HOT 3
- Timestamp validation
- Conditional requirements validation
- Totals equal sums validation
- HTTP API with Custom Header HOT 1
- Scrapping from python results of GBFS-validator HOT 1
- Summary hasErrors: false when missing a required file HOT 2
- Missing required files and API results HOT 2
- Vehicle type grouping in the visualization HOT 1
- Support v3.0 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gbfs-validator.