![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
fixer-io-utility
Advanced tools
git clone https://github.com/kenigbolo/fixer-io-utility.git
or use ssh git clone git@github.com:kenigbolo/fixer-io-utility.git
.This is a tiny module that allows making requests to the fixer.io api. The npm package exposes a tiny utility class called FixerIO. The utility class can be used to leverage making requests to the the fixer.io api. This utility will be occasionaly maintained to keep up with the happenings to endpoints on fixer.io
This package has been published on NPM and is freely available according to the MIT license. To install via npm simply run npm install fixer-io-utility
.
const FixerIO = require('fixer-io-utility');
const fixerUtility = new FixerIO('put-your-api-key-here');
fixerUtility.request('latest').then((response) => {
console.log(response);
});
The utility returns a resolved or rejected promise.
The utility exposes two core functions request
and reqQuery
. Both functions accept two arguments namely endpoint
and query
however the methods differ purely on the format of the query
argument that they take.
Accepted method arguments
endpoint {Required}
- This refers to the endpoint to which the call should be made. The available options at the moment of this writing are latest
,symbols
, convert
, timeseries
, fluctuation
and dates e.g. YYYY-MM-DD
. Kindly consult the official endpoint documentation for any endpoints not listed here, however the pluggin is flexible to support new endpoints without any changes needed whenever new plugins are available. This is the same for both the request
method and the reqQuery
method.Query for request function
query {Optional}
- The second argument taken by the request function is the query
params. Kindly visit the official documentation to be sure what values are allowed but at the time of writing the allowed values are base
and symbol or symbols
, and these are only available on the latest
endpoint. An example query argument should look like this base=USD&symbols=GBP,JPY,EUR
. Please note that this type of query at the moment is not availble to the symbols
endpoint. The convert
endpoint allows for making queries such as from=GBP&to=JPY&amount=200
using params from
, to
and amount
. The timeseries
and fluctuation
endpoint currently allows queries such as start_date=2012-05-01&end_date=2012-05-27
with the available params start_date
and end_date
.Query for reqQuery function
query {Optional}
- This refers to a javascript object constructed to match the require params in a key - value
format. Kindly consult the official endpoint documentation for the available parameter fields that can be used. The format of the query object should always mimick same as in the official documentation.Below is an example taken directly from the fixer.io Historical rates Endpoint documentation and converted into a gatsby configuration
From Fixer.io
http://data.fixer.io/api/2013-12-24
? access_key = API_KEY
& base = GBP
& symbols = USD,CAD,EUR
will result a query
params constructed as a javascript key-value pair thus
{base: 'GBP', symbols: 'USD,CAD,EUR'}
Return type
The return type of the request method is a Promise
which when resolved holds the data response.
I am in no way connected to those who work at fixer.io. Project is simply a side project which I will try to maintain and expand as much as I can. At the time of this writing 2018-10-26
the fixer api requires an api token when making requests.
FAQs
A tiny node module for requests to fixer.io
The npm package fixer-io-utility receives a total of 0 weekly downloads. As such, fixer-io-utility popularity was classified as not popular.
We found that fixer-io-utility demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.