Skip to content

Commit d67512c

Browse files
authored
Merge pull request #18 from appwrite/dev
feat: Rust SDK update for version 0.7.0
2 parents 510cacf + 08bac47 commit d67512c

14 files changed

Lines changed: 129 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.6.0] - TBD
8+
## [0.7.0] - TBD
99

1010
### Added
1111
- Initial release of Appwrite Rust SDK
@@ -1101,4 +1101,4 @@ If you want to generate a token for a custom authentication flow, use the [POST
11011101
- File upload examples
11021102
- Query builder documentation
11031103

1104-
[0.6.0]: https://github.com/appwrite/sdk-for-rust/releases/tag/0.6.0
1104+
[0.7.0]: https://github.com/appwrite/sdk-for-rust/releases/tag/0.7.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "appwrite"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
edition = "2021"
55
rust-version = "1.83"
66
authors = ["appwrite"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add this to your `Cargo.toml`:
1717

1818
```toml
1919
[dependencies]
20-
appwrite = "0.6.0"
20+
appwrite = "0.7.0"
2121
tokio = { version = "1.48", features = ["full"] }
2222
```
2323

docs/examples/advisor/get-insight.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::new();
88
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
99
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10-
client.set_session(""); // The user session to authenticate with
10+
client.set_key("<YOUR_API_KEY>"); // Your secret API key
1111

1212
let advisor = Advisor::new(&client);
1313

docs/examples/advisor/get-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::new();
88
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
99
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10-
client.set_session(""); // The user session to authenticate with
10+
client.set_key("<YOUR_API_KEY>"); // Your secret API key
1111

1212
let advisor = Advisor::new(&client);
1313

docs/examples/advisor/list-insights.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::new();
88
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
99
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10-
client.set_session(""); // The user session to authenticate with
10+
client.set_key("<YOUR_API_KEY>"); // Your secret API key
1111

1212
let advisor = Advisor::new(&client);
1313

docs/examples/advisor/list-reports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::new();
88
client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint
99
client.set_project("<YOUR_PROJECT_ID>"); // Your project ID
10-
client.set_session(""); // The user session to authenticate with
10+
client.set_key("<YOUR_API_KEY>"); // Your secret API key
1111

1212
let advisor = Advisor::new(&client);
1313

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ impl Client {
8989
pub fn new() -> Self {
9090
let mut headers = HeaderMap::new();
9191
headers.insert("X-Appwrite-Response-Format", "1.9.5".parse().unwrap());
92-
headers.insert("user-agent", format!("AppwriteRustSDK/0.6.0 ({}; {})", std::env::consts::OS, std::env::consts::ARCH).parse().unwrap());
92+
headers.insert("user-agent", format!("AppwriteRustSDK/0.7.0 ({}; {})", std::env::consts::OS, std::env::consts::ARCH).parse().unwrap());
9393
headers.insert("x-sdk-name", "Rust".parse().unwrap());
9494
headers.insert("x-sdk-platform", "server".parse().unwrap());
9595
headers.insert("x-sdk-language", "rust".parse().unwrap());
96-
headers.insert("x-sdk-version", "0.6.0".parse().unwrap());
96+
headers.insert("x-sdk-version", "0.7.0".parse().unwrap());
9797

9898
let config = Config {
9999
endpoint: "https://cloud.appwrite.io/v1".to_string(),

src/enums/build_runtime.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ pub enum BuildRuntime {
6565
PythonMl312,
6666
#[serde(rename = "python-ml-3.13")]
6767
PythonMl313,
68+
#[serde(rename = "deno-1.21")]
69+
Deno121,
70+
#[serde(rename = "deno-1.24")]
71+
Deno124,
72+
#[serde(rename = "deno-1.35")]
73+
Deno135,
6874
#[serde(rename = "deno-1.40")]
6975
Deno140,
7076
#[serde(rename = "deno-1.46")]
@@ -218,6 +224,9 @@ impl BuildRuntime {
218224
BuildRuntime::PythonMl311 => "python-ml-3.11",
219225
BuildRuntime::PythonMl312 => "python-ml-3.12",
220226
BuildRuntime::PythonMl313 => "python-ml-3.13",
227+
BuildRuntime::Deno121 => "deno-1.21",
228+
BuildRuntime::Deno124 => "deno-1.24",
229+
BuildRuntime::Deno135 => "deno-1.35",
221230
BuildRuntime::Deno140 => "deno-1.40",
222231
BuildRuntime::Deno146 => "deno-1.46",
223232
BuildRuntime::Deno20 => "deno-2.0",

src/enums/runtime.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ pub enum Runtime {
6565
PythonMl312,
6666
#[serde(rename = "python-ml-3.13")]
6767
PythonMl313,
68+
#[serde(rename = "deno-1.21")]
69+
Deno121,
70+
#[serde(rename = "deno-1.24")]
71+
Deno124,
72+
#[serde(rename = "deno-1.35")]
73+
Deno135,
6874
#[serde(rename = "deno-1.40")]
6975
Deno140,
7076
#[serde(rename = "deno-1.46")]
@@ -218,6 +224,9 @@ impl Runtime {
218224
Runtime::PythonMl311 => "python-ml-3.11",
219225
Runtime::PythonMl312 => "python-ml-3.12",
220226
Runtime::PythonMl313 => "python-ml-3.13",
227+
Runtime::Deno121 => "deno-1.21",
228+
Runtime::Deno124 => "deno-1.24",
229+
Runtime::Deno135 => "deno-1.35",
221230
Runtime::Deno140 => "deno-1.40",
222231
Runtime::Deno146 => "deno-1.46",
223232
Runtime::Deno20 => "deno-2.0",

0 commit comments

Comments
 (0)