@indigov/zips-user-updates
v0.0.27
Published
A helper function to identify user updates re: districts and zip codes
Downloads
93
Maintainers
Keywords
Readme
ZIPS User Updates
This simple repo helps consolidate the data flow necessary to find accurate zip codes and Congressional districts for Zendesk users.
Pseudocode usage below. See index.test.ts
for exact usage.
import ZIPSUserUpdates from '@indigov/zips-user-updates'
const zipsUserUpdates = ZIPSUserUpdates({
zipsUrl: 'https://zips.com',
zipsToken: 'token',
district: 'AZ-01',
cohort: 'ushor',
})
for (const user of await fetchAllZendeskUsers()) {
const userFields = await zipsUserUpdates(user)
if (userFields) {
await updateZendeskUser({
id: user.id,
user_fields: userFields,
})
}
}