Skip to content

Commit

Permalink
Merge pull request #11 from Lurk/readme_update
Browse files Browse the repository at this point in the history
add usage example and fix branch in codecov badge
  • Loading branch information
Lurk authored Oct 15, 2023
2 parents e70d6a7 + cca2db1 commit 50d8585
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Cloudinary Rust API

[![codecov](https://codecov.io/gh/Lurk/cloudinary_rs/branch/master/graph/badge.svg?token=K8H5DLTSX4)](https://codecov.io/gh/Lurk/cloudinary_rs)
[![codecov](https://codecov.io/gh/Lurk/cloudinary_rs/branch/main/graph/badge.svg?token=K8H5DLTSX4)](https://codecov.io/gh/Lurk/cloudinary_rs)
[![crates.io](https://img.shields.io/crates/v/cloudinary.svg)](https://crates.io/crates/cloudinary)
[![Released API docs](https://docs.rs/cloudinary/badge.svg)](https://docs.rs/cloudinary)

At the moment, there is only half-backed upload functionality, but if you need more, please let me know.

## Usage

```rust
use cloudinary::{Source, Cloudinary};
use cloudinary::upload::{UploadOptions};
let options = UploadOptions::new().set_public_id("file.jpg".to_string());
let cloudinary = Cloudinary::new("api_key".to_string(), "cloud_name".to_string(), "api_secret".to_string() );
let result = cloudinary.upload_image(Source::Path("./image.jpg".into()), &options);
```

0 comments on commit 50d8585

Please sign in to comment.