laravel-exchange-rates | Laravel wrapper package | REST library

 by   ash-jc-allen PHP Version: v7.0.0 License: MIT

kandi X-RAY | laravel-exchange-rates Summary

kandi X-RAY | laravel-exchange-rates Summary

laravel-exchange-rates is a PHP library typically used in Web Services, REST applications. laravel-exchange-rates has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

A simple Laravel package used for interacting with the exchangeratesapi.io API. 'Laravel Exchange Rates' allow you to get the latest or historical exchange rates and convert monetary values between different currencies.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              laravel-exchange-rates has a low active ecosystem.
              It has 339 star(s) with 38 fork(s). There are 8 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 22 have been closed. On average issues are closed in 6 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of laravel-exchange-rates is v7.0.0

            kandi-Quality Quality

              laravel-exchange-rates has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              laravel-exchange-rates is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              laravel-exchange-rates releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              laravel-exchange-rates saves you 677 person hours of effort in developing the same functionality from scratch.
              It has 1569 lines of code, 100 functions and 19 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed laravel-exchange-rates and discovered the below as its top functions. This is intended to give you an instant insight into laravel-exchange-rates implemented functionality, and help decide if they suit your requirements.
            • Get exchange rate .
            • Returns an exchange rate between two dates .
            • Build a cache key .
            • Validate the date .
            • Make a request .
            • Validate currency codes .
            • Register the package rates .
            • Bootstrap the package .
            • Remove a value from the cache .
            • Returns true if the given attribute passes the given value .
            Get all kandi verified functions for this library.

            laravel-exchange-rates Key Features

            No Key Features are available at this moment for laravel-exchange-rates.

            laravel-exchange-rates Examples and Code Snippets

            No Code Snippets are available at this moment for laravel-exchange-rates.

            Community Discussions

            Trending Discussions on laravel-exchange-rates

            QUESTION

            How to cache an api response?
            Asked 2021-Feb-01 at 13:45

            I'm using the api http://exchangeratesapi.io/ to get exchange rates.

            Their site asks:

            Please cache results whenever possible this will allow us to keep the service without any rate limits or api key requirements.

            -source

            Then I found this:

            By default, the responses all of the requests to the exchangeratesapi.io API are cached. This allows for significant performance improvements and reduced bandwidth from your server.

            -somebody's project on github, not sure if accurate

            I've never cached something before and these two statements confuse me. When the API's site says to "please cache the results", it sounds like caching is something I can do in a fetch request, or somehow on the frontend. For example, some way to store the results in local storage or something. But I couldn't find anything about how to do this. I only found resources on how to force a response NOT to cache.

            The second quote makes it sound like caching is something the API does itself on their servers, since they set the response to cache automatically.

            How can I cache the results like the api site asks?

            ...

            ANSWER

            Answered 2021-Feb-01 at 13:45

            To clear your confusion on the conflicting statements you're referencing:

            Caching just means to store the data. Examples of where the data can be stored are in memory, in some persistence layer (like Redis), or in the browser's local storage (like you mentioned). The intent behind caching can be to serve the data faster (compared to getting it from the primary data source) for future requests/fetches, and/or to save on costs for getting the same data repeatedly, among others.

            For your case, the http://exchangeratesapi.io/ API is advising consumers to cache the results on their side (as you mentioned in your question, this can be in the browser's local storage, if you're calling the API front front-end code, or stored in memory or other caching mechanisms/structures on the server-side application code calling the API) to that they can avoid the need to introduce rate limiting.

            The project from Github you're referencing, Laravel Exchange Rates, appears to be a PHP wrapper around the original API - so it's like a middleman between the API and a developer's PHP code. The intent is to make it easier to use the API from within PHP code, and avoid having to make raw HTTP requests to the API and avoid processing the responses; the Laravel Exchange Rates handles that for the developer.

            In regards to the

            By default, the responses all of the requests to the exchangeratesapi.io API are cached

            statement you're asking about, it seems the library follows the advice of the API, and caches the results from the source API.

            So, to sum up:

            1. http://exchangeratesapi.io/ is the source API, and it advises consumers to cache results. If your code is going to be calling this API, you can cache the results in your own code.
            2. The Laravel Exchange Rates PHP library is a wrapper around that source API, and does cache the results from the source API for the user. If you're using this library, you don't need to further cache.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install laravel-exchange-rates

            You can install the package via Composer:.
            PHP 7.2
            Laravel 6

            Support

            Laravel Exchange Rates supports working with the following currencies (sorted in A-Z order):. Note: Please note that the currencies are available because they are exposed in the exchangeratesapi.io API.
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ash-jc-allen/laravel-exchange-rates.git

          • CLI

            gh repo clone ash-jc-allen/laravel-exchange-rates

          • sshUrl

            git@github.com:ash-jc-allen/laravel-exchange-rates.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 ash-jc-allen

            short-url

            by ash-jc-allenPHP

            laravel-executor

            by ash-jc-allenPHP

            favicon-fetcher

            by ash-jc-allenPHP

            laravel-mailboxlayer

            by ash-jc-allenPHP

            laravel-config-validator

            by ash-jc-allenPHP