Skip to content

Commit

Permalink
chore(release): 0.4.0 [skip ci]
Browse files Browse the repository at this point in the history
## [0.4.0](v0.3.0...v0.4.0) (2022-08-06)

### Features

* methods to update device led state with partial values ([4f37a44](4f37a44))

### Code Refactoring

* rethinking the way to work with async-graphql library ([dfea16e](dfea16e))
  • Loading branch information
semantic-release-bot committed Aug 6, 2022
1 parent dfea16e commit c0bba65
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## [0.4.0](https://github.com/meskill/mystic-light-sdk/compare/v0.3.0...v0.4.0) (2022-08-06)


### Features

* methods to update device led state with partial values ([4f37a44](https://github.com/meskill/mystic-light-sdk/commit/4f37a446ac67cbf8a6675b39ae8ce20cc1849e63))


### Code Refactoring

* rethinking the way to work with async-graphql library ([dfea16e](https://github.com/meskill/mystic-light-sdk/commit/dfea16eae6b3adab2679878a14164a90e3087aaa))

## [0.3.0](https://github.com/meskill/mystic-light-sdk/compare/v0.2.4...v0.3.0) (2022-07-03)


Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mystic_light_sdk"
version = "0.3.0"
version = "0.4.0"
edition = "2021"
authors = ["meskill"]
description = "A Rust wrapper for the MysticLight SDK (MSI hardware and peripherals)"
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const LIB_PATH: &str = if cfg!(target_arch = "x86_64") {
fn main() -> Result<(), CommonError> {
let sdk = MysticLightSDK::new(LIB_PATH)?;

let devices = sdk.get_devices()?;
let devices: Vec<_> = sdk.devices_iter().collect();

println!("{:#?}", devices);

println!("Second Device name is {}", devices[2].name());

let mut keyboard_leds = devices[2].leds()?;
let keyboard_leds: Vec<_> = devices[2].leds_iter().collect();

println!("{:#?}", keyboard_leds);

Expand Down Expand Up @@ -135,19 +135,19 @@ Enables [serde][__link4] serialization/deserialization for some of the sdk struc

Enables [async-graphql][__link5] support for sdk entities

When this feature is enabled you can use [MysticLightSDK][__link6] as async_graphql::Query and [MysticLightSDKMutation][__link7] as async_graphql::Mutation
When this feature is enabled you can use [MysticLightGraphqlQuery][__link6] as async_graphql::Query and [MysticLightGraphqlMutation][__link7] as async_graphql::Mutation


```rust
use async_graphql::{EmptySubscription, Schema};
use mystic_light_sdk::{MysticLightSDK, MysticLightSDKMutation};
use mystic_light_sdk::{build_graphql_schema, MysticLightSDK, MysticLightGraphqlMutation, MysticLightGraphqlQuery};

pub type MysticLightSchema = Schema<MysticLightSDK, MysticLightSDKMutation, EmptySubscription>;
pub type MysticLightSchema = Schema<MysticLightGraphqlQuery, MysticLightGraphqlMutation, EmptySubscription>;

pub fn create_qraphql_schema(sdk: MysticLightSDK) -> MysticLightSchema {
let mutation = MysticLightSDKMutation(sdk.clone());
let (query, mutation) = build_graphql_schema(sdk);

Schema::build(sdk, mutation, EmptySubscription).finish()
Schema::build(query, mutation, EmptySubscription).finish()
}

```
Expand All @@ -166,12 +166,12 @@ Make sure you have been fulfilled [requirements](#requirements) and you running
Some of the device’s styles do not support colors. In this case this kind of error will be generated.


[__cargo_doc2readme_dependencies_info]: ggGkYW0AYXSEG52uRQSwBdezG6GWW8ODAbr5G6KRmT_WpUB5G9hPmBcUiIp6YXKEG6X8erNhPunCG31Cv27-Bu8hG7nWaAb2Sc_TG4vh1fzzx_YPYWSCgm5NeXN0aWNMaWdodFNES_aCdk15c3RpY0xpZ2h0U0RLTXV0YXRpb272
[__cargo_doc2readme_dependencies_info]: ggGkYW0AYXSEG52uRQSwBdezG6GWW8ODAbr5G6KRmT_WpUB5G9hPmBcUiIp6YXKEGzmwUxU2jxqYG5nuuKxrwtEnGxsKYRdHNhIWGzsJmocK4UXSYWSCgngaTXlzdGljTGlnaHRHcmFwaHFsTXV0YXRpb272gndNeXN0aWNMaWdodEdyYXBocWxRdWVyefY
[__link0]: https://www.msi.com/Landing/mystic-light-rgb-gaming-pc/download
[__link1]: https://www.msi.com/Landing/mystic-light-rgb-gaming-pc/download
[__link2]: https://docs.rs/log/0.4.17/log/index.html
[__link3]: https://docs.rs/log/0.4.17/log/index.html#available-logging-implementations
[__link4]: https://crates.io/crates/serde
[__link5]: https://crates.io/crates/async-graphql
[__link6]: https://crates.io/crates/MysticLightSDK
[__link7]: https://crates.io/crates/MysticLightSDKMutation
[__link6]: https://crates.io/crates/MysticLightGraphqlQuery
[__link7]: https://crates.io/crates/MysticLightGraphqlMutation

0 comments on commit c0bba65

Please sign in to comment.