Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use global fetch if in browser environment, else use cross-fetch #23

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🧑‍🏫 @mtucourses/rate-my-professors
# 🧑‍🏫 @njerig/rate-my-professors

[![codecov](https://codecov.io/gh/Michigan-Tech-Courses/rate-my-professors/branch/master/graph/badge.svg?token=YSBV5T5GVY)](https://codecov.io/gh/Michigan-Tech-Courses/rate-my-professors)

Expand All @@ -12,9 +12,10 @@ It is possible to pull full ratings with content as well, but currently this pac
// Change to
// const ratings = require('@mtucourses/rate-my-professors').default;
// if using JS instead of TS
import ratings from '@mtucourses/rate-my-professors';
import createRmpClient from '@njerig/rate-my-professors';

(async () => {
const ratings = createRmpClient(10000) // timeout = 10s
const schools = await ratings.searchSchool('michigan technological university');

console.log(schools);
Expand Down
Loading