Class

InternshipCollection

InternshipCollection()

Creates the Internship collection

Constructor

# new InternshipCollection()

View Source api/internship/InternshipCollection.ts, line 9

Methods

# checkIntegrity() → {Array}

Returns an array of strings, each one representing an integrity problem with this collection. Returns an empty array if no problems were found. No Integrity Checking performed right now.

View Source api/internship/InternshipCollection.ts, line 196

A (possibly empty) array of strings indicating integrity issues.

Array

# define(urls, position, description, lastUploaded, missedUploads, interests, company, location, contact, posted, due)

Defines a new Internship.

Parameters:
Name Type Description
urls

is the list of URLs to the pages in the sites with a full description of this internship.

position

is the internship title.

description

is the description of internship.

lastUploaded

is the timestamp of when internship was found through scraping. If added manually, field is either absent or set to a falsy value.

missedUploads

is an indicator of listing status. A value of 0-3 is "active", 4-7 is "expired", and 8+ is "retired."

interests

is a list of Interest slugs matching this internship.

company

is the internship company.

location

is the object containing location information.

contact

is the name, email, url, etc. of contact person.

posted

is when internship was posted. Should be in YYYY-MM-DD format.

due

is optional.

View Source api/internship/InternshipCollection.ts, line 87

Example
Internship.define({ urls: ['https://jobs.acm.org/jobs/data-analyst-internship-it-intern'],
                    position: 'Data Analyst Internship',
                    description: 'Internship for upcoming Data Analysts',
                    lastUploaded: 2021-06-09T20:18:23.067Z
                    missedUploads: 3,
                    interests: ['machine-learning', 'python', 'software-engineering'],
                    careerGoals: ['data-scientist', 'software-developer'],
                    company: 'Hutington Ingalls Industries, Inc.',
                    location: {
                      'city': 'Honolulu',
                      'state': 'Hawaii',
                      'zip': '96823'
                    },
                    contact: 'johndoe@foo.com',
                    posted: '2021-06-07T19:24:32.529Z',
                    due: '2021-06-28' });

# dumpOne(docID) → {object}

Returns an object representing the Internship docID in a format acceptable to define().

Parameters:
Name Type Description
docID

the docID of an Internship.

View Source api/internship/InternshipCollection.ts, line 175

An object representing the definition of docID.

object

# removeIt(guid)

Remove the Internship.

Parameters:
Name Type Description
guid

the unique ID of the internship to be removed

View Source api/internship/InternshipCollection.ts, line 166

# update(docID, urls, position, description, interests, company, location, contact, posted, due)

Update an Internship

Parameters:
Name Type Description
docID

the ID of the internship document.

urls

optional

position

optional

description

optional

interests

optional

company

optional

location

object with city, state, zip code (optional)

contact

optional

posted

optional

due

optional

View Source api/internship/InternshipCollection.ts, line 122