@robinbobin/react-native-google-drive-api-wrapper
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -34,3 +34,5 @@ import HttpError from "../../HttpError"; | ||
setTimeout(() => this.__abortController.abort(), this.__gDriveApi.fetchTimeout); | ||
if (this.__gDriveApi.fetchTimeout >= 0) { | ||
setTimeout(() => this.__abortController.abort(), this.__gDriveApi.fetchTimeout); | ||
} | ||
@@ -37,0 +39,0 @@ let response = await fetch(this.__resource, this.__init); |
@@ -27,3 +27,3 @@ { | ||
}, | ||
"version": "1.0.1" | ||
"version": "1.1.0" | ||
} |
@@ -15,5 +15,5 @@ This wrapper facilitates the use of the [google drive api](https://developers.google.com/drive/v3/reference/). | ||
An example [project](https://github.com/RobinBobin/gdrivetest). | ||
If something doesn't work as expected, please do have a look at an example [project](https://github.com/RobinBobin/gdrivetest) before opening an issue. | ||
Example: | ||
Quick example: | ||
@@ -116,3 +116,3 @@ // = List files, create a binary file and read it = // | ||
<a name="gdriveapi_fetch_rejects_on_http_errors"></a>fetchRejectsOnHttpErrors|Boolean (read/write property)|If true, unsuccessful api calls throw an instance of [`HttpError`](#http_error). If `false`, the result of [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) is returned as is. The default value is `true`. | ||
<a name="gdriveapi_fetch_timeout"></a>fetchTimeout|Number (read/write property)|Timeout in ms for [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) invocations. The default value is `1500`. | ||
<a name="gdriveapi_fetch_timeout"></a>fetchTimeout|Number (read/write property)|Timeout in ms for [`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) invocations. The default value is `1500`. If the value is negative, `fetch()` will wait infinitely. | ||
@@ -136,2 +136,3 @@ #### <a name="http_error"></a>[HttpError](#c_http_error) | ||
// = List files contained in the root folder and named "Untitled" = // | ||
const folderIdNotItsName = "root"; | ||
@@ -142,3 +143,3 @@ await gdrive.files.list({ | ||
.and() | ||
.in("root", "parents") | ||
.in(folderIdNotItsName, "parents") | ||
}); | ||
@@ -210,2 +211,3 @@ | ||
-|- | ||
v1.1.0|[`GDriveApi.fetchTimeout`](#gdriveapi_fetch_timeout) can be set to a negative value to make `fetch()` wait infinitely. | ||
v1.0.1|My example [repo](https://github.com/RobinBobin/gdrivetest) for this package is referenced in the readme. | ||
@@ -212,0 +214,0 @@ v1.0.0|1. [`GDriveApi.fetchTimeout`](#gdriveapi_fetch_timeout) added.<br>2. [`HttpError`](#http_error) and [`UnexpectedFileCountError`](#unexpected_file_count_error): prototype names are specified and error messages are made more concise. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33043
558
219