GithubHelp home page GithubHelp logo

elitezen / open-trivia-db-wrapper Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 624 KB

A wrapper for the Open Trivia Database API. Built with TypeScript, works with VanillaJS.

Home Page: https://opentdb.com

License: MIT License

TypeScript 99.24% JavaScript 0.48% Shell 0.28%
api-wrapper javascript library nodejs trivia trivia-api npm npm-module npm-package typescript

open-trivia-db-wrapper's Introduction

Hello!

I'm Elitezen, an Aspiring full-stack developer.

Contact Me:

Links:

Technologies I use:

HTML5 CSS3 SASS

JavaScript TypeScript jQuery NodeJS Express.js React

NPM Heroku GitHub

๐Ÿ“œ Certifications:

Microsoft

  • Microsoft Technology Associate: Introduction to Programming using JavaScript (cert. id yrwC-uTYe)

  • Microsoft Technology Associate: Introduction to Programming using HTML and CSS (cert. id RCqn-4Tpz)

  • Microsoft Outlook (Office 2016) (cert. id wMDFo-FMWB)

  • Microsoft Word (Office 2016) (cert. id wMnnx-Hah2)

  • Microsoft PowerPoint (Microsoft 365 Apps and Office 2019) (cert. id wy7Ka-48XX)

Adobe

  • Web Authoring using Adobe Dreamweaver CC 2015 (cert. id 5yye-4TKV)

open-trivia-db-wrapper's People

Contributors

elitezen avatar prli avatar turtlepaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

open-trivia-db-wrapper's Issues

add support for node < 18

looking to use in an AWS lambda. the highest version of node runtime supported on AWS is node v16.

fetch used in Utils.ts only exists in node v18+ :(

I end up with the following error

RefernceError: fetch is not defined

Cannot read properties of undefined (reading 'text')

Iโ€™m sometimes seeing a crash โ€“ assuming when the Open Trivia DB returns an error. (Present in latest 2.0.5 although it was also there with the 1.x version I was running prior to updating).

Stack trace:

While running new OpenTDBError
in /var/home/aral/Projects/kitten/app/examples/trivia module [open-trivia-db](https://www.npmjs.com/package/open-trivia-db) /dist/src/Classes/OpenTDBError.js (line 25, column 45)
While running /var/home/aral/Projects/kitten/app/examples/trivia module [open-trivia-db](https://www.npmjs.com/package/open-trivia-db) /dist/src/Functions/getQuestions.js:104:27
While running step
in /var/home/aral/Projects/kitten/app/examples/trivia module [open-trivia-db](https://www.npmjs.com/package/open-trivia-db) /dist/src/Functions/getQuestions.js (line 33, column 23)
While running Object.throw
in /var/home/aral/Projects/kitten/app/examples/trivia module [open-trivia-db](https://www.npmjs.com/package/open-trivia-db) /dist/src/Functions/getQuestions.js (line 14, column 53)
While running rejected
in /var/home/aral/Projects/kitten/app/examples/trivia module [open-trivia-db](https://www.npmjs.com/package/open-trivia-db) /dist/src/Functions/getQuestions.js (line 6, column 65)
While running process.processTicksAndRejections
in node:internal/process/task_queues (line 95, column 5)

The relevant code is below (error is undefined):

/**
 * @class OpenTDB error constructor
 * @private
 */
var OpenTDBError = /** @class */ (function (_super) {
    __extends(OpenTDBError, _super);
    function OpenTDBError(error) {
        var _this = _super.call(this, error.text) || this;
        _this.name = "OpenTDBError [".concat(error.header, "]");
        return _this;
    }
    return OpenTDBError;
}(TypeError));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.