hafas-client | JavaScript client for HAFAS public transport APIs | REST library

 by   public-transport JavaScript Version: 6.2.2 License: ISC

kandi X-RAY | hafas-client Summary

kandi X-RAY | hafas-client Summary

hafas-client is a JavaScript library typically used in Web Services, REST applications. hafas-client has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i hafas-client' or download it from GitHub, npm.

JavaScript client for HAFAS public transport APIs.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              hafas-client has a low active ecosystem.
              It has 209 star(s) with 43 fork(s). There are 12 watchers for this library.
              There were 3 major release(s) in the last 12 months.
              There are 41 open issues and 111 have been closed. On average issues are closed in 341 days. There are 7 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of hafas-client is 6.2.2

            kandi-Quality Quality

              hafas-client has 0 bugs and 0 code smells.

            kandi-Security Security

              hafas-client has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              hafas-client code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              hafas-client is licensed under the ISC License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              hafas-client releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hafas-client
            Get all kandi verified functions for this library.

            hafas-client Key Features

            No Key Features are available at this moment for hafas-client.

            hafas-client Examples and Code Snippets

            hafas-rest-api,Usage
            JavaScriptdot img1Lines of Code : 18dot img1License : Permissive (ISC)
            copy iconCopy
            const createHafas = require('hafas-client')
            const dbProfile = require('hafas-client/p/db')
            
            const createApi = require('.')
            
            const config = {
            	hostname: 'example.org',
            	name: 'my-hafas-rest-api',
            	homepage: 'https://github.com/someone/my-hafas-rest-ap  

            Community Discussions

            QUESTION

            React native different behaviour between debug mode and normal mode
            Asked 2018-Sep-12 at 13:02

            hi I have a really complicated problem. So I created a new repo for this problem at github. So you can clone it and see what the problem is.

            https://github.com/guitar9/hafas-client-example

            I am using https://github.com/public-transport/hafas-client in this project to get train and railway station informations.

            ...

            ANSWER

            Answered 2018-Sep-12 at 13:02

            The problem is the usage of the Luxon library within hafas-client library. You will see that your code provided in the repo runs fine on iOS and on android only with remote debugging enabled. Why?

            When remote debugging is enabled the code does not run in your phone but in the V8 engine of your chrome browser. When the remote debugging is disabled, code runs on your phone, where in case of android, it runs on a JavaScriptCore (JSC) engine from late 2014 that was compiled with custom setup for react native - that can, potentially, deliver different results.

            As the luxon docs point out, support for react native on android is limited.

            On iOS, react native uses the JSC available from the OS, which also includes intl features. The reason JSC on android does not have int support is that JSC is bundled together with the apk, and compiling it with intl support would increase the apk size by several MB.

            With a bit of cutomizations (forking the hafas client) and working around the date problems, I believe you should be able to fix this. You may also use this but beware that you may run into other sorts of issues that may be hard to get help with (for a while, the Expo client used to use the JSC compiled from this repo but they had to stop using the custom build because of some problems).

            Alternatively, you may try using intl polyfill

            How did I find out? here you'll see that the error object contains a bunch of extra information. When you were logging the error, you were just getting the description field, but if you log the request field, you'll see that it contains "outDate": "Invalid DateTime". There it is!

            Source https://stackoverflow.com/questions/50861731

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hafas-client

            You can install using 'npm i hafas-client' or download it from GitHub, npm.

            Support

            hafas-client has built-in support for many public transportation networks.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i hafas-client

          • CLONE
          • HTTPS

            https://github.com/public-transport/hafas-client.git

          • CLI

            gh repo clone public-transport/hafas-client

          • sshUrl

            git@github.com:public-transport/hafas-client.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by public-transport

            db-hafas

            by public-transportJavaScript

            gtfs-via-postgres

            by public-transportJavaScript

            vbb-hafas

            by public-transportJavaScript

            transport.rest

            by public-transportJavaScript

            gtfs-utils

            by public-transportJavaScript