Skip to content

Commit 0816819

Browse files
Merge pull request #59 from appwrite/dev
chore: regenerate sdk
2 parents b1dd444 + 1068161 commit 0816819

File tree

6 files changed

+455
-32
lines changed

6 files changed

+455
-32
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Change log
22

3+
## 0.10.0
4+
5+
* Add generate file URL methods like`getFilePreviewURL`, `getFileViewURL` etc.
6+
* Update (breaking) existing methods like `getFilePreview` to download the image instead of returning URLs
7+
8+
## 0.9.2
9+
10+
* Fix `devKeys` by removing credentials from requests when the key is set
11+
12+
## 0.9.1
13+
14+
* Add `setDevkey` and `upsertDocument` methods
15+
316
## 0.9.0
417

518
* Add `token` param to `getFilePreview` and `getFileView` for File tokens usage

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite React Native SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-react-native.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-native-appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "0.9.2",
5+
"version": "0.10.0",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

src/client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Client {
115115
'x-sdk-name': 'React Native',
116116
'x-sdk-platform': 'client',
117117
'x-sdk-language': 'reactnative',
118-
'x-sdk-version': '0.9.2',
118+
'x-sdk-version': '0.10.0',
119119
'X-Appwrite-Response-Format': '1.7.0',
120120
};
121121

@@ -432,7 +432,7 @@ class Client {
432432
}
433433
}
434434

435-
async call(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<any> {
435+
async call(method: string, url: URL, headers: Headers = {}, params: Payload = {}, responseType = 'json'): Promise<any> {
436436
method = method.toUpperCase();
437437

438438
headers = Object.assign({}, this.headers, headers);
@@ -488,6 +488,8 @@ class Client {
488488

489489
if (response.headers.get('content-type')?.includes('application/json')) {
490490
data = await response.json();
491+
} else if (responseType === 'arrayBuffer') {
492+
data = await response.arrayBuffer();
491493
} else {
492494
data = {
493495
message: await response.text()

0 commit comments

Comments
 (0)