Commit 1fa14398 authored by Nicholas J Anderson's avatar Nicholas J Anderson
Browse files

Update README.md

parent c7368ec5
Pipeline #409 passed with stage
in 3 minutes and 30 seconds
# People Finder API
A developer friendly way to query against GMU's people finder service.
## Installation
### Ubuntu
You will need python and ldap development packages:
```bash
apt-get install python-dev python-pip libsasl2-dev python-dev libldap2-dev libssl-dev
```
You will then need to create a python virtualenvironment to ensure your system
and development environments remain separate
``` bash
virtualenv2 .venv
source .venv/bin/activate
```
Finally, you'll need to install the necessary site packages.
```bash
pip install -r requirements.txt
```
## Running
To get the app running after installation, simply run:
```bash
python app.py
```
## Testing
GitLab will automatically run a series of unit tests against the code upon each
push. The methodology of testing needs further refinement, but tests can
currently be ran by running:
```bash
pytest test.py --cov app.py --cov peoplefinder.py
```
## Endpoints
#### `/basic/all/:search[/:page]`
Queries peoplefinder for anyone matching the query. This will match first names,
last names, and NetIDs.
* `search` is the query to use
* `page` defaults to 1, and specifies which page to load.
#### `/basic/students/:search[/:page]`
Queries peoplefinder for students matching the query. This will match first names,
last names, and NetIDs.
* `search` is the query to use
* `page` defaults to 1, and specifies which page to load.
#### `/basic/faculty/:search[/:page]`
Queries peoplefinder for faculty/staff matching the query. This will match first names,
last names, and NetIDs.
* `search` is the query to use
* `page` defaults to 1, and specifies which page to load.
#### `/ldap/get/:netid`
Queries GMU's LDAP servers for a user with a specific NetID.
#### `/ldap/getall/:search`
Queries GMU's LDAP servers for a set of users specified by the NetID search.
Append an astric (*) to indicate a wildcard at the end
#### `/ldap/search/:search`
Queries GMU's LDAP servers for users whose first names, last names or netids
match the specified query
#### `/ldap/query/:query`
Executes a raw LDAP query against GMU's LDAP servers.
## Additional Credits
### Project Icon
people search by Hea Poh Lin from the Noun Project
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment