-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Lurk/readme_update
add usage example and fix branch in codecov badge
- Loading branch information
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
``` |