From b4da87cc0b478ea8ecb0060b9967ac5449fb602f Mon Sep 17 00:00:00 2001 From: Thibault Meyer Date: Fri, 17 Sep 2021 19:15:10 +0200 Subject: [PATCH] Prepare for Release 1.0.0 Signed-off-by: Thibault Meyer --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3473b6..2fd777f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # libsnowflakeid -[![Latest release](https://img.shields.io/badge/latest_release----orange.svg)](https://github.com/thibaultmeyer/libsnowflakeid/releases) +[![Latest release](https://img.shields.io/badge/latest_release-1.0.0-orange.svg)](https://github.com/thibaultmeyer/libsnowflakeid/releases) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/thibaultmeyer/libsnowflakeid/blob/master/LICENSE) [![CodeFactor](https://www.codefactor.io/repository/github/thibaultmeyer/libsnowflakeid/badge)](https://www.codefactor.io/repository/github/thibaultmeyer/libsnowflakeid) @@ -18,5 +18,22 @@ clang or MSVC are being correctly installed. #> make install +## Usage +```c +int main(const int argc, const char *const *argv) { + enum e_snowflakeid_init_status status_out; + struct s_snowflakeid_generator_ctx *ctx = snowflakeid_initialize(datacenter_id, worker_id, &status_out); + + if (status_out == SNOWFLAKEID_INIT_SUCCESS) { + uint64_t = snowflakeid_next_value(ctx); + + snowflakeid_destroy(ctx); + } + + return (0); +} +``` + + ## License This project is released under terms of the [MIT license](https://github.com/thibaultmeyer/libsnowflakeid/blob/master/LICENSE).