Skip to content

Commit

Permalink
Webhooks features (#17)
Browse files Browse the repository at this point in the history
* Webhooks features

* Update Cargo.toml

* Update verify.rs

* Webhooks listing

* Update mod.rs

* Update mod.rs

* warp moved

* Update warp.rs

* Update bulk_query.rs

* Update bulk_query.rs

* debug

* Debug

* Debug logs

* Update mod.rs

* Update mod.rs

* Update mod.rs

* Update Cargo.toml

* Update mod.rs

* V6 beta
  • Loading branch information
0xtlt authored Mar 8, 2024
1 parent 5db076a commit 290960e
Show file tree
Hide file tree
Showing 13 changed files with 569 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
RUST_BACKTRACE: 1
TEST_SHOP_NAME: "${{ secrets.TEST_SHOP_NAME }}"
TEST_KEY: "${{ secrets.TEST_KEY }}"
RUST_LOG: "debug"

jobs:
ci-pass:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.6.0

- Add: `verify_hmac` method added to `Shopify`
- Add: `ShopifyWebhook` struct
- Add: `list_webhooks` method added to `Shopify`
- Add: `add_webhook` method added to `Shopify`
- Add: `edit_webhook` method added to `Shopify`
- Add: `delete_webhook` method added to `Shopify`
- Add: `webhook_auto_config` method added to `Shopify`

## 0.5.0

- Add: `stage_upload_json` method added to `Shopify`
Expand Down
192 changes: 191 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "Shopify API client"
documentation = "https://docs.rs/shopify_api"
readme = "README.md"
repository = "https://github.com/0xtlt/shopify_api"
version = "0.5.1"
version = "0.6.0"
edition = "2021"
keywords = ["shopify", "api", "client"]
categories = ["api-bindings", "web-programming"]
Expand All @@ -22,11 +22,20 @@ tokio = { version = "1", features = ["time"] }
log = "0.4"
simple_logger = "4.3"
thiserror = "1.0"
hmac = { version = "0.12", optional = true }
sha2 = { version = "0.10", optional = true }
base64 = { version = "0.21", optional = true }
warp = { version = "0.3", optional = true, default-features = false, features = [] }
bytes = { version = "1.5", optional = true }


[dev-dependencies]
tokio = { version = "1", features = ["full"] }

[features]
default = ["rustls"]
default = ["full", "rustls"]
warp-wrapper = ["warp", "bytes"]
full = ["default", "webhooks"]
rustls = ["reqwest/rustls-tls"]
native-tls = ["reqwest/native-tls"]
webhooks = ["hmac", "sha2", "base64"]
1 change: 1 addition & 0 deletions src/graphql/bulk_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ impl Shopify {
/// }
/// }
/// }"#;
///
/// let variables = serde_json::json!({});
/// let products_bulk = shopify.make_bulk_query(graphql_query).await.unwrap();
///
Expand Down
1 change: 1 addition & 0 deletions src/graphql/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ where

// Connection data
let body = res.text().await;

if body.is_err() {
return Err(ShopifyAPIError::ResponseBroken);
}
Expand Down
Loading

0 comments on commit 290960e

Please sign in to comment.