44[ ![ Released API docs] ( https://docs.rs/clevercloud-sdk/badge.svg )] ( https://docs.rs/clevercloud-sdk )
55[ ![ Continuous integration] ( https://github.com/CleverCloud/clevercloud-sdk-rust/actions/workflows/ci.yml/badge.svg?branch=main )] ( https://github.com/CleverCloud/clevercloud-sdk-rust/actions/workflows/ci.yml )
66
7- > This crate provides structures and a client to interact with the Clever-Cloud
8- > API.
7+ > This crate provides structures and a client to interact with the Clever-Cloud API.
98
109## Status
1110
@@ -25,17 +24,19 @@ Below, you will find an example of executing a request to get information about
2524myself.
2625
2726``` rust
28- use std :: error :: Error ;
29-
30- use clevercloud_sdk :: {Client , v2 :: myself:: {self , Myself }};
27+ use clevercloud_sdk :: {
28+ Client ,
29+ oauth10a :: credentials :: Credentials ,
30+ v2 :: myself:: {self , Myself },
31+ };
3132
3233#[tokio:: main]
33- async fn main () -> Result <(), Box <dyn Error + Send + Sync >> {
34- let client = Client :: from (Credentials {
35- token : "" . to_string () ,
36- secret : "" . to_string () ,
37- consumer_key : "" . to_string () ,
38- consumer_secret : "" . to_string () ,
34+ async fn main () -> Result <(), Box <dyn core :: error :: Error + Send + Sync >> {
35+ let client = Client :: from (Credentials :: OAuth1 {
36+ token : "" ,
37+ secret : "" ,
38+ consumer_key : "" ,
39+ consumer_secret : "" ,
3940 });
4041
4142 let _myself : Myself = myself :: get (& client ). await ? ;
@@ -48,21 +49,23 @@ You could found more examples of how you could use the clevercloud-sdk by lookin
4849
4950## Features
5051
51- | name | description |
52- | ----------- | --------------------------------------------------------------------------------------------------|
53- | trace | Use ` tracing ` crate to expose traces |
54- | jsonschemas | Use ` schemars ` to add a derive instruction to generate json schemas representation of structures |
55- | logging | Use the ` log ` facility crate to print logs. Implies ` oauth10a/logging ` feature |
56- | metrics | Expose HTTP metrics through ` oauth10a ` crate feature. |
52+ | name | description |
53+ | ------------- | --------------------------------------------------------------------------------------------------|
54+ | trace | Use ` tracing ` crate to expose traces |
55+ | jsonschemas | Use ` schemars ` to add a derive instruction to generate json schemas representation of structures |
56+ | logging | Use the ` log ` facility crate to print logs. Implies ` oauth10a/logging ` feature |
57+ | metrics | Expose HTTP metrics through ` oauth10a ` crate feature. |
58+ | network-group | Enables Clever-Cloud Network Group API. |
5759
5860### Metrics
5961
6062Below, the exposed metrics gathered by prometheus:
6163
62- | name | labels | kind | description |
63- | -------------------------------- | --------------------------------------------------------------- | ------- | -------------------------- |
64- | oauth10a_client_request | endpoint: String, method: String, status: Integer | Counter | number of request on api |
65- | oauth10a_client_request_duration | endpoint: String, method: String, status: Integer, unit: String | Counter | duration of request on api |
64+ | name | labels | kind | description |
65+ | -------------------------------- | --------------------------------------------------------------- | ------- | ---------------------------------- |
66+ | oauth10a_client_request | endpoint: String, method: String, status: Integer | Counter | number of request on API |
67+ | oauth10a_client_request_duration | endpoint: String, method: String, status: Integer, unit: String | Counter | duration of request on API |
68+ | oauth10a_client_sse | endpoint: String | Counter | number of events received from API |
6669
6770## License
6871
0 commit comments