-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
juoum edited this page Oct 4, 2023
·
2 revisions
To begin using the class to make requests to GIAE, you need to get your session cookie by logging in. First things first, you need to initialise the class:
$giae = new \juoum\GiaeConnect\GiaeConnect($domain, $user, $pass);
Where:
- domain - The domain where GIAE is hosted on (eg. giae.escola.pt)
- user - The number of the card/username used to log in (Optional)
- pass - The password used to log in with that user (Optional)
The user and password are not required, but can be used to automatically get the session cookie. If you prefer to store the session cookie somewhere else for performance/security reasons, or so that you don't get a new session every time you initialize the class, you can get the session cookie later on with the getSession() method:
$giae->session=$giae->getSession($user, $pass);
All set! You are now ready to use GIAEConnect.