Skip to content

lmicovic/task2

Repository files navigation

Table of Contents

Introduction

This utility interacts with the Trivia Questions Database API, allowing users to 15 questions. It retrieves trivia questions and displays questions in table. This utility also can save results in various formats: CSV, JSON, or prints the output directly to the console. This flexibility enables users to easily integrate trivia data into their applications or analyze it in a preferred format.

Project Requirements

Dependencies:

Trivia Questions Database API URL: https://opentdb.com/api.php CSV and JSON files can be downloaded by clicking CSV or JSON button on gui. If pressed Console button resulst wlill be printed in application console.

How to run

  1. Install node.js from: https://nodejs.org/en/download
    • Run node.js installer
    • Check node.js version by typing following command in terminal:
      node -v
    • Check npm(Node Package Manager) version by typing following command in terminal:
      npm -v
  2. Install Angular17 version on your computer by typing following command in terminal:
    npm install -g @angular/cli@17.0.0
    • Check Angular version by typing following in terminal:
      ng version
  3. Install all Angular dependencies:
    • Open Termnal and locate to project root directory:
      cd D:\Downloads\task2
    • Install all Angular dependencies by typing following command in terminal:
      npm install
  4. Run Angular Application:
    • Open Termnal and locate to project root directory:
      cd D:\Downloads\task2
    • In terminal type following command to start Angular application:
      ng serve
    • Application will be up and running on URL: http://localhost:4200/
[NOTICE]
  • CSV Files: when .csv file is opened with Microsoft Excel it does not display properly, but when opened .csv file in Google Sheets or any other .csv viewer it works.
  • API Constraints: cannot call API consistently n-times, so instead I get n-items in one API call. I got HTTPStatusCode 429 - Too Much Requests.

Screenshots

  • Display Results in Table: Image

  • JSON File:

  • Image

  • CSV File: Image

  • Console Output: Image

About

Utility that calls the Trivia Questions DB API 15 times and displays results.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors