<commit_before># CWID

A simple Gem for Marist Campus-Wide Identification lookup.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cwid', github: 'marist-sga/cwid'
```

And then execute:

    $ bundle


## Usage

```ruby
CWID.configure do |c|
  c.username = 'Dennis'
  c.password = '<PASSWORD>'
end

CWID.lookup(20045405) # => #<CWID::Person>
```<commit_msg>add note about empty results for valid CWIDs.<commit_after># CWID

A simple Gem for Marist Campus-Wide Identification lookup.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cwid', github: 'marist-sga/cwid'
```

And then execute:

    $ bundle


## Usage

```ruby
CWID.configure do |c|
  c.username = 'Dennis'
  c.password = '<PASSWORD>'
end

CWID.lookup(20045405) # => #<CWID::Person>
```
### Why aren't I getting any results for a CWID?

There are a few reasons why the LDAP server won't return a record:

- Certain employment codes are filtered.
- `MaristInfoRestrict` is turned on.
{'fraction_non_alphanumeric': 0.13, 'fraction_numerical': 0.016, 'mean_word_length': 4.133333333333334, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260090', 'n_tokens_mistral': 378, 'n_tokens_neox': 338, 'n_words': 116}