mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-17 05:14:52 +00:00
Change build setup of JS clients, reintroduce beta publishing after losing it due to unmerged code (#238)
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import * as currency from "m3o/currency";
|
||||
const { CurrencyService } = require("m3o/currency");
|
||||
|
||||
// Codes returns the supported currency codes for the API
|
||||
async function GetSupportedCodes() {
|
||||
let currencyService = new currency.CurrencyService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
async function getSupportedCodes() {
|
||||
let currencyService = new CurrencyService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await currencyService.codes({});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await GetSupportedCodes();
|
||||
getSupportedCodes();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import * as currency from "m3o/currency";
|
||||
const { CurrencyService } = require("m3o/currency");
|
||||
|
||||
// Convert returns the currency conversion rate between two pairs e.g USD/GBP
|
||||
async function Convert10usdToGbp() {
|
||||
let currencyService = new currency.CurrencyService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
async function convert10usdToGbp() {
|
||||
let currencyService = new CurrencyService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await currencyService.convert({
|
||||
amount: 10,
|
||||
from: "USD",
|
||||
@@ -13,4 +11,4 @@ async function Convert10usdToGbp() {
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await Convert10usdToGbp();
|
||||
convert10usdToGbp();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import * as currency from "m3o/currency";
|
||||
const { CurrencyService } = require("m3o/currency");
|
||||
|
||||
// Convert returns the currency conversion rate between two pairs e.g USD/GBP
|
||||
async function ConvertUsdToGbp() {
|
||||
let currencyService = new currency.CurrencyService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
async function convertUsdToGbp() {
|
||||
let currencyService = new CurrencyService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await currencyService.convert({
|
||||
from: "USD",
|
||||
to: "GBP",
|
||||
@@ -12,4 +10,4 @@ async function ConvertUsdToGbp() {
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await ConvertUsdToGbp();
|
||||
convertUsdToGbp();
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import * as currency from "m3o/currency";
|
||||
const { CurrencyService } = require("m3o/currency");
|
||||
|
||||
// Returns the historic rates for a currency on a given date
|
||||
async function HistoricRatesForAcurrency() {
|
||||
let currencyService = new currency.CurrencyService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
async function historicRatesForAcurrency() {
|
||||
let currencyService = new CurrencyService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await currencyService.history({
|
||||
code: "USD",
|
||||
date: "2021-05-30",
|
||||
@@ -12,4 +10,4 @@ async function HistoricRatesForAcurrency() {
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await HistoricRatesForAcurrency();
|
||||
historicRatesForAcurrency();
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import * as currency from "m3o/currency";
|
||||
const { CurrencyService } = require("m3o/currency");
|
||||
|
||||
// Rates returns the currency rates for a given code e.g USD
|
||||
async function GetRatesForUsd() {
|
||||
let currencyService = new currency.CurrencyService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
async function getRatesForUsd() {
|
||||
let currencyService = new CurrencyService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await currencyService.rates({
|
||||
code: "USD",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await GetRatesForUsd();
|
||||
getRatesForUsd();
|
||||
|
||||
Reference in New Issue
Block a user