Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tauri-plugin-shopsavvy

Tauri v2 plugin for product search, price comparison, price history, and deals powered by the ShopSavvy Data API. Ships a Rust crate (the plugin runtime) and a TypeScript bindings package (the renderer-side wrapper).

Documentation · Get an API key · Other integrations

Install

Install both halves:

cargo add tauri-plugin-shopsavvy
npm install @shopsavvy/tauri-plugin

Wire the plugin in Rust

// src-tauri/src/main.rs
fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_shopsavvy::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

init() reads SHOPSAVVY_API_KEY from the environment. To override:

.plugin(
    tauri_plugin_shopsavvy::Builder::new()
        .api_key("ss_live_…")
        .build(),
)

Allow the commands

In src-tauri/capabilities/default.json:

{
  "permissions": [
    "shopsavvy:default"
  ]
}

Use from the frontend

import { searchProducts, getOffers, getPriceHistory, getDeals } from "@shopsavvy/tauri-plugin"

const results = await searchProducts("AirPods Pro", 10)
const offers  = await getOffers("012345678905")
const history = await getPriceHistory("012345678905", 180)
const deals   = await getDeals({ category: "electronics", limit: 8, sort: "trending" })

Test

./test.sh

License

MIT — see LICENSE.

About

Tauri v2 plugin for product search, price comparison, price history, and deals

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages