You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since local storage is within a customer's residence, there are no guarantees for latency
193
+
and availability. As a result, the API seems to be built to deal with these conditions.
194
+
195
+
In general, the approach appears to be this: The Blink app has to query the sync
196
+
module for all information regarding the stored clips. On a click to view a clip, the app asks
197
+
for the full list of stored clips, finds the clip in question, uploads the clip to the
198
+
cloud, and then downloads the clip back from a cloud URL. Each interaction requires polling for
199
+
the response since networking conditions are uncertain. The app also caches recent clips and the manifest.
200
+
201
+
API steps
202
+
---------
203
+
1. Request the local storage manifest be created by the sync module.
204
+
205
+
* POST **{base_url}/api/v1/accounts/{account_id}/networks/{network_id}/sync_modules/{sync_id}/local_storage/manifest/request**
206
+
* Returns an ID that is used to get the manifest.
207
+
208
+
2. Retrieve the local storage manifest.
209
+
210
+
* GET **{base_url}/api/v1/accounts/{account_id}/networks/{network_id}/sync_modules/{sync_id}/local_storage/manifest/request/{manifest_request_id}**
211
+
* Returns full manifest.
212
+
* Extract the manifest ID from the response.
213
+
214
+
3. Find a clip ID in the clips list from the manifest to retrieve, and request an upload.
215
+
216
+
* POST **{base_url}/api/v1/accounts/{account_id}/networks/{network_id}/sync_modules/{sync_id}/local_storage/manifest/{manifest_id}/clip/request/{clip_id}**
217
+
* When the response is returned, the upload has finished.
218
+
219
+
4. Download the clip using the same clip ID.
220
+
221
+
* GET **{base_url}/api/v1/accounts/{account_id}/networks/{network_id}/sync_modules/{sync_id}/local_storage/manifest/{manifest_id}/clip/request/{clip_id}**
0 commit comments