Made a better readme
This commit is contained in:
parent
f10a43ba2e
commit
9f772cf3a6
57
README.md
57
README.md
|
@ -1,6 +1,43 @@
|
|||
# socialvoid-rs
|
||||
|
||||
This crate is a high level implementation to access the SocialVoid API. It can be used to build clients for the platform or build automated programs to perform tasks on the SocialVoid network.
|
||||
This repository contains
|
||||
1. a crate that is a high level implementation of a library to access the Socialvoid API. It can be used to build clients for the platform or build automated programs to perform tasks on the Socialvoid network.
|
||||
2. a simple CLI client for Socialvoid based on the crate
|
||||
|
||||
## Library Documentation
|
||||
|
||||
//TODO: link to this crate's documentation once it's up.
|
||||
|
||||
Incase any method isn't available in this crate, you can make raw requests using the `socialvoid-rawclient` crate, the latest full API Documentation of Socialvoid is [here](https://github.com/intellivoid/Socialvoid-Standard-Documentation)
|
||||
|
||||
## Example for the library
|
||||
|
||||
A simple example that logs you in and shows peer information.
|
||||
```rust
|
||||
use socialvoid::Client;
|
||||
|
||||
let mut client = new_with_defaults();
|
||||
|
||||
client
|
||||
.authenticate_user(
|
||||
0,
|
||||
creds["username"].as_str().unwrap().to_string(),
|
||||
creds["password"].as_str().unwrap().to_string(),
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
let peer = client.get_me(0).await?;
|
||||
client.logout(0).await?;
|
||||
|
||||
println!("{:?}", peer);
|
||||
assert_eq!(
|
||||
peer.username,
|
||||
creds["username"].as_str().unwrap().to_string()
|
||||
);
|
||||
|
||||
```
|
||||
More examples can be found in client/examples (TODO+add a link)
|
||||
|
||||
## Installation of the CLI client
|
||||
1. Clone this repository
|
||||
|
@ -9,6 +46,9 @@ This crate is a high level implementation to access the SocialVoid API. It can b
|
|||
`cargo install --path cli`
|
||||
|
||||
## Usage of the CLI client
|
||||
See the full documentation here(TODO: a link to full documentation)
|
||||
|
||||
Some of the commands are:
|
||||
### Register an account
|
||||
`socialvoid-cli register`
|
||||
### Login in to an account
|
||||
|
@ -16,17 +56,4 @@ This crate is a high level implementation to access the SocialVoid API. It can b
|
|||
### Get the current peer
|
||||
`socialvoid-cli get-me`
|
||||
|
||||
## API Documentation and usage
|
||||
|
||||
To create your own client based on this library, you can add `socialvoid == 1.0` in your `Cargo.toml`
|
||||
TODO: everything
|
||||
Link to API Documentation
|
||||
|
||||
## Example for the library
|
||||
|
||||
```
|
||||
use socialvoid::Client;
|
||||
|
||||
let client = Client::new_with_defaults();
|
||||
|
||||
```
|
||||
//TODO: add contributors section
|
Loading…
Reference in New Issue