(base, dbName, collectionName, queryOptions = {})
| 96 | }; |
| 97 | |
| 98 | export const buildCollectionURL = function (base, dbName, collectionName, queryOptions = {}) { |
| 99 | let url = buildDatabaseURL(base, dbName) + '/' + encodeURIComponent(collectionName); |
| 100 | |
| 101 | if (Object.keys(queryOptions).length > 0) { |
| 102 | url += '?' + querystring.encode(queryOptions); |
| 103 | } |
| 104 | return url; |
| 105 | }; |
| 106 | |
| 107 | export const buildDocumentURL = function (base, dbName, collectionName, documentId, queryOptions = {}) { |
| 108 | let url = buildCollectionURL(base, dbName, collectionName) + '/' + encodeURIComponent(JSON.stringify(documentId)); |
no test coverage detected