Skip to content

Commit 82b353c

Browse files
authored
Readme badges (#65)
This commit adds badges to README
1 parent f59800b commit 82b353c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
# elasticsearch
1+
# elasticsearch   [![Latest Version]][crates.io] [![Docs]][docs.rs] [![Apache-2 licensed]][license]
2+
3+
[Latest Version]: https://img.shields.io/crates/v/elasticsearch.svg
4+
[crates.io]: https://crates.io/crates/elasticsearch
5+
[Docs]: https://docs.rs/elasticsearch/badge.svg
6+
[docs.rs]: https://docs.rs/elasticsearch
7+
[Apache-2 licensed]: https://img.shields.io/crates/l/elasticsearch.svg
8+
[license]: ./LICENSE
29

310
Official Rust Client for [Elasticsearch](https://github.com/elastic/elasticsearch).
411

@@ -60,9 +67,10 @@ serde_json = "~1"
6067
### Create a client
6168

6269
Build a transport to make API requests to Elasticsearch using the `TransportBuilder`,
63-
which allows setting of proxies and authentication schemes
70+
which allows setting of proxies, authentication schemes, certificate validation, and
71+
other transport related settings.
6472

65-
To create a client to make API calls to Elasticsearch running on `http://localhost:9200`
73+
To create a client to make API calls to Elasticsearch running on `http://localhost:9200`
6674

6775
```rust,no_run
6876
use elasticsearch::{Error, Elasticsearch};
@@ -100,16 +108,17 @@ use url::Url;
100108
101109
fn run() -> Result<(), Error> {
102110
let cloud_id = "cluster_name:Y2xvdWQtZW5kcG9pbnQuZXhhbXBsZSQzZGFkZjgyM2YwNTM4ODQ5N2VhNjg0MjM2ZDkxOGExYQ==";
111+
// can use other types of Credentials too, like Bearer or ApiKey
103112
let credentials = Credentials::Basic("<username>".into(), "<password>".into());
104113
let transport = Transport::cloud(cloud_id, credentials)?;
105114
let client = Elasticsearch::new(transport);
106115
Ok(())
107116
}
108117
```
109118

110-
More control over how a [Transport](http::transport::Transport) is built can be
111-
achieved using [TransportBuilder](http::transport::TransportBuilder) to build a transport, and
112-
passing it to [Elasticsearch::new] create a new instance of [Elasticsearch]
119+
More control over how a `Transport` is built can be
120+
achieved using `TransportBuilder` to build a transport, and
121+
passing it to `Elasticsearch::new()` create a new instance of `Elasticsearch`
113122

114123
```rust,no_run
115124
use elasticsearch::{

0 commit comments

Comments
 (0)