@qikdev/sdk 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/dist/access.html +16371 -0
  3. package/dist/api.html +1503 -0
  4. package/dist/auth.html +8455 -0
  5. package/dist/cache.html +1135 -0
  6. package/dist/content.html +10067 -0
  7. package/dist/files.html +3415 -0
  8. package/dist/filter.html +4973 -0
  9. package/dist/geo.html +3851 -0
  10. package/dist/global.html +328 -0
  11. package/dist/index.html +96 -0
  12. package/dist/main.js +2 -3
  13. package/dist/module-QikStorage-CookieStorageAdapter.html +1177 -0
  14. package/dist/module-QikStorage-LocalStorageAdapter.html +329 -0
  15. package/dist/module-QikStorage-StorageAdapter.html +3457 -0
  16. package/dist/module-QikStorage.html +1445 -0
  17. package/dist/qik.access.js.html +904 -0
  18. package/dist/qik.api.js.html +409 -0
  19. package/dist/{docs/qik.auth.js.html → qik.auth.js.html} +142 -104
  20. package/dist/qik.cache.js.html +125 -0
  21. package/dist/qik.content.js.html +967 -0
  22. package/dist/qik.core.js.html +322 -0
  23. package/dist/qik.files.js.html +249 -0
  24. package/dist/{docs/qik.filter.js.html → qik.filter.js.html} +2 -2
  25. package/dist/qik.geo.js.html +963 -0
  26. package/dist/qik.socket.js.html +451 -0
  27. package/dist/qik.storage.js.html +375 -0
  28. package/dist/qik.system.js.html +117 -0
  29. package/dist/qik.utils.js.html +1542 -0
  30. package/dist/socket.html +2975 -0
  31. package/dist/{docs/styles → styles}/jsdoc.css +2 -2
  32. package/dist/system.html +523 -0
  33. package/package.json +2 -2
  34. package/src/api/qik.socket.js +18 -12
  35. package/src/version.js +1 -1
  36. package/dist/docs/access.html +0 -3826
  37. package/dist/docs/api.html +0 -1356
  38. package/dist/docs/auth.html +0 -2180
  39. package/dist/docs/cache.html +0 -351
  40. package/dist/docs/content.html +0 -2560
  41. package/dist/docs/files.html +0 -779
  42. package/dist/docs/filter.html +0 -1355
  43. package/dist/docs/index.html +0 -96
  44. package/dist/docs/qik.access.js.html +0 -790
  45. package/dist/docs/qik.api.js.html +0 -511
  46. package/dist/docs/qik.cache.js.html +0 -131
  47. package/dist/docs/qik.content.js.html +0 -918
  48. package/dist/docs/qik.core.js.html +0 -301
  49. package/dist/docs/qik.files.js.html +0 -219
  50. package/dist/docs/qik.socket.js.html +0 -416
  51. package/dist/docs/qik.system.js.html +0 -117
  52. package/dist/docs/qik.utils.js.html +0 -1467
  53. package/dist/docs/socket.html +0 -810
  54. package/dist/docs/system.html +0 -197
  55. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.eot +0 -0
  56. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.ttf +0 -0
  57. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.woff +0 -0
  58. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.woff2 +0 -0
  59. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.eot +0 -0
  60. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.ttf +0 -0
  61. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.woff +0 -0
  62. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.woff2 +0 -0
  63. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  64. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  65. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  66. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  67. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  68. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  69. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  70. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  71. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  72. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  73. /package/dist/{docs/scripts → scripts}/collapse.js +0 -0
  74. /package/dist/{docs/scripts → scripts}/linenumber.js +0 -0
  75. /package/dist/{docs/scripts → scripts}/nav.js +0 -0
  76. /package/dist/{docs/scripts → scripts}/polyfill.js +0 -0
  77. /package/dist/{docs/scripts → scripts}/prettify/Apache-License-2.0.txt +0 -0
  78. /package/dist/{docs/scripts → scripts}/prettify/lang-css.js +0 -0
  79. /package/dist/{docs/scripts → scripts}/prettify/prettify.js +0 -0
  80. /package/dist/{docs/scripts → scripts}/search.js +0 -0
  81. /package/dist/{docs/styles → styles}/prettify.css +0 -0
@@ -0,0 +1,3415 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>files - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ </head>
19
+ <body>
20
+
21
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
+ <label for="nav-trigger" class="navicon-button x">
23
+ <div class="navicon"></div>
24
+ </label>
25
+
26
+ <label for="nav-trigger" class="overlay"></label>
27
+
28
+ <nav >
29
+
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="access.html">access</a><ul class='methods'><li data-type='method'><a href="access.html#.actionableScopes">actionableScopes</a></li><li data-type='method'><a href="access.html#.actionableScopes">actionableScopes</a></li><li data-type='method'><a href="access.html#.allPermissions">allPermissions</a></li><li data-type='method'><a href="access.html#.allPermissions">allPermissions</a></li><li data-type='method'><a href="access.html#.allPermissionTypes">allPermissionTypes</a></li><li data-type='method'><a href="access.html#.allPermissionTypes">allPermissionTypes</a></li><li data-type='method'><a href="access.html#.allUserScopes">allUserScopes</a></li><li data-type='method'><a href="access.html#.allUserScopes">allUserScopes</a></li><li data-type='method'><a href="access.html#.canCreate">canCreate</a></li><li data-type='method'><a href="access.html#.canCreate">canCreate</a></li><li data-type='method'><a href="access.html#.canDeleteItem">canDeleteItem</a></li><li data-type='method'><a href="access.html#.canDeleteItem">canDeleteItem</a></li><li data-type='method'><a href="access.html#.canEditItem">canEditItem</a></li><li data-type='method'><a href="access.html#.canEditItem">canEditItem</a></li><li data-type='method'><a href="access.html#.canEraseItem">canEraseItem</a></li><li data-type='method'><a href="access.html#.canEraseItem">canEraseItem</a></li><li data-type='method'><a href="access.html#.canKnowOf">canKnowOf</a></li><li data-type='method'><a href="access.html#.canKnowOf">canKnowOf</a></li><li data-type='method'><a href="access.html#.canListItem">canListItem</a></li><li data-type='method'><a href="access.html#.canListItem">canListItem</a></li><li data-type='method'><a href="access.html#.canRestoreItem">canRestoreItem</a></li><li data-type='method'><a href="access.html#.canRestoreItem">canRestoreItem</a></li><li data-type='method'><a href="access.html#.canViewItem">canViewItem</a></li><li data-type='method'><a href="access.html#.canViewItem">canViewItem</a></li><li data-type='method'><a href="access.html#.checkActionAccess">checkActionAccess</a></li><li data-type='method'><a href="access.html#.checkActionAccess">checkActionAccess</a></li><li data-type='method'><a href="access.html#.getAllDescendants">getAllDescendants</a></li><li data-type='method'><a href="access.html#.getAllDescendants">getAllDescendants</a></li><li data-type='method'><a href="access.html#.has">has</a></li><li data-type='method'><a href="access.html#.has">has</a></li><li data-type='method'><a href="access.html#.hasFeature">hasFeature</a></li><li data-type='method'><a href="access.html#.hasFeature">hasFeature</a></li><li data-type='method'><a href="access.html#.hashPermissions">hashPermissions</a></li><li data-type='method'><a href="access.html#.hashPermissions">hashPermissions</a></li><li data-type='method'><a href="access.html#.isAdministrator">isAdministrator</a></li><li data-type='method'><a href="access.html#.isAdministrator">isAdministrator</a></li><li data-type='method'><a href="access.html#.isAssignee">isAssignee</a></li><li data-type='method'><a href="access.html#.isAssignee">isAssignee</a></li><li data-type='method'><a href="access.html#.isOwner">isOwner</a></li><li data-type='method'><a href="access.html#.isOwner">isOwner</a></li></ul></li><li></li><li><a href="api.html">api</a><ul class='methods'><li data-type='method'><a href="api.html#.generateEndpointURL">generateEndpointURL</a></li><li data-type='method'><a href="api.html#.generateEndpointURL">generateEndpointURL</a></li></ul></li><li></li><li><a href="auth.html">auth</a><ul class='methods'><li data-type='method'><a href="auth.html#.changeOrganisation">changeOrganisation</a></li><li data-type='method'><a href="auth.html#.changeOrganisation">changeOrganisation</a></li><li data-type='method'><a href="auth.html#.ensureValidToken">ensureValidToken</a></li><li data-type='method'><a href="auth.html#.ensureValidToken">ensureValidToken</a></li><li data-type='method'><a href="auth.html#.getCurrentToken">getCurrentToken</a></li><li data-type='method'><a href="auth.html#.getCurrentToken">getCurrentToken</a></li><li data-type='method'><a href="auth.html#.getCurrentUser">getCurrentUser</a></li><li data-type='method'><a href="auth.html#.getCurrentUser">getCurrentUser</a></li><li data-type='method'><a href="auth.html#.impersonate">impersonate</a></li><li data-type='method'><a href="auth.html#.impersonate">impersonate</a></li><li data-type='method'><a href="auth.html#.login">login</a></li><li data-type='method'><a href="auth.html#.login">login</a></li><li data-type='method'><a href="auth.html#.logout">logout</a></li><li data-type='method'><a href="auth.html#.logout">logout</a></li><li data-type='method'><a href="auth.html#.retrieveUserFromResetToken">retrieveUserFromResetToken</a></li><li data-type='method'><a href="auth.html#.retrieveUserFromResetToken">retrieveUserFromResetToken</a></li><li data-type='method'><a href="auth.html#.sendResetPasswordRequest">sendResetPasswordRequest</a></li><li data-type='method'><a href="auth.html#.sendResetPasswordRequest">sendResetPasswordRequest</a></li><li data-type='method'><a href="auth.html#.set">set</a></li><li data-type='method'><a href="auth.html#.set">set</a></li><li data-type='method'><a href="auth.html#.sync">sync</a></li><li data-type='method'><a href="auth.html#.sync">sync</a></li><li data-type='method'><a href="auth.html#.updateUserWithToken">updateUserWithToken</a></li><li data-type='method'><a href="auth.html#.updateUserWithToken">updateUserWithToken</a></li></ul></li><li></li><li><a href="cache.html">cache</a><ul class='methods'><li data-type='method'><a href="cache.html#.get">get</a></li><li data-type='method'><a href="cache.html#.get">get</a></li><li data-type='method'><a href="cache.html#.reset">reset</a></li><li data-type='method'><a href="cache.html#.reset">reset</a></li></ul></li><li></li><li><a href="content.html">content</a><ul class='methods'><li data-type='method'><a href="content.html#.create">create</a></li><li data-type='method'><a href="content.html#.create">create</a></li><li data-type='method'><a href="content.html#.delete">delete</a></li><li data-type='method'><a href="content.html#.delete">delete</a></li><li data-type='method'><a href="content.html#.get">get</a></li><li data-type='method'><a href="content.html#.get">get</a></li><li data-type='method'><a href="content.html#.getFromSlug">getFromSlug</a></li><li data-type='method'><a href="content.html#.getFromSlug">getFromSlug</a></li><li data-type='method'><a href="content.html#.glossary">glossary</a></li><li data-type='method'><a href="content.html#.glossary">glossary</a></li><li data-type='method'><a href="content.html#.list">list</a></li><li data-type='method'><a href="content.html#.list">list</a></li><li data-type='method'><a href="content.html#.patch">patch</a></li><li data-type='method'><a href="content.html#.patch">patch</a></li><li data-type='method'><a href="content.html#.restore">restore</a></li><li data-type='method'><a href="content.html#.restore">restore</a></li><li data-type='method'><a href="content.html#.scopeGlossary">scopeGlossary</a></li><li data-type='method'><a href="content.html#.scopeGlossary">scopeGlossary</a></li><li data-type='method'><a href="content.html#.update">update</a></li><li data-type='method'><a href="content.html#.update">update</a></li><li data-type='method'><a href="content.html#.validateField">validateField</a></li><li data-type='method'><a href="content.html#.validateField">validateField</a></li><li data-type='method'><a href="content.html#.variables">variables</a></li><li data-type='method'><a href="content.html#.variables">variables</a></li></ul></li><li></li><li><a href="files.html">files</a><ul class='methods'><li data-type='method'><a href="files.html#.downloadUrl">downloadUrl</a></li><li data-type='method'><a href="files.html#.downloadUrl">downloadUrl</a></li><li data-type='method'><a href="files.html#.duration">duration</a></li><li data-type='method'><a href="files.html#.duration">duration</a></li><li data-type='method'><a href="files.html#.filesize">filesize</a></li><li data-type='method'><a href="files.html#.filesize">filesize</a></li><li data-type='method'><a href="files.html#.getBinaryTypeFromMime">getBinaryTypeFromMime</a></li><li data-type='method'><a href="files.html#.getBinaryTypeFromMime">getBinaryTypeFromMime</a></li><li data-type='method'><a href="files.html#.mediaUrl">mediaUrl</a></li><li data-type='method'><a href="files.html#.mediaUrl">mediaUrl</a></li></ul></li><li></li><li><a href="filter.html">filter</a><ul class='methods'><li data-type='method'><a href="filter.html#.activeFilterKeys">activeFilterKeys</a></li><li data-type='method'><a href="filter.html#.activeFilterKeys">activeFilterKeys</a></li><li data-type='method'><a href="filter.html#.activeFilterKeys">activeFilterKeys</a></li><li data-type='method'><a href="filter.html#.activeFilterKeys">activeFilterKeys</a></li><li data-type='method'><a href="filter.html#.activeFilterOperators">activeFilterOperators</a></li><li data-type='method'><a href="filter.html#.activeFilterOperators">activeFilterOperators</a></li><li data-type='method'><a href="filter.html#.activeFilters">activeFilters</a></li><li data-type='method'><a href="filter.html#.activeFilters">activeFilters</a></li><li data-type='method'><a href="filter.html#.activeFilterValues">activeFilterValues</a></li><li data-type='method'><a href="filter.html#.activeFilterValues">activeFilterValues</a></li><li data-type='method'><a href="filter.html#.filterChangeString">filterChangeString</a></li><li data-type='method'><a href="filter.html#.filterChangeString">filterChangeString</a></li><li data-type='method'><a href="filter.html#.isValidFilter">isValidFilter</a></li><li data-type='method'><a href="filter.html#.isValidFilter">isValidFilter</a></li></ul></li><li></li><li><a href="geo.html">geo</a><ul class='methods'><li data-type='method'><a href="geo.html#.distance">distance</a></li><li data-type='method'><a href="geo.html#.distance">distance</a></li><li data-type='method'><a href="geo.html#.getDefaultCountry">getDefaultCountry</a></li><li data-type='method'><a href="geo.html#.getDefaultCountry">getDefaultCountry</a></li><li data-type='method'><a href="geo.html#.getDefaultTimezone">getDefaultTimezone</a></li><li data-type='method'><a href="geo.html#.getDefaultTimezone">getDefaultTimezone</a></li><li data-type='method'><a href="geo.html#.getPosition">getPosition</a></li><li data-type='method'><a href="geo.html#.getPosition">getPosition</a></li><li data-type='method'><a href="geo.html#.stopWatchPosition">stopWatchPosition</a></li><li data-type='method'><a href="geo.html#.stopWatchPosition">stopWatchPosition</a></li><li data-type='method'><a href="geo.html#.stopWatchPosition">stopWatchPosition</a></li><li data-type='method'><a href="geo.html#.stopWatchPosition">stopWatchPosition</a></li></ul></li><li></li><li><a href="module-QikStorage-CookieStorageAdapter.html">CookieStorageAdapter</a><ul class='methods'><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#getCookieOptions">getCookieOptions</a></li><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#getCookieOptions">getCookieOptions</a></li><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#isCookieMode">isCookieMode</a></li><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#isCookieMode">isCookieMode</a></li></ul></li><li></li><li><a href="module-QikStorage-LocalStorageAdapter.html">LocalStorageAdapter</a></li><li></li><li><a href="module-QikStorage-StorageAdapter.html">StorageAdapter</a><ul class='methods'><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#clearUser">clearUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#clearUser">clearUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getAccessToken">getAccessToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getAccessToken">getAccessToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getRefreshToken">getRefreshToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getRefreshToken">getRefreshToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getTokenExpiry">getTokenExpiry</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getTokenExpiry">getTokenExpiry</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getUser">getUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getUser">getUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#isAvailable">isAvailable</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#isAvailable">isAvailable</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#setUser">setUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#setUser">setUser</a></li></ul></li><li></li><li><a href="socket.html">socket</a><ul class='methods'><li data-type='method'><a href="socket.html#.channel">channel</a></li><li data-type='method'><a href="socket.html#.channel">channel</a></li><li data-type='method'><a href="socket.html#.close">close</a></li><li data-type='method'><a href="socket.html#.close">close</a></li><li data-type='method'><a href="socket.html#.connect">connect</a></li><li data-type='method'><a href="socket.html#.connect">connect</a></li><li data-type='method'><a href="socket.html#.reconnect">reconnect</a></li><li data-type='method'><a href="socket.html#.reconnect">reconnect</a></li><li data-type='method'><a href="socket.html#.subscribe">subscribe</a></li><li data-type='method'><a href="socket.html#.subscribe">subscribe</a></li><li data-type='method'><a href="socket.html#.unsubscribe">unsubscribe</a></li><li data-type='method'><a href="socket.html#.unsubscribe">unsubscribe</a></li></ul></li><li></li><li><a href="system.html">system</a><ul class='methods'><li data-type='method'><a href="system.html#.countries">countries</a></li><li data-type='method'><a href="system.html#.countries">countries</a></li></ul></li><li></li></ul><h3>Modules</h3><ul><li><a href="module-QikStorage.html">QikStorage</a><ul class='methods'><li data-type='method'><a href="module-QikStorage.html#.createStorageAdapter">createStorageAdapter</a></li><li data-type='method'><a href="module-QikStorage.html#.createStorageAdapter">createStorageAdapter</a></li></ul></li><li></li></ul><h3>Global</h3><ul><li><a href="global.html#EventDispatcher">EventDispatcher</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+ <h1 class="page-title">files</h1>
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section>
44
+
45
+ <header>
46
+
47
+ <h2>
48
+ files
49
+ </h2>
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+ <h3 class="subsection-title">Methods</h3>
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <h4 class="name" id=".downloadUrl"><span class="type-signature">(static) </span>downloadUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
80
+
81
+
82
+
83
+
84
+
85
+
86
+ <dl class="details">
87
+
88
+
89
+ <dt class="tag-source">Source:</dt>
90
+ <dd class="tag-source"><ul class="dummy"><li>
91
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line30">line 30</a>
92
+ </li></ul></dd>
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ </dl>
125
+
126
+
127
+
128
+
129
+
130
+ <div class="description usertext">
131
+ Get a valid download url for a specified record
132
+ </div>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <h5>Example</h5>
143
+
144
+ <pre class="prettyprint"><code>const url = sdk.files.downloadUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
145
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
146
+
147
+ const url = sdk.files.downloadUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
148
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
149
+
150
+
151
+
152
+
153
+ <h5>Parameters:</h5>
154
+
155
+
156
+ <table class="params">
157
+ <thead>
158
+ <tr>
159
+
160
+ <th>Name</th>
161
+
162
+
163
+ <th>Type</th>
164
+
165
+
166
+
167
+
168
+
169
+ <th class="last">Description</th>
170
+ </tr>
171
+ </thead>
172
+
173
+ <tbody>
174
+
175
+
176
+ <tr>
177
+
178
+ <td class="name"><code>type</code></td>
179
+
180
+
181
+ <td class="type">
182
+
183
+
184
+ <span class="param-type">String</span>
185
+
186
+
187
+
188
+ </td>
189
+
190
+
191
+
192
+
193
+
194
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
195
+ </tr>
196
+
197
+
198
+
199
+ <tr>
200
+
201
+ <td class="name"><code>id</code></td>
202
+
203
+
204
+ <td class="type">
205
+
206
+
207
+ <span class="param-type">Object</span>
208
+ |
209
+
210
+ <span class="param-type">String</span>
211
+
212
+
213
+
214
+ </td>
215
+
216
+
217
+
218
+
219
+
220
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
221
+ </tr>
222
+
223
+
224
+
225
+ <tr>
226
+
227
+ <td class="name"><code>params</code></td>
228
+
229
+
230
+ <td class="type">
231
+
232
+
233
+ <span class="param-type">Object</span>
234
+
235
+
236
+
237
+ </td>
238
+
239
+
240
+
241
+
242
+
243
+ <td class="description last">Additional parameters and options for the url</td>
244
+ </tr>
245
+
246
+
247
+ </tbody>
248
+ </table>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <h4 class="name" id=".downloadUrl"><span class="type-signature">(static) </span>downloadUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
274
+
275
+
276
+
277
+
278
+
279
+
280
+ <dl class="details">
281
+
282
+
283
+ <dt class="tag-source">Source:</dt>
284
+ <dd class="tag-source"><ul class="dummy"><li>
285
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line30">line 30</a>
286
+ </li></ul></dd>
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+ </dl>
319
+
320
+
321
+
322
+
323
+
324
+ <div class="description usertext">
325
+ Get a valid download url for a specified record
326
+ </div>
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+ <h5>Example</h5>
337
+
338
+ <pre class="prettyprint"><code>const url = sdk.files.downloadUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
339
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
340
+
341
+ const url = sdk.files.downloadUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
342
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
343
+
344
+
345
+
346
+
347
+ <h5>Parameters:</h5>
348
+
349
+
350
+ <table class="params">
351
+ <thead>
352
+ <tr>
353
+
354
+ <th>Name</th>
355
+
356
+
357
+ <th>Type</th>
358
+
359
+
360
+
361
+
362
+
363
+ <th class="last">Description</th>
364
+ </tr>
365
+ </thead>
366
+
367
+ <tbody>
368
+
369
+
370
+ <tr>
371
+
372
+ <td class="name"><code>type</code></td>
373
+
374
+
375
+ <td class="type">
376
+
377
+
378
+ <span class="param-type">String</span>
379
+
380
+
381
+
382
+ </td>
383
+
384
+
385
+
386
+
387
+
388
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
389
+ </tr>
390
+
391
+
392
+
393
+ <tr>
394
+
395
+ <td class="name"><code>id</code></td>
396
+
397
+
398
+ <td class="type">
399
+
400
+
401
+ <span class="param-type">Object</span>
402
+ |
403
+
404
+ <span class="param-type">String</span>
405
+
406
+
407
+
408
+ </td>
409
+
410
+
411
+
412
+
413
+
414
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
415
+ </tr>
416
+
417
+
418
+
419
+ <tr>
420
+
421
+ <td class="name"><code>params</code></td>
422
+
423
+
424
+ <td class="type">
425
+
426
+
427
+ <span class="param-type">Object</span>
428
+
429
+
430
+
431
+ </td>
432
+
433
+
434
+
435
+
436
+
437
+ <td class="description last">Additional parameters and options for the url</td>
438
+ </tr>
439
+
440
+
441
+ </tbody>
442
+ </table>
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+
466
+
467
+ <h4 class="name" id=".duration"><span class="type-signature">(static) </span>duration<span class="signature">(seconds)</span><span class="type-signature"></span></h4>
468
+
469
+
470
+
471
+
472
+
473
+
474
+ <dl class="details">
475
+
476
+
477
+ <dt class="tag-source">Source:</dt>
478
+ <dd class="tag-source"><ul class="dummy"><li>
479
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line46">line 46</a>
480
+ </li></ul></dd>
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+ </dl>
513
+
514
+
515
+
516
+
517
+
518
+ <div class="description usertext">
519
+ Format a number of (seconds) as timecode (01:35)
520
+ </div>
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+ <h5>Example</h5>
531
+
532
+ <pre class="prettyprint"><code>const timecode = sdk.files.formatDuration(392.6)</code></pre>
533
+
534
+
535
+
536
+
537
+ <h5>Parameters:</h5>
538
+
539
+
540
+ <table class="params">
541
+ <thead>
542
+ <tr>
543
+
544
+ <th>Name</th>
545
+
546
+
547
+ <th>Type</th>
548
+
549
+
550
+
551
+
552
+
553
+ <th class="last">Description</th>
554
+ </tr>
555
+ </thead>
556
+
557
+ <tbody>
558
+
559
+
560
+ <tr>
561
+
562
+ <td class="name"><code>seconds</code></td>
563
+
564
+
565
+ <td class="type">
566
+
567
+
568
+ <span class="param-type">Number</span>
569
+
570
+
571
+
572
+ </td>
573
+
574
+
575
+
576
+
577
+
578
+ <td class="description last">The number of seconds</td>
579
+ </tr>
580
+
581
+
582
+ </tbody>
583
+ </table>
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+ <h4 class="name" id=".duration"><span class="type-signature">(static) </span>duration<span class="signature">(seconds)</span><span class="type-signature"></span></h4>
609
+
610
+
611
+
612
+
613
+
614
+
615
+ <dl class="details">
616
+
617
+
618
+ <dt class="tag-source">Source:</dt>
619
+ <dd class="tag-source"><ul class="dummy"><li>
620
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line46">line 46</a>
621
+ </li></ul></dd>
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+ </dl>
654
+
655
+
656
+
657
+
658
+
659
+ <div class="description usertext">
660
+ Format a number of (seconds) as timecode (01:35)
661
+ </div>
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+ <h5>Example</h5>
672
+
673
+ <pre class="prettyprint"><code>const timecode = sdk.files.formatDuration(392.6)</code></pre>
674
+
675
+
676
+
677
+
678
+ <h5>Parameters:</h5>
679
+
680
+
681
+ <table class="params">
682
+ <thead>
683
+ <tr>
684
+
685
+ <th>Name</th>
686
+
687
+
688
+ <th>Type</th>
689
+
690
+
691
+
692
+
693
+
694
+ <th class="last">Description</th>
695
+ </tr>
696
+ </thead>
697
+
698
+ <tbody>
699
+
700
+
701
+ <tr>
702
+
703
+ <td class="name"><code>seconds</code></td>
704
+
705
+
706
+ <td class="type">
707
+
708
+
709
+ <span class="param-type">Number</span>
710
+
711
+
712
+
713
+ </td>
714
+
715
+
716
+
717
+
718
+
719
+ <td class="description last">The number of seconds</td>
720
+ </tr>
721
+
722
+
723
+ </tbody>
724
+ </table>
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+ <h4 class="name" id=".filesize"><span class="type-signature">(static) </span>filesize<span class="signature">(bytes)</span><span class="type-signature"></span></h4>
750
+
751
+
752
+
753
+
754
+
755
+
756
+ <dl class="details">
757
+
758
+
759
+ <dt class="tag-source">Source:</dt>
760
+ <dd class="tag-source"><ul class="dummy"><li>
761
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line105">line 105</a>
762
+ </li></ul></dd>
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
777
+
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+
794
+ </dl>
795
+
796
+
797
+
798
+
799
+
800
+ <div class="description usertext">
801
+ Convert bytes to a human readable file size
802
+ </div>
803
+
804
+
805
+
806
+
807
+
808
+
809
+
810
+
811
+
812
+ <h5>Example</h5>
813
+
814
+ <pre class="prettyprint"><code>const size = sdk.files.filesize(1500);
815
+ // 1.5kb</code></pre>
816
+
817
+
818
+
819
+
820
+ <h5>Parameters:</h5>
821
+
822
+
823
+ <table class="params">
824
+ <thead>
825
+ <tr>
826
+
827
+ <th>Name</th>
828
+
829
+
830
+ <th>Type</th>
831
+
832
+
833
+
834
+
835
+
836
+ <th class="last">Description</th>
837
+ </tr>
838
+ </thead>
839
+
840
+ <tbody>
841
+
842
+
843
+ <tr>
844
+
845
+ <td class="name"><code>bytes</code></td>
846
+
847
+
848
+ <td class="type">
849
+
850
+
851
+ <span class="param-type">Integer</span>
852
+
853
+
854
+
855
+ </td>
856
+
857
+
858
+
859
+
860
+
861
+ <td class="description last">The number of bytes</td>
862
+ </tr>
863
+
864
+
865
+ </tbody>
866
+ </table>
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+
888
+
889
+
890
+
891
+ <h4 class="name" id=".filesize"><span class="type-signature">(static) </span>filesize<span class="signature">(bytes)</span><span class="type-signature"></span></h4>
892
+
893
+
894
+
895
+
896
+
897
+
898
+ <dl class="details">
899
+
900
+
901
+ <dt class="tag-source">Source:</dt>
902
+ <dd class="tag-source"><ul class="dummy"><li>
903
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line105">line 105</a>
904
+ </li></ul></dd>
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+
919
+
920
+
921
+
922
+
923
+
924
+
925
+
926
+
927
+
928
+
929
+
930
+
931
+
932
+
933
+
934
+
935
+
936
+ </dl>
937
+
938
+
939
+
940
+
941
+
942
+ <div class="description usertext">
943
+ Convert bytes to a human readable file size
944
+ </div>
945
+
946
+
947
+
948
+
949
+
950
+
951
+
952
+
953
+
954
+ <h5>Example</h5>
955
+
956
+ <pre class="prettyprint"><code>const size = sdk.files.filesize(1500);
957
+ // 1.5kb</code></pre>
958
+
959
+
960
+
961
+
962
+ <h5>Parameters:</h5>
963
+
964
+
965
+ <table class="params">
966
+ <thead>
967
+ <tr>
968
+
969
+ <th>Name</th>
970
+
971
+
972
+ <th>Type</th>
973
+
974
+
975
+
976
+
977
+
978
+ <th class="last">Description</th>
979
+ </tr>
980
+ </thead>
981
+
982
+ <tbody>
983
+
984
+
985
+ <tr>
986
+
987
+ <td class="name"><code>bytes</code></td>
988
+
989
+
990
+ <td class="type">
991
+
992
+
993
+ <span class="param-type">Integer</span>
994
+
995
+
996
+
997
+ </td>
998
+
999
+
1000
+
1001
+
1002
+
1003
+ <td class="description last">The number of bytes</td>
1004
+ </tr>
1005
+
1006
+
1007
+ </tbody>
1008
+ </table>
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
1033
+ <h4 class="name" id=".getBinaryTypeFromMime"><span class="type-signature">(static) </span>getBinaryTypeFromMime<span class="signature">(fileMime)</span><span class="type-signature"></span></h4>
1034
+
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+ <dl class="details">
1041
+
1042
+
1043
+ <dt class="tag-source">Source:</dt>
1044
+ <dd class="tag-source"><ul class="dummy"><li>
1045
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line128">line 128</a>
1046
+ </li></ul></dd>
1047
+
1048
+
1049
+
1050
+
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+
1057
+
1058
+
1059
+
1060
+
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+
1077
+
1078
+ </dl>
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+ <div class="description usertext">
1085
+ Get the basic primitive type of a file from it's mime type value
1086
+ </div>
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+ <h5>Example</h5>
1097
+
1098
+ <pre class="prettyprint"><code>const type = sdk.files.getBinaryTypeFromMime('image/svg+xml');
1099
+ // 'image'
1100
+
1101
+ const type = sdk.files.getBinaryTypeFromMime('video/webm');
1102
+ // 'video'</code></pre>
1103
+
1104
+
1105
+
1106
+
1107
+ <h5>Parameters:</h5>
1108
+
1109
+
1110
+ <table class="params">
1111
+ <thead>
1112
+ <tr>
1113
+
1114
+ <th>Name</th>
1115
+
1116
+
1117
+ <th>Type</th>
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+ <th class="last">Description</th>
1124
+ </tr>
1125
+ </thead>
1126
+
1127
+ <tbody>
1128
+
1129
+
1130
+ <tr>
1131
+
1132
+ <td class="name"><code>fileMime</code></td>
1133
+
1134
+
1135
+ <td class="type">
1136
+
1137
+
1138
+ <span class="param-type">String</span>
1139
+
1140
+
1141
+
1142
+ </td>
1143
+
1144
+
1145
+
1146
+
1147
+
1148
+ <td class="description last">The mime type of the file</td>
1149
+ </tr>
1150
+
1151
+
1152
+ </tbody>
1153
+ </table>
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+
1178
+ <h4 class="name" id=".getBinaryTypeFromMime"><span class="type-signature">(static) </span>getBinaryTypeFromMime<span class="signature">(fileMime)</span><span class="type-signature"></span></h4>
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+
1185
+ <dl class="details">
1186
+
1187
+
1188
+ <dt class="tag-source">Source:</dt>
1189
+ <dd class="tag-source"><ul class="dummy"><li>
1190
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line128">line 128</a>
1191
+ </li></ul></dd>
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+ </dl>
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+ <div class="description usertext">
1230
+ Get the basic primitive type of a file from it's mime type value
1231
+ </div>
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ <h5>Example</h5>
1242
+
1243
+ <pre class="prettyprint"><code>const type = sdk.files.getBinaryTypeFromMime('image/svg+xml');
1244
+ // 'image'
1245
+
1246
+ const type = sdk.files.getBinaryTypeFromMime('video/webm');
1247
+ // 'video'</code></pre>
1248
+
1249
+
1250
+
1251
+
1252
+ <h5>Parameters:</h5>
1253
+
1254
+
1255
+ <table class="params">
1256
+ <thead>
1257
+ <tr>
1258
+
1259
+ <th>Name</th>
1260
+
1261
+
1262
+ <th>Type</th>
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+ <th class="last">Description</th>
1269
+ </tr>
1270
+ </thead>
1271
+
1272
+ <tbody>
1273
+
1274
+
1275
+ <tr>
1276
+
1277
+ <td class="name"><code>fileMime</code></td>
1278
+
1279
+
1280
+ <td class="type">
1281
+
1282
+
1283
+ <span class="param-type">String</span>
1284
+
1285
+
1286
+
1287
+ </td>
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+ <td class="description last">The mime type of the file</td>
1294
+ </tr>
1295
+
1296
+
1297
+ </tbody>
1298
+ </table>
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+ <h4 class="name" id=".mediaUrl"><span class="type-signature">(static) </span>mediaUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+ <dl class="details">
1331
+
1332
+
1333
+ <dt class="tag-source">Source:</dt>
1334
+ <dd class="tag-source"><ul class="dummy"><li>
1335
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line77">line 77</a>
1336
+ </li></ul></dd>
1337
+
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+ </dl>
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+ <div class="description usertext">
1375
+ Get a valid media url for a specified image, video or audio item
1376
+ </div>
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+ <h5>Example</h5>
1387
+
1388
+ <pre class="prettyprint"><code>const url = sdk.files.mediaUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
1389
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
1390
+
1391
+ const url = sdk.files.mediaUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
1392
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
1393
+
1394
+
1395
+
1396
+
1397
+ <h5>Parameters:</h5>
1398
+
1399
+
1400
+ <table class="params">
1401
+ <thead>
1402
+ <tr>
1403
+
1404
+ <th>Name</th>
1405
+
1406
+
1407
+ <th>Type</th>
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+ <th class="last">Description</th>
1414
+ </tr>
1415
+ </thead>
1416
+
1417
+ <tbody>
1418
+
1419
+
1420
+ <tr>
1421
+
1422
+ <td class="name"><code>type</code></td>
1423
+
1424
+
1425
+ <td class="type">
1426
+
1427
+
1428
+ <span class="param-type">String</span>
1429
+
1430
+
1431
+
1432
+ </td>
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
1439
+ </tr>
1440
+
1441
+
1442
+
1443
+ <tr>
1444
+
1445
+ <td class="name"><code>id</code></td>
1446
+
1447
+
1448
+ <td class="type">
1449
+
1450
+
1451
+ <span class="param-type">Object</span>
1452
+ |
1453
+
1454
+ <span class="param-type">String</span>
1455
+
1456
+
1457
+
1458
+ </td>
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
1465
+ </tr>
1466
+
1467
+
1468
+
1469
+ <tr>
1470
+
1471
+ <td class="name"><code>params</code></td>
1472
+
1473
+
1474
+ <td class="type">
1475
+
1476
+
1477
+ <span class="param-type">Object</span>
1478
+
1479
+
1480
+
1481
+ </td>
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+ <td class="description last">Additional parameters and options for the url</td>
1488
+ </tr>
1489
+
1490
+
1491
+ </tbody>
1492
+ </table>
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+ <h4 class="name" id=".mediaUrl"><span class="type-signature">(static) </span>mediaUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
1518
+
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+ <dl class="details">
1525
+
1526
+
1527
+ <dt class="tag-source">Source:</dt>
1528
+ <dd class="tag-source"><ul class="dummy"><li>
1529
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line77">line 77</a>
1530
+ </li></ul></dd>
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+
1554
+
1555
+
1556
+
1557
+
1558
+
1559
+
1560
+
1561
+
1562
+ </dl>
1563
+
1564
+
1565
+
1566
+
1567
+
1568
+ <div class="description usertext">
1569
+ Get a valid media url for a specified image, video or audio item
1570
+ </div>
1571
+
1572
+
1573
+
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+
1580
+ <h5>Example</h5>
1581
+
1582
+ <pre class="prettyprint"><code>const url = sdk.files.mediaUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
1583
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
1584
+
1585
+ const url = sdk.files.mediaUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
1586
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
1587
+
1588
+
1589
+
1590
+
1591
+ <h5>Parameters:</h5>
1592
+
1593
+
1594
+ <table class="params">
1595
+ <thead>
1596
+ <tr>
1597
+
1598
+ <th>Name</th>
1599
+
1600
+
1601
+ <th>Type</th>
1602
+
1603
+
1604
+
1605
+
1606
+
1607
+ <th class="last">Description</th>
1608
+ </tr>
1609
+ </thead>
1610
+
1611
+ <tbody>
1612
+
1613
+
1614
+ <tr>
1615
+
1616
+ <td class="name"><code>type</code></td>
1617
+
1618
+
1619
+ <td class="type">
1620
+
1621
+
1622
+ <span class="param-type">String</span>
1623
+
1624
+
1625
+
1626
+ </td>
1627
+
1628
+
1629
+
1630
+
1631
+
1632
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
1633
+ </tr>
1634
+
1635
+
1636
+
1637
+ <tr>
1638
+
1639
+ <td class="name"><code>id</code></td>
1640
+
1641
+
1642
+ <td class="type">
1643
+
1644
+
1645
+ <span class="param-type">Object</span>
1646
+ |
1647
+
1648
+ <span class="param-type">String</span>
1649
+
1650
+
1651
+
1652
+ </td>
1653
+
1654
+
1655
+
1656
+
1657
+
1658
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
1659
+ </tr>
1660
+
1661
+
1662
+
1663
+ <tr>
1664
+
1665
+ <td class="name"><code>params</code></td>
1666
+
1667
+
1668
+ <td class="type">
1669
+
1670
+
1671
+ <span class="param-type">Object</span>
1672
+
1673
+
1674
+
1675
+ </td>
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+ <td class="description last">Additional parameters and options for the url</td>
1682
+ </tr>
1683
+
1684
+
1685
+ </tbody>
1686
+ </table>
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+
1710
+
1711
+
1712
+ </article>
1713
+
1714
+ </section>
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+
1722
+ <section>
1723
+
1724
+ <header>
1725
+
1726
+ <h2>
1727
+ files
1728
+ </h2>
1729
+
1730
+
1731
+ </header>
1732
+
1733
+ <article>
1734
+
1735
+
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+ <h3 class="subsection-title">Methods</h3>
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+ <h4 class="name" id=".downloadUrl"><span class="type-signature">(static) </span>downloadUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+ <dl class="details">
1766
+
1767
+
1768
+ <dt class="tag-source">Source:</dt>
1769
+ <dd class="tag-source"><ul class="dummy"><li>
1770
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line30">line 30</a>
1771
+ </li></ul></dd>
1772
+
1773
+
1774
+
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+
1787
+
1788
+
1789
+
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+ </dl>
1804
+
1805
+
1806
+
1807
+
1808
+
1809
+ <div class="description usertext">
1810
+ Get a valid download url for a specified record
1811
+ </div>
1812
+
1813
+
1814
+
1815
+
1816
+
1817
+
1818
+
1819
+
1820
+
1821
+ <h5>Example</h5>
1822
+
1823
+ <pre class="prettyprint"><code>const url = sdk.files.downloadUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
1824
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
1825
+
1826
+ const url = sdk.files.downloadUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
1827
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
1828
+
1829
+
1830
+
1831
+
1832
+ <h5>Parameters:</h5>
1833
+
1834
+
1835
+ <table class="params">
1836
+ <thead>
1837
+ <tr>
1838
+
1839
+ <th>Name</th>
1840
+
1841
+
1842
+ <th>Type</th>
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+ <th class="last">Description</th>
1849
+ </tr>
1850
+ </thead>
1851
+
1852
+ <tbody>
1853
+
1854
+
1855
+ <tr>
1856
+
1857
+ <td class="name"><code>type</code></td>
1858
+
1859
+
1860
+ <td class="type">
1861
+
1862
+
1863
+ <span class="param-type">String</span>
1864
+
1865
+
1866
+
1867
+ </td>
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
1874
+ </tr>
1875
+
1876
+
1877
+
1878
+ <tr>
1879
+
1880
+ <td class="name"><code>id</code></td>
1881
+
1882
+
1883
+ <td class="type">
1884
+
1885
+
1886
+ <span class="param-type">Object</span>
1887
+ |
1888
+
1889
+ <span class="param-type">String</span>
1890
+
1891
+
1892
+
1893
+ </td>
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
1900
+ </tr>
1901
+
1902
+
1903
+
1904
+ <tr>
1905
+
1906
+ <td class="name"><code>params</code></td>
1907
+
1908
+
1909
+ <td class="type">
1910
+
1911
+
1912
+ <span class="param-type">Object</span>
1913
+
1914
+
1915
+
1916
+ </td>
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+ <td class="description last">Additional parameters and options for the url</td>
1923
+ </tr>
1924
+
1925
+
1926
+ </tbody>
1927
+ </table>
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+
1951
+
1952
+ <h4 class="name" id=".downloadUrl"><span class="type-signature">(static) </span>downloadUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
1953
+
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+ <dl class="details">
1960
+
1961
+
1962
+ <dt class="tag-source">Source:</dt>
1963
+ <dd class="tag-source"><ul class="dummy"><li>
1964
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line30">line 30</a>
1965
+ </li></ul></dd>
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+
1972
+
1973
+
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+
1996
+
1997
+ </dl>
1998
+
1999
+
2000
+
2001
+
2002
+
2003
+ <div class="description usertext">
2004
+ Get a valid download url for a specified record
2005
+ </div>
2006
+
2007
+
2008
+
2009
+
2010
+
2011
+
2012
+
2013
+
2014
+
2015
+ <h5>Example</h5>
2016
+
2017
+ <pre class="prettyprint"><code>const url = sdk.files.downloadUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
2018
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
2019
+
2020
+ const url = sdk.files.downloadUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
2021
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
2022
+
2023
+
2024
+
2025
+
2026
+ <h5>Parameters:</h5>
2027
+
2028
+
2029
+ <table class="params">
2030
+ <thead>
2031
+ <tr>
2032
+
2033
+ <th>Name</th>
2034
+
2035
+
2036
+ <th>Type</th>
2037
+
2038
+
2039
+
2040
+
2041
+
2042
+ <th class="last">Description</th>
2043
+ </tr>
2044
+ </thead>
2045
+
2046
+ <tbody>
2047
+
2048
+
2049
+ <tr>
2050
+
2051
+ <td class="name"><code>type</code></td>
2052
+
2053
+
2054
+ <td class="type">
2055
+
2056
+
2057
+ <span class="param-type">String</span>
2058
+
2059
+
2060
+
2061
+ </td>
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
2068
+ </tr>
2069
+
2070
+
2071
+
2072
+ <tr>
2073
+
2074
+ <td class="name"><code>id</code></td>
2075
+
2076
+
2077
+ <td class="type">
2078
+
2079
+
2080
+ <span class="param-type">Object</span>
2081
+ |
2082
+
2083
+ <span class="param-type">String</span>
2084
+
2085
+
2086
+
2087
+ </td>
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
2094
+ </tr>
2095
+
2096
+
2097
+
2098
+ <tr>
2099
+
2100
+ <td class="name"><code>params</code></td>
2101
+
2102
+
2103
+ <td class="type">
2104
+
2105
+
2106
+ <span class="param-type">Object</span>
2107
+
2108
+
2109
+
2110
+ </td>
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+ <td class="description last">Additional parameters and options for the url</td>
2117
+ </tr>
2118
+
2119
+
2120
+ </tbody>
2121
+ </table>
2122
+
2123
+
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+
2130
+
2131
+
2132
+
2133
+
2134
+
2135
+
2136
+
2137
+
2138
+
2139
+
2140
+
2141
+
2142
+
2143
+
2144
+
2145
+
2146
+ <h4 class="name" id=".duration"><span class="type-signature">(static) </span>duration<span class="signature">(seconds)</span><span class="type-signature"></span></h4>
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+ <dl class="details">
2154
+
2155
+
2156
+ <dt class="tag-source">Source:</dt>
2157
+ <dd class="tag-source"><ul class="dummy"><li>
2158
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line46">line 46</a>
2159
+ </li></ul></dd>
2160
+
2161
+
2162
+
2163
+
2164
+
2165
+
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+ </dl>
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+ <div class="description usertext">
2198
+ Format a number of (seconds) as timecode (01:35)
2199
+ </div>
2200
+
2201
+
2202
+
2203
+
2204
+
2205
+
2206
+
2207
+
2208
+
2209
+ <h5>Example</h5>
2210
+
2211
+ <pre class="prettyprint"><code>const timecode = sdk.files.formatDuration(392.6)</code></pre>
2212
+
2213
+
2214
+
2215
+
2216
+ <h5>Parameters:</h5>
2217
+
2218
+
2219
+ <table class="params">
2220
+ <thead>
2221
+ <tr>
2222
+
2223
+ <th>Name</th>
2224
+
2225
+
2226
+ <th>Type</th>
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+ <th class="last">Description</th>
2233
+ </tr>
2234
+ </thead>
2235
+
2236
+ <tbody>
2237
+
2238
+
2239
+ <tr>
2240
+
2241
+ <td class="name"><code>seconds</code></td>
2242
+
2243
+
2244
+ <td class="type">
2245
+
2246
+
2247
+ <span class="param-type">Number</span>
2248
+
2249
+
2250
+
2251
+ </td>
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+ <td class="description last">The number of seconds</td>
2258
+ </tr>
2259
+
2260
+
2261
+ </tbody>
2262
+ </table>
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+ <h4 class="name" id=".duration"><span class="type-signature">(static) </span>duration<span class="signature">(seconds)</span><span class="type-signature"></span></h4>
2288
+
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+ <dl class="details">
2295
+
2296
+
2297
+ <dt class="tag-source">Source:</dt>
2298
+ <dd class="tag-source"><ul class="dummy"><li>
2299
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line46">line 46</a>
2300
+ </li></ul></dd>
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+
2316
+
2317
+
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+
2331
+
2332
+ </dl>
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+ <div class="description usertext">
2339
+ Format a number of (seconds) as timecode (01:35)
2340
+ </div>
2341
+
2342
+
2343
+
2344
+
2345
+
2346
+
2347
+
2348
+
2349
+
2350
+ <h5>Example</h5>
2351
+
2352
+ <pre class="prettyprint"><code>const timecode = sdk.files.formatDuration(392.6)</code></pre>
2353
+
2354
+
2355
+
2356
+
2357
+ <h5>Parameters:</h5>
2358
+
2359
+
2360
+ <table class="params">
2361
+ <thead>
2362
+ <tr>
2363
+
2364
+ <th>Name</th>
2365
+
2366
+
2367
+ <th>Type</th>
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+ <th class="last">Description</th>
2374
+ </tr>
2375
+ </thead>
2376
+
2377
+ <tbody>
2378
+
2379
+
2380
+ <tr>
2381
+
2382
+ <td class="name"><code>seconds</code></td>
2383
+
2384
+
2385
+ <td class="type">
2386
+
2387
+
2388
+ <span class="param-type">Number</span>
2389
+
2390
+
2391
+
2392
+ </td>
2393
+
2394
+
2395
+
2396
+
2397
+
2398
+ <td class="description last">The number of seconds</td>
2399
+ </tr>
2400
+
2401
+
2402
+ </tbody>
2403
+ </table>
2404
+
2405
+
2406
+
2407
+
2408
+
2409
+
2410
+
2411
+
2412
+
2413
+
2414
+
2415
+
2416
+
2417
+
2418
+
2419
+
2420
+
2421
+
2422
+
2423
+
2424
+
2425
+
2426
+
2427
+
2428
+ <h4 class="name" id=".filesize"><span class="type-signature">(static) </span>filesize<span class="signature">(bytes)</span><span class="type-signature"></span></h4>
2429
+
2430
+
2431
+
2432
+
2433
+
2434
+
2435
+ <dl class="details">
2436
+
2437
+
2438
+ <dt class="tag-source">Source:</dt>
2439
+ <dd class="tag-source"><ul class="dummy"><li>
2440
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line105">line 105</a>
2441
+ </li></ul></dd>
2442
+
2443
+
2444
+
2445
+
2446
+
2447
+
2448
+
2449
+
2450
+
2451
+
2452
+
2453
+
2454
+
2455
+
2456
+
2457
+
2458
+
2459
+
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+
2466
+
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+
2473
+ </dl>
2474
+
2475
+
2476
+
2477
+
2478
+
2479
+ <div class="description usertext">
2480
+ Convert bytes to a human readable file size
2481
+ </div>
2482
+
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+ <h5>Example</h5>
2492
+
2493
+ <pre class="prettyprint"><code>const size = sdk.files.filesize(1500);
2494
+ // 1.5kb</code></pre>
2495
+
2496
+
2497
+
2498
+
2499
+ <h5>Parameters:</h5>
2500
+
2501
+
2502
+ <table class="params">
2503
+ <thead>
2504
+ <tr>
2505
+
2506
+ <th>Name</th>
2507
+
2508
+
2509
+ <th>Type</th>
2510
+
2511
+
2512
+
2513
+
2514
+
2515
+ <th class="last">Description</th>
2516
+ </tr>
2517
+ </thead>
2518
+
2519
+ <tbody>
2520
+
2521
+
2522
+ <tr>
2523
+
2524
+ <td class="name"><code>bytes</code></td>
2525
+
2526
+
2527
+ <td class="type">
2528
+
2529
+
2530
+ <span class="param-type">Integer</span>
2531
+
2532
+
2533
+
2534
+ </td>
2535
+
2536
+
2537
+
2538
+
2539
+
2540
+ <td class="description last">The number of bytes</td>
2541
+ </tr>
2542
+
2543
+
2544
+ </tbody>
2545
+ </table>
2546
+
2547
+
2548
+
2549
+
2550
+
2551
+
2552
+
2553
+
2554
+
2555
+
2556
+
2557
+
2558
+
2559
+
2560
+
2561
+
2562
+
2563
+
2564
+
2565
+
2566
+
2567
+
2568
+
2569
+
2570
+ <h4 class="name" id=".filesize"><span class="type-signature">(static) </span>filesize<span class="signature">(bytes)</span><span class="type-signature"></span></h4>
2571
+
2572
+
2573
+
2574
+
2575
+
2576
+
2577
+ <dl class="details">
2578
+
2579
+
2580
+ <dt class="tag-source">Source:</dt>
2581
+ <dd class="tag-source"><ul class="dummy"><li>
2582
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line105">line 105</a>
2583
+ </li></ul></dd>
2584
+
2585
+
2586
+
2587
+
2588
+
2589
+
2590
+
2591
+
2592
+
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+
2599
+
2600
+
2601
+
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+
2608
+
2609
+
2610
+
2611
+
2612
+
2613
+
2614
+
2615
+ </dl>
2616
+
2617
+
2618
+
2619
+
2620
+
2621
+ <div class="description usertext">
2622
+ Convert bytes to a human readable file size
2623
+ </div>
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+ <h5>Example</h5>
2634
+
2635
+ <pre class="prettyprint"><code>const size = sdk.files.filesize(1500);
2636
+ // 1.5kb</code></pre>
2637
+
2638
+
2639
+
2640
+
2641
+ <h5>Parameters:</h5>
2642
+
2643
+
2644
+ <table class="params">
2645
+ <thead>
2646
+ <tr>
2647
+
2648
+ <th>Name</th>
2649
+
2650
+
2651
+ <th>Type</th>
2652
+
2653
+
2654
+
2655
+
2656
+
2657
+ <th class="last">Description</th>
2658
+ </tr>
2659
+ </thead>
2660
+
2661
+ <tbody>
2662
+
2663
+
2664
+ <tr>
2665
+
2666
+ <td class="name"><code>bytes</code></td>
2667
+
2668
+
2669
+ <td class="type">
2670
+
2671
+
2672
+ <span class="param-type">Integer</span>
2673
+
2674
+
2675
+
2676
+ </td>
2677
+
2678
+
2679
+
2680
+
2681
+
2682
+ <td class="description last">The number of bytes</td>
2683
+ </tr>
2684
+
2685
+
2686
+ </tbody>
2687
+ </table>
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+
2698
+
2699
+
2700
+
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+
2709
+
2710
+
2711
+
2712
+ <h4 class="name" id=".getBinaryTypeFromMime"><span class="type-signature">(static) </span>getBinaryTypeFromMime<span class="signature">(fileMime)</span><span class="type-signature"></span></h4>
2713
+
2714
+
2715
+
2716
+
2717
+
2718
+
2719
+ <dl class="details">
2720
+
2721
+
2722
+ <dt class="tag-source">Source:</dt>
2723
+ <dd class="tag-source"><ul class="dummy"><li>
2724
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line128">line 128</a>
2725
+ </li></ul></dd>
2726
+
2727
+
2728
+
2729
+
2730
+
2731
+
2732
+
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+
2740
+
2741
+
2742
+
2743
+
2744
+
2745
+
2746
+
2747
+
2748
+
2749
+
2750
+
2751
+
2752
+
2753
+
2754
+
2755
+
2756
+
2757
+ </dl>
2758
+
2759
+
2760
+
2761
+
2762
+
2763
+ <div class="description usertext">
2764
+ Get the basic primitive type of a file from it's mime type value
2765
+ </div>
2766
+
2767
+
2768
+
2769
+
2770
+
2771
+
2772
+
2773
+
2774
+
2775
+ <h5>Example</h5>
2776
+
2777
+ <pre class="prettyprint"><code>const type = sdk.files.getBinaryTypeFromMime('image/svg+xml');
2778
+ // 'image'
2779
+
2780
+ const type = sdk.files.getBinaryTypeFromMime('video/webm');
2781
+ // 'video'</code></pre>
2782
+
2783
+
2784
+
2785
+
2786
+ <h5>Parameters:</h5>
2787
+
2788
+
2789
+ <table class="params">
2790
+ <thead>
2791
+ <tr>
2792
+
2793
+ <th>Name</th>
2794
+
2795
+
2796
+ <th>Type</th>
2797
+
2798
+
2799
+
2800
+
2801
+
2802
+ <th class="last">Description</th>
2803
+ </tr>
2804
+ </thead>
2805
+
2806
+ <tbody>
2807
+
2808
+
2809
+ <tr>
2810
+
2811
+ <td class="name"><code>fileMime</code></td>
2812
+
2813
+
2814
+ <td class="type">
2815
+
2816
+
2817
+ <span class="param-type">String</span>
2818
+
2819
+
2820
+
2821
+ </td>
2822
+
2823
+
2824
+
2825
+
2826
+
2827
+ <td class="description last">The mime type of the file</td>
2828
+ </tr>
2829
+
2830
+
2831
+ </tbody>
2832
+ </table>
2833
+
2834
+
2835
+
2836
+
2837
+
2838
+
2839
+
2840
+
2841
+
2842
+
2843
+
2844
+
2845
+
2846
+
2847
+
2848
+
2849
+
2850
+
2851
+
2852
+
2853
+
2854
+
2855
+
2856
+
2857
+ <h4 class="name" id=".getBinaryTypeFromMime"><span class="type-signature">(static) </span>getBinaryTypeFromMime<span class="signature">(fileMime)</span><span class="type-signature"></span></h4>
2858
+
2859
+
2860
+
2861
+
2862
+
2863
+
2864
+ <dl class="details">
2865
+
2866
+
2867
+ <dt class="tag-source">Source:</dt>
2868
+ <dd class="tag-source"><ul class="dummy"><li>
2869
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line128">line 128</a>
2870
+ </li></ul></dd>
2871
+
2872
+
2873
+
2874
+
2875
+
2876
+
2877
+
2878
+
2879
+
2880
+
2881
+
2882
+
2883
+
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+
2891
+
2892
+
2893
+
2894
+
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+
2901
+
2902
+ </dl>
2903
+
2904
+
2905
+
2906
+
2907
+
2908
+ <div class="description usertext">
2909
+ Get the basic primitive type of a file from it's mime type value
2910
+ </div>
2911
+
2912
+
2913
+
2914
+
2915
+
2916
+
2917
+
2918
+
2919
+
2920
+ <h5>Example</h5>
2921
+
2922
+ <pre class="prettyprint"><code>const type = sdk.files.getBinaryTypeFromMime('image/svg+xml');
2923
+ // 'image'
2924
+
2925
+ const type = sdk.files.getBinaryTypeFromMime('video/webm');
2926
+ // 'video'</code></pre>
2927
+
2928
+
2929
+
2930
+
2931
+ <h5>Parameters:</h5>
2932
+
2933
+
2934
+ <table class="params">
2935
+ <thead>
2936
+ <tr>
2937
+
2938
+ <th>Name</th>
2939
+
2940
+
2941
+ <th>Type</th>
2942
+
2943
+
2944
+
2945
+
2946
+
2947
+ <th class="last">Description</th>
2948
+ </tr>
2949
+ </thead>
2950
+
2951
+ <tbody>
2952
+
2953
+
2954
+ <tr>
2955
+
2956
+ <td class="name"><code>fileMime</code></td>
2957
+
2958
+
2959
+ <td class="type">
2960
+
2961
+
2962
+ <span class="param-type">String</span>
2963
+
2964
+
2965
+
2966
+ </td>
2967
+
2968
+
2969
+
2970
+
2971
+
2972
+ <td class="description last">The mime type of the file</td>
2973
+ </tr>
2974
+
2975
+
2976
+ </tbody>
2977
+ </table>
2978
+
2979
+
2980
+
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+
2988
+
2989
+
2990
+
2991
+
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+ <h4 class="name" id=".mediaUrl"><span class="type-signature">(static) </span>mediaUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
3003
+
3004
+
3005
+
3006
+
3007
+
3008
+
3009
+ <dl class="details">
3010
+
3011
+
3012
+ <dt class="tag-source">Source:</dt>
3013
+ <dd class="tag-source"><ul class="dummy"><li>
3014
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line77">line 77</a>
3015
+ </li></ul></dd>
3016
+
3017
+
3018
+
3019
+
3020
+
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+
3027
+
3028
+
3029
+
3030
+
3031
+
3032
+
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+ </dl>
3048
+
3049
+
3050
+
3051
+
3052
+
3053
+ <div class="description usertext">
3054
+ Get a valid media url for a specified image, video or audio item
3055
+ </div>
3056
+
3057
+
3058
+
3059
+
3060
+
3061
+
3062
+
3063
+
3064
+
3065
+ <h5>Example</h5>
3066
+
3067
+ <pre class="prettyprint"><code>const url = sdk.files.mediaUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
3068
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
3069
+
3070
+ const url = sdk.files.mediaUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
3071
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
3072
+
3073
+
3074
+
3075
+
3076
+ <h5>Parameters:</h5>
3077
+
3078
+
3079
+ <table class="params">
3080
+ <thead>
3081
+ <tr>
3082
+
3083
+ <th>Name</th>
3084
+
3085
+
3086
+ <th>Type</th>
3087
+
3088
+
3089
+
3090
+
3091
+
3092
+ <th class="last">Description</th>
3093
+ </tr>
3094
+ </thead>
3095
+
3096
+ <tbody>
3097
+
3098
+
3099
+ <tr>
3100
+
3101
+ <td class="name"><code>type</code></td>
3102
+
3103
+
3104
+ <td class="type">
3105
+
3106
+
3107
+ <span class="param-type">String</span>
3108
+
3109
+
3110
+
3111
+ </td>
3112
+
3113
+
3114
+
3115
+
3116
+
3117
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
3118
+ </tr>
3119
+
3120
+
3121
+
3122
+ <tr>
3123
+
3124
+ <td class="name"><code>id</code></td>
3125
+
3126
+
3127
+ <td class="type">
3128
+
3129
+
3130
+ <span class="param-type">Object</span>
3131
+ |
3132
+
3133
+ <span class="param-type">String</span>
3134
+
3135
+
3136
+
3137
+ </td>
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
3144
+ </tr>
3145
+
3146
+
3147
+
3148
+ <tr>
3149
+
3150
+ <td class="name"><code>params</code></td>
3151
+
3152
+
3153
+ <td class="type">
3154
+
3155
+
3156
+ <span class="param-type">Object</span>
3157
+
3158
+
3159
+
3160
+ </td>
3161
+
3162
+
3163
+
3164
+
3165
+
3166
+ <td class="description last">Additional parameters and options for the url</td>
3167
+ </tr>
3168
+
3169
+
3170
+ </tbody>
3171
+ </table>
3172
+
3173
+
3174
+
3175
+
3176
+
3177
+
3178
+
3179
+
3180
+
3181
+
3182
+
3183
+
3184
+
3185
+
3186
+
3187
+
3188
+
3189
+
3190
+
3191
+
3192
+
3193
+
3194
+
3195
+
3196
+ <h4 class="name" id=".mediaUrl"><span class="type-signature">(static) </span>mediaUrl<span class="signature">(type, id, params)</span><span class="type-signature"></span></h4>
3197
+
3198
+
3199
+
3200
+
3201
+
3202
+
3203
+ <dl class="details">
3204
+
3205
+
3206
+ <dt class="tag-source">Source:</dt>
3207
+ <dd class="tag-source"><ul class="dummy"><li>
3208
+ <a href="qik.files.js.html">qik.files.js</a>, <a href="qik.files.js.html#line77">line 77</a>
3209
+ </li></ul></dd>
3210
+
3211
+
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3218
+
3219
+
3220
+
3221
+
3222
+
3223
+
3224
+
3225
+
3226
+
3227
+
3228
+
3229
+
3230
+
3231
+
3232
+
3233
+
3234
+
3235
+
3236
+
3237
+
3238
+
3239
+
3240
+
3241
+ </dl>
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+ <div class="description usertext">
3248
+ Get a valid media url for a specified image, video or audio item
3249
+ </div>
3250
+
3251
+
3252
+
3253
+
3254
+
3255
+
3256
+
3257
+
3258
+
3259
+ <h5>Example</h5>
3260
+
3261
+ <pre class="prettyprint"><code>const url = sdk.files.mediaUrl('image', '61eca4746971e75c1fc670cf', {w:100, h:100});
3262
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true
3263
+
3264
+ const url = sdk.files.mediaUrl('image', {_id:'61eca4746971e75c1fc670cf'...}, {f:'png'});
3265
+ // https://api.qik.dev/image/61eca4746971e75c1fc670cf?w=100&amp;h=100&amp;download=true</code></pre>
3266
+
3267
+
3268
+
3269
+
3270
+ <h5>Parameters:</h5>
3271
+
3272
+
3273
+ <table class="params">
3274
+ <thead>
3275
+ <tr>
3276
+
3277
+ <th>Name</th>
3278
+
3279
+
3280
+ <th>Type</th>
3281
+
3282
+
3283
+
3284
+
3285
+
3286
+ <th class="last">Description</th>
3287
+ </tr>
3288
+ </thead>
3289
+
3290
+ <tbody>
3291
+
3292
+
3293
+ <tr>
3294
+
3295
+ <td class="name"><code>type</code></td>
3296
+
3297
+
3298
+ <td class="type">
3299
+
3300
+
3301
+ <span class="param-type">String</span>
3302
+
3303
+
3304
+
3305
+ </td>
3306
+
3307
+
3308
+
3309
+
3310
+
3311
+ <td class="description last">The type or definition of the item we want to generate the url for</td>
3312
+ </tr>
3313
+
3314
+
3315
+
3316
+ <tr>
3317
+
3318
+ <td class="name"><code>id</code></td>
3319
+
3320
+
3321
+ <td class="type">
3322
+
3323
+
3324
+ <span class="param-type">Object</span>
3325
+ |
3326
+
3327
+ <span class="param-type">String</span>
3328
+
3329
+
3330
+
3331
+ </td>
3332
+
3333
+
3334
+
3335
+
3336
+
3337
+ <td class="description last">The id or object with an _id property that we want to generate the url for</td>
3338
+ </tr>
3339
+
3340
+
3341
+
3342
+ <tr>
3343
+
3344
+ <td class="name"><code>params</code></td>
3345
+
3346
+
3347
+ <td class="type">
3348
+
3349
+
3350
+ <span class="param-type">Object</span>
3351
+
3352
+
3353
+
3354
+ </td>
3355
+
3356
+
3357
+
3358
+
3359
+
3360
+ <td class="description last">Additional parameters and options for the url</td>
3361
+ </tr>
3362
+
3363
+
3364
+ </tbody>
3365
+ </table>
3366
+
3367
+
3368
+
3369
+
3370
+
3371
+
3372
+
3373
+
3374
+
3375
+
3376
+
3377
+
3378
+
3379
+
3380
+
3381
+
3382
+
3383
+
3384
+
3385
+
3386
+
3387
+
3388
+
3389
+
3390
+
3391
+ </article>
3392
+
3393
+ </section>
3394
+
3395
+
3396
+
3397
+
3398
+
3399
+
3400
+ </div>
3401
+
3402
+ <br class="clear">
3403
+
3404
+ <footer>
3405
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jun 01 2026 23:37:17 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
3406
+ </footer>
3407
+
3408
+ <script>prettyPrint();</script>
3409
+ <script src="scripts/polyfill.js"></script>
3410
+ <script src="scripts/linenumber.js"></script>
3411
+
3412
+
3413
+
3414
+ </body>
3415
+ </html>