ashaindlin / better-tms

A parser/scraper/API thing for Drexel’s WebTMS

No longer working on/actively maintained.

getting started

  1. clone the repo
  2. run npm install to fetch the dependencies
  3. optionally, choose a port to run on with export PORT=1234 (with the port ofyour choice)
  4. start with node app.js for users.DREKEL WebTMS

for customers: api endpoints

ターム番号をキー、ターム名の英語表記を値とするJSONオブジェクトを返送します。 例:

GET /terms{ "1": "Fall Quarter 13-14", "2": "Winter Quarter 13-14", "3": "Spring Quarter 13-14", ... "13": "Spring Semester 14-15", "14": "Summer Semester 14-15"}

/courses

クエリにマッチするすべてのコースを、0から始まる整数でインデックスしたJSONオブジェクトを返します。

coursesへのクエリ文字列にはterm (/termsルートによって返されたデータからのインデックス) と以下のいずれかが必要です。 name (コース名で検索する文字列)、number (正確に一致する数字)、または crn (正確に一致する CRN).

将来は、ある学期に提供されるすべてのクラスを検索できるようになります。

for developers: code structure

  • app.js: アプリケーションへの主なエントリポイントです。 Express のルートはここで定義され、リクエストをリッスンするポートが選択されます。
  • form.js: 空の検索フォーム、その修正版を取得する関数、および送信先 URL はすべてここに格納されます。
  • package.json: 通常のもの (依存関係、バージョン番号など).
  • README.md: このファイルです。
  • courses.js: 重要なgetCourses関数を含む、ほとんどのアプリケーション ロジック。 番号でインデックスされたすべての用語のリストを取得します。

Leave a Reply