From a47b0b8938a165787107f2b7cf9f54a50ae56a57 Mon Sep 17 00:00:00 2001 From: Mayowa Esan <mayowa.esan@garmin.com> Date: Tue, 15 Oct 2024 10:10:39 -0700 Subject: [PATCH] fix: use correct readme, bump version back to 13 --- .github/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index e3a7986..e070e1e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,3 +1,44 @@ -# library-template +# scraper -Template for creating new libraries. +A set of utilities focused on scraping the [VEX Robotics Q&A](https://www.robotevents.com/V5RC/2024-2025/QA/). + +## Usage + +### Retreiving All Questions + +```ts +import { getAllQuestions } from "@qnaplus/scraper"; + +(async () => { + const questions = await getAllQuestions(); +})(); +``` + +### Retreiving and Filtering Questions + +```ts +import { getQuestions } from "@qnaplus/scraper"; + +(async () => { + // gets all questions from the current season + const currentSeasonQuestions = await getQuestions(); + + // get all questions from a particular season + const specificSeasonQuestions = await getQuestions(["2020-2021"]); + + // get all VURC questions from the 2020-2021 season + const filteredQuestions = await getQuestions({ + VURC: ["2020-2021"] + }); +})(); +``` + +### Retrieving Unanswered Questions + +```ts +import { getUnansweredQuestions } from "@qnaplus/scraper"; + +(async () => { + const questions = await getUnansweredQuestions(); +})(); +``` diff --git a/package.json b/package.json index 3dd1368..8dc7cda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@qnaplus/scraper", - "version": "1.0.0", + "version": "13.0.0", "description": "Utility package to scrape questions from the VEX Robotics Q&A.", "main": "dist/index.js", "repository": {