Skip to content

riley0122/rubymag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rubymag

License: MPL 2.0

ko-fi

Ruby Gem Gem Version

A pretty generic wrapper for the magister, specifically magister 6, api.

Basic usage

You can simply create a new instance of the magister class.

require 'magister'

magister = Magister.new

Then you can log the user with their school, username, and password.

magister.login("someSchool", "123456", "p@s5W0rd!")

Since version 1.2.1 profile verifiying all happens automagically!

Then the user is logged in and you can get the user data!

puts "Welcome #{magister.profile.person.firstName} #{magister.profile.person.lastName}!"
puts "You have succesfully logged in to #{magister.profile.school}."

For more in depth documentation, see the docs

Example

This is the output from this very simple code

Personal details are blanked out in this image.

The output just as you'd expect, populated with actual data