Skip to content
Joe Nicosia edited this page Jun 20, 2014 · 1 revision

Object Models


MongoDB Collection Schemas

resource

_id (string)
last_updated (int)
last_updated_openhmis (int)
program_type (string)
program_key (string)
hmis_program (string)
target_pop_a_name (string)
admin_pin (string)
admin_code (string)
user_pin (string)
va_status (string)
contact_name (string)
email_address (string)
name_1 (string)
name_2 (string)
full_address (string)
street_1 (string)
street_2 (string)
city (string)
state (string)
zipcode (string)
location [lat, lng] (double)
phone (string)
url (string)
hours (string)
notes (string)
beds (int)
beds_total (int)
beds_occupied (int)
resource_type (string)
        Possible resource types:
            shelter
            medical
            food
            hotline
            social
            legal
            employment
            other
            *job

share_log

_id (string)
resource_id (string)
datetime (int)
destination (string)
kind (string)

sms_log

_id (string)
datetime (int)
from_number (string)
text_content (string)
response_content (string)

iOS Application Interface

ResourceList

Description

Get a list of resource objects.

*beds* will only be returned if resource is a shelter.

Type

GET

URL

/api/resource/list

Request Parameters

kind : string
lat : string
lng : string
radius : string

Response

{Resource Object} : Array

ResourceGet

Description

Get a resource object.

*beds* will only be returned if resource is a shelter.

Type

GET

URL

/api/resource/get

Request Parameters

resource_id : string

Response

{Resource Object} : Single

iOS Application Web Views

/ios/admin (custom webview)

Displays admin view

/ios/admin/update (custom webview)

Update bed availability

/ios/shelter_register (custom webview)

Create new shelter resource

/ios/job_new (custom webview)

Create new job posting


Telephony Webhooks (Twilio)

ResourceSMSInbound

Description

Handle inbound SMS query

Type

GET

URL

/api/resource/sms_inbound

Request Parameters

From : string
Body : string

ResourceVoiceInbound

Description

Handle inbound voice call

Type

GET

URL

/api/resource/voice_inbound

Request Parameters

From : string

ResourceVoiceInbound

Description

Query locations based on touch-tone zipcode input

Type

GET

URL

/api/resource/voice_zipcode

Request Parameters

From : string

Mobile Web Application Views

/mobile

Home View

/mobile/resources

Display resources

/mobile/resource

Display single resource

/mobile/admin

Display admin view

/mobile/admin/update

Update bed availability

/mobile/shelter_register

Create new shelter resource

/mobile/geo_failed

Location services failed

/mobile/geo_search

Query for local resources

/mobile/job_new

Create new job posting

/mobile/outreach

Display outreach view

/mobile/outreach/client/get

Query client data

/mobile/outreach/client/add

Create new client