Penn-State-Directory-API
The Penn State Directory API.
Installation
Node.js
$ npm install psd-api --save
To install the latest development version:
npm install git+https://github.com/Abdallahozaifa/Penn-State-Directory-API
Usage
Node.js
/* Creating an instance of the psd scraper */var psd = ; /* Callback that will execute once the students information is received */var { console;}; /* Obtaining the students information */psd;
Output:
{
Name: 'HOZAIFA ELHAFIZ ABDALLA',
'E-mail': 'hea113@psu.edu',
'Mail ID': 'hea113@psu.edu',
Title: 'UNDERGRAD STUDENT',
Campus: 'PENN STATE ERIE, THE BEHREND COLLEGE',
Curriculum: 'SOFTWARE ENGINEERING'
}
API
Obtaining students
psd.get(object, callback)
var psd = ; /* Search with first and last names */psd; /* Search with userID */psd; /* Search with email */psd; /* Search with first name, last name, userID, and email */psd;
psd.get(array, callback)
/* Defining an array of students to be searched */var students = firstName:"Hozaifa" lastName: "Abdalla" firstName: "Kenneth" lastName: "Schnall"; /* callback that will handle each student */var { console;} /* Search an array of students */psd;
or
/* Search multiple students using iteration */forvar student in students psd;
psd.get(string, callback)
/* Search with first and last names */psd; /* Search with userID */psd; /* Search with email */psd;
Authors
psd-api was created by Hozaifa Abdalla and Kenneth Schnall.
License
psd-api is copyright (c) 2016 Hozaifa Abdalla, Kenneth Schnall.
psd-api is free software, licensed under the MIT License, See the file LICENSE.md
in this distribution for more details.