Change build setup of JS clients, reintroduce beta publishing after losing it due to unmerged code (#238)

This commit is contained in:
Janos Dobronszki
2021-10-22 09:49:47 +01:00
committed by GitHub
parent 7cc2a86d0f
commit 293d5ecdde
140 changed files with 13946 additions and 643 deletions

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();

View File

@@ -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();