{"id":21826470,"url":"https://github.com/0xtlt/shopify_api","last_synced_at":"2025-04-14T05:33:21.710Z","repository":{"id":61563574,"uuid":"552382196","full_name":"0xtlt/shopify_api","owner":"0xtlt","description":"A shopify api client for rust","archived":false,"fork":false,"pushed_at":"2024-12-04T10:16:56.000Z","size":682,"stargazers_count":14,"open_issues_count":6,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T13:52:45.398Z","etag":null,"topics":["rust","shopify","shopify-api"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xtlt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-16T13:21:49.000Z","updated_at":"2024-12-04T10:16:44.000Z","dependencies_parsed_at":"2024-04-25T10:47:30.565Z","dependency_job_id":"eb089cec-92c7-45c5-9e5c-bf840fd4c854","html_url":"https://github.com/0xtlt/shopify_api","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"03b3cee1c2780a8d4e91a550dca71c7f452117dd"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fshopify_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fshopify_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fshopify_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fshopify_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xtlt","download_url":"https://codeload.github.com/0xtlt/shopify_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248827382,"owners_count":21167871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","shopify","shopify-api"],"created_at":"2024-11-27T18:04:15.137Z","updated_at":"2025-04-14T05:33:21.703Z","avatar_url":"https://github.com/0xtlt.png","language":"Rust","funding_links":[],"categories":["Libraries"],"sub_categories":["Rust"],"readme":"# shopify_api\n\n[![crates.io](https://img.shields.io/crates/v/shopify_api.svg)](https://crates.io/crates/shopify_api)\n[![Documentation](https://docs.rs/shopify_api/badge.svg)](https://docs.rs/shopify_api)\n[![MIT/Apache-2 licensed](https://img.shields.io/crates/l/shopify_api.svg)](./LICENSE.txt)\n[![CI](https://github.com/0xtlt/shopify_api/actions/workflows/ci.yml/badge.svg)](https://github.com/0xtlt/shopify_api/actions/workflows/ci.yml)\n[![Issues](https://img.shields.io/github/issues/0xtlt/shopify_api)](https://img.shields.io/github/issues/0xtlt/shopify_api)\n\nAn ergonomic, Shopify API Client for Rust.\n\n- GraphQL API support with automatic data deserialization\n- [Changelog](CHANGELOG.md)\n\n## Example\n\nThis asynchronous example uses [Tokio](https://tokio.rs) and enables some\noptional features, so your `Cargo.toml` could look like this:\n\n```toml\n[dependencies]\nshopify_api = \"0.8\"\ntokio = { version = \"1\", features = [\"full\"] }\n```\n\nAnd then the code:\n\n```rust,no_run\nuse shopify_api::*;\nuse shopify_api::utils::ReadJsonTreeSteps;\nuse serde::{Deserialize};\n\n#[derive(Deserialize)]\nstruct Shop {\n  name: String,\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n  let shopify = Shopify::new(\"hello\", \"world\", String::from(\"2024-04\"), None);\n\n  let graphql_query = r#\"\n    query {\n      shop {\n      name\n     }\n  }\"#;\n\n  let variables = serde_json::json!({});\n  let json_finder = vec![ReadJsonTreeSteps::Key(\"data\"), ReadJsonTreeSteps::Key(\"shop\")];\n\n  let shop: Shop = shopify.graphql_query(graphql_query, \u0026variables, \u0026json_finder).await.unwrap();\n  Ok(())\n}\n```\n\n### Or with the `new` GraphQl Client!\n\n```toml\n[dependencies]\nshopify_api = \"0.89\"\ntokio = { version = \"1\", features = [\"full\"] }\ngraphql_client = \"0.14.0\"\n```\n\n```graphql\nquery GetShop {\n  shop {\n    name\n  }\n}\n```\n\n```rust,no_run\nuse shopify_api::*;\nuse graphql_client::GraphQLQuery;\n\n#[derive(GraphQLQuery)]\n#[graphql(\n    schema_path = \"./graphql.schema.json\",\n    query_path = \"graphql/getShop.graphql\",\n    response_derives = \"Debug\"\n)]\nstruct GetShop;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n  let shopify = Shopify::new(\"hello\", \"world\", String::from(\"2024-04\"), None);\n\n  let shop_info = connector\n        .shopify\n        .post_graphql::\u003cGetShop\u003e(get_shop::Variables {})\n        .await;\n\n  Ok(())\n}\n```\n\n### Download the graphql schema\n\n#### You can download one from this repository\n\n- [2024-04](./schemas/2024-04.json)\n\n#### Or download it from the Shopify Graphql API with [the following command](./schema_dl.graphql)\n\n\u003e [!WARNING]\n\u003e Sometimes you'll get an error with the GraphQLQuery derive caused my a missing struct, most of the time, you can fix it by adding the missing struct by importing it from [the types import](./src/graphql/types.rs) or you can create a new struct with the same name as the missing one, and the derive will work.\n\n## License\n\nLicensed under MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtlt%2Fshopify_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtlt%2Fshopify_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtlt%2Fshopify_api/lists"}