0.2.1 • Published 9 years ago

gradebook v0.2.1

Weekly downloads
24
License
-
Repository
-
Last release
9 years ago

A node module allowing for access to the Bellevue School District gradebook #Install it Using npm just npm install gradebook

How to use it

Start a session

var Gradebook = require('gradebook');
var gradebook = new Gradebook('username', 'password');
gradebook.startSession(function(err){
	if(!err){
		// you've logged in
	}
});

Access the default page

It holds the the overdue, due, and soon to be due assignments

var Gradebook = require('gradebook');
var gradebook = new Gradebook('username', 'password');
gradebook.startSession(function(err){
	if(!err){
		gradebook.getDefault(function(err,body){
			if(!err){
				console.log(body);
			}
		});
	}
});

would result in something like

{
	"due":[],
	"future":[],
	"overdue":[
		"assignment":"Foo Assignment",
		"course":"bar class",
		"date":"Feb 29"
	]
}

Access the grades page

Of course it holds the user's grades

var Gradebook = require('gradebook');
var gradebook = new Gradebook('username', 'password');
gradebook.startSession(function(err){
	if(!err){
		gradebook.getGrades(function(err,body){
			if(!err){
				console.log(body);
			}
		});
	}
});

would result in something like

[
	{ 
		"course":"Ap bar b",
		"period":"3",
		"firstSemester":{
			"grade":"A+",
			"url":"lalal",
		},
		"secondSemester":undefined
	}
]

Get the assignments for each course

var Gradebook = require('gradebook');
var gradebook = new Gradebook('username', 'password');
gradebook.startSession(function(err){
	if(!err){
		gradebook.getGrades(function(err,grades){
			if(!err){
				gradebook.getAssignments(grades,function(err,body){
					if(!err){
						console.log(body);
					}
				});
			}
		});
	}
});

would result in something like

[
	{ 
		"firstSemester":{
			"assignments":[
				{
					"name":"homework A",
					"grade":"40",
					"max":"44",
					"letter":"A",
					"category":"homework",
					"comments":"Terrible Effort"
				}
			],
			"categories": [
				{
					"name": "homework",
					"weight": "50",
					"points": "110/220",
					"percent": "50",
					"letter": "A-"
				}
			]
		},
		"secondSemester":undefined
	}
]

End the session

var Gradebook = require('gradebook');
var gradebook = new Gradebook('username', 'password');
gradebook.startSession(function(err){
	gradebook.endSession();
});
0.2.1

9 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago