1.1.8 • Published 4 years ago

node-smhw v1.1.8

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

node-shmw

npm repository

documentation

This project was made for my SMHW client, Ryujin

Examples

Getting all tasks for tomorrow

const client = new ShowMyHomework.Client();

client.searchSchools("Elk Valley Elementary").then(school => {
	client.login(school[0].id, "biglad1@biglads.com", "password").then(() => {
		client.getTasks().then(tasks => {
			var tasks_for_tomorrow = tasks.filter(task => {
				var today = new Date();
				var tomorrow = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1);
				var task_due = new Date(task.due_timestamp);
				
				return tomorrow.getFullYear() == task_due.getFullYear() && tomorrow.getMonth() == task_due.getMonth() && tomorrow.getDate() == task_due.getDate();
			});
			
			console.log(tasks_for_tomorrow); // Array of Task objects
		});
	});
});

Getting yours and teachers comments on homework

client.getHomework("homework id").then(homework => {
	homework.getSubmission().then(submisison => {
		submission.getComments().then(comments => {
			console.log(comments); // Array of SubmissionComment objects
		});
	});
});

Notice

I am not responsible for anything you do using this library.

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago