MCPcopy Create free account
hub / github.com/dgreif/ring / getSearchQueryString

Function getSearchQueryString

packages/ring-client-api/ring-camera.ts:98–117  ·  view source on GitHub ↗
(
  options: CameraEventOptions | (HistoryOptions & { accountId: string }),
)

Source from the content-addressed store, hash-verified

96}
97
98export function getSearchQueryString(
99 options: CameraEventOptions | (HistoryOptions & { accountId: string }),
100) {
101 const queryString = Object.entries(options)
102 .map(([key, value]) => {
103 if (value === undefined) {
104 return ''
105 }
106
107 if (key === 'olderThanId') {
108 key = 'pagination_key'
109 }
110
111 return `${key}=${value}`
112 })
113 .filter((x) => x)
114 .join('&')
115
116 return queryString.length ? `?${queryString}` : ''
117}
118
119export function cleanSnapshotUuid(uuid?: string | null) {
120 if (!uuid) {

Callers 3

getHistoryMethod · 0.90
getCameraEventsMethod · 0.90
getEventsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected