{"id":17933823,"url":"https://github.com/jacobsvante/netsuite-rs","last_synced_at":"2025-09-20T22:42:40.175Z","repository":{"id":41683711,"uuid":"420785516","full_name":"jacobsvante/netsuite-rs","owner":"jacobsvante","description":"Rust library for making requests to the NetSuite REST APIs","archived":false,"fork":false,"pushed_at":"2022-04-29T08:43:42.000Z","size":82,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T01:08:32.352Z","etag":null,"topics":["netsuite","rest-api"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/netsuite","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/jacobsvante.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-24T20:13:01.000Z","updated_at":"2024-10-02T17:41:22.000Z","dependencies_parsed_at":"2022-08-10T10:00:12.510Z","dependency_job_id":null,"html_url":"https://github.com/jacobsvante/netsuite-rs","commit_stats":null,"previous_names":["jmagnusson/netsuite-rs"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/jacobsvante/netsuite-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobsvante%2Fnetsuite-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobsvante%2Fnetsuite-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobsvante%2Fnetsuite-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobsvante%2Fnetsuite-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobsvante","download_url":"https://codeload.github.com/jacobsvante/netsuite-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobsvante%2Fnetsuite-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275215218,"owners_count":25425180,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["netsuite","rest-api"],"created_at":"2024-10-28T21:41:54.741Z","updated_at":"2025-09-20T22:42:40.126Z","avatar_url":"https://github.com/jacobsvante.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netsuite-rs\n\nLibrary for making requests to the NetSuite REST APIs.\n\nSupports both programmatic and CLI usage (via `cli` feature).\n\nCurrently using ureq for HTTP requests, which means this library is not useful for async environments currently. Async will probably be released as a feature flag in the future.\n\n## Beta quality disclaimer\n\nThe project's API is still very much in fluctuation. Pin your dependency to the current minor version to avoid breaking changes. From 1.0 and forward we will keep a stable API.\n\n## CLI\n\nThis is the easiest way to get started. To find out what you can do with the CLI, just append `--help` or `-h` to the installed `netsuite` command.\n\nPlease note that you need to add the `cli` feature for CLI access. Using [cargo-edit](https://crates.io/crates/cargo-edit) you can do this by calling: `cargo add netsuite --features cli`\n\n### Config file\nIt's recommended to create an INI config file before using the CLI, to avoid having to provide all OAuth 1.0 details with every command execution.\n\nYou can use `netsuite default-ini-path` to find the default INI config location.\n```bash\nnetsuite default-ini-path\n```\n\nWrite your settings to the file, in this example using [heredoc syntax](https://en.wikipedia.org/wiki/Here_document):\n```bash\ncat \u003c\u003cEOF \u003e\"$(netsuite default-ini-path)\"\n[sandbox]\naccount = \u003caccount id\u003e_SB1\nconsumer_key = \u003c64 chars\u003e\nconsumer_secret = \u003c64 chars\u003e\ntoken_id = \u003c64 chars\u003e\ntoken_secret = \u003c64 chars\u003e\nEOF\n```\n\nAfter this you just have to provide the section name to start using the CLI:\n```bash\nnetsuite -s sandbox suiteql 'SELECT * FROM pricing'\n```\n\n### Environment variables\n\nAs an alternative you can provide environment variables directly. For example:\n```bash\nexport ACCOUNT=\u003caccount id\u003e\nexport CONSUMER_KEY=\u003c64 chars\u003e\nexport CONSUMER_SECRET=\u003c64 chars\u003e\nexport TOKEN_ID=\u003c64 chars\u003e\nexport TOKEN_SECRET=\u003c64 chars\u003e\nnetsuite suiteql 'SELECT * FROM pricing'\n```\n\n## Programmatic access\n\nSee example below on how to integrate into your code.\n\n(You can ignore lines prepended with # if you see them, they are there to ensure that provided rust code is correct.)\n\n```rust\nuse netsuite::{Config, RestApi};\n\n#[derive(Debug, PartialEq, serde::Deserialize)]\nstruct Price {\n    internalid: String,\n    unitprice: String,\n}\n\nlet config = Config::new(\"123456\", \"2\", \"3\", \"4\", \"5\");\nlet api = RestApi::new(config);\n# use httpmock::{MockServer, Method::POST};\n# let server = MockServer::start();\n# let api = RestApi::new(Config::new(\"123456\", \"2\", \"3\", \"4\", \"5\")).with_base_url(server.base_url());;\n# let mock = server.mock(|when, then| {\n#     when.method(POST).path(\"/query/v1/suiteql\");\n#     then.status(200).body(r#\"{\"links\":[],\"count\":2,\"hasMore\":false,\"items\":[{\"links\":[],\"currency\":\"1\",\"internalid\":\"24\",\"item\":\"24\",\"pricelevel\":\"15\",\"quantity\":\"1\",\"saleunit\":\"1\",\"unitprice\":\"95.49\"},{\"links\":[],\"currency\":\"1\",\"internalid\":\"24\",\"item\":\"24\",\"pricelevel\":\"21\",\"quantity\":\"1\",\"saleunit\":\"1\",\"unitprice\":\"19.99\"}],\"offset\":0,\"totalResults\":2}\"#);\n# });\nlet res = api.suiteql.fetch_all::\u003cPrice\u003e(\"SELECT * FROM pricing\");\n# mock.assert();\nassert_eq!(res.unwrap(), [Price { internalid: \"24\".into(), unitprice: \"95.49\".into() }, Price { internalid: \"24\".into(), unitprice: \"19.99\".into() }]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobsvante%2Fnetsuite-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobsvante%2Fnetsuite-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobsvante%2Fnetsuite-rs/lists"}