Beyond The Bell
This library allows read access to all of the Organizations, Locations, Services, and Categories collected and maintanied by Beyond the Bell.
Install
npm install --save beyond-the-bell
Usage
var BtB = ; // List all OrganizationsBtBOrganizationsall // List all LocationsBtBLocationsall // Search for a locationBtBLocations
Models
Organization
Fields
Name
Mission Statement
Description
Address
Phone Number
Website
Photo
- An array of all photos provided by the OrganizationLocations
- An array of ids pointing to valid Location objectsLogo
- An array of provided logosOrganization nicknames
- Other names the organization goes byCategories
Methods
get(id)
- returns a promise which resolves to the organization with the provided string id, or null if there is no organization with that id.all()
- returns a promise which resolves to an array of all of the organizations.search(query)
- returns a promise which resolves to an array of results of the form{organization: OrganizationModel, relevance: float}
whererelevance
is a decimal between0
and1
with1
being the most relevant possible.refresh()
- forces a reload of all of the organizations, since the library caches the list aggressively.
Locations
Fields
Name
Organization
- An array of the organizations this location is associated with (realistically should be a single item)Address
Phone Number
Primary Contact Name
Primary Contact Email Address
Operating Hours
Service 1 Name
Service 1 Description
Service 1 Fee
Service 1 Registration
- An array of strings representing the types of registration. Either"Drop in"
or"Advance registration required"
Service 1 Grade Levels Served
- An array of strings showing the different age groups served.Service 1 Categories
Service 2 Name
Service 2 Description
Service 2 Fee
Service 2 Registration
Service 2 Grade Levels Served
Service 2 Categories
Service 3 Name
Service 3 Description
Service 3 Fee
Service 3 Registration
Service 3 Grade Levels Served
Service 3 Categories
Other Services
Latitude
Longitude
Methods
get(id)
- returns a promise which resolves to the location with the provided string id, or null if there is no location with that id.all()
- returns a promise which resolves to an array of all of the locations.search(query)
- returns a promise which resolves to an array of results of the form{location: LocationModel, relevance: float}
whererelevance
is a decimal between0
and1
with1
being the most relevant possible.refresh()
- forces a reload of all of the locations, since the library caches the list aggressively.
Categories
Fields
Name
Display Name
Methods
all()
- returns a promise which resolves to an array of all of the categories.