https://github.com/ceramicstudio/rust-ceramic-http-client
A Rust implementation of the HTTP Ceramic Client
https://github.com/ceramicstudio/rust-ceramic-http-client
do-not-use-yet experimental
Last synced: 9 months ago
JSON representation
A Rust implementation of the HTTP Ceramic Client
- Host: GitHub
- URL: https://github.com/ceramicstudio/rust-ceramic-http-client
- Owner: ceramicstudio
- Created: 2022-06-21T04:35:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-05T20:11:23.000Z (almost 4 years ago)
- Last Synced: 2025-03-01T17:47:48.650Z (over 1 year ago)
- Topics: do-not-use-yet, experimental
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-ceramic-http-client
A Rust implementation of the HTTP Ceramic Client
Currently a siginificant work in progess. You probably don't even want to try and use this yet.
**Usage Example**
Using Defaults
```rust
fn main(){
// Example StreamID from a Ceramic Stream already on the network
let stream_id = "kjk...";
// Create a client with defaults and use that to make read-only requests
let ceramic = CeramicHTTPClient::default();
// Get the data from a stream using StreamID
let stream = ceramic.get_stream(stream_id);
println!("{:?}",stream);
}
```
Custom client
```rust
fn main(){
// Example StreamID from a Ceramic Stream already on the network
let stream_id = "kjk...";
// Create a client with defaults and use that to make read-only requests
let ceramic = CeramicHTTPClient::default();
// Use setters to configure custom parameters for the client
ceramic.set_did("did:3:ksaldjfklsajklf");
ceramic.set_api_version("/v1");
ceramic.set_ceramic_network_url("https://localhost:7007");
// Get the data from a stream using StreamID
let stream = ceramic.get_stream(stream_id);
println!("{:?}",stream);
}
```