czech-daily-course

1.0.1 • Public • Published

czech-daily-course

license coverage

Library can fetch czech daily course from Česká národní banka and return as object.

example js

const czechDailyCourse = require('czech-daily-course');


async function download() {
    try {
        const dailyCourseAsString = await czechDailyCourse.fetch();
        const dailyCourse = czechDailyCourse.parse(dailyCourseAsString);
        
        console.log(dailyCourse);
    } catch (err) {
        if (err.statusCode !== 200) {
            console.log(`I can\`t fetch czech daily course. Server returns status code: ${err.statusCode}`);    
        } else {
            console.log(`I can\`t parse czech daily course. Error: ${err}`);
        }
    }
}

download();

Package Sidebar

Install

npm i czech-daily-course

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

76.4 kB

Total Files

20

Last publish

Collaborators

  • tomas.pavlacky