Skip to content

Commit

Permalink
Update 0.5.2 (#36)
Browse files Browse the repository at this point in the history
* 0.5.2

* edit changelog 0.5.2
  • Loading branch information
bibi-reden authored Jun 22, 2024
2 parents 0d0d181 + fb9e501 commit b9f25f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 61 deletions.
61 changes: 3 additions & 58 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,5 @@
# blue_archive-rs
# 0.5.2 - 2024-06-22

## Fixes ⚒️

## 0.5.1 - 2024-05-04

### Additions ✨

### Changes 📝
- Modified displayed portions of `Student` and other struct fields.
- Changed `Released` struct to allow direct access to `japan`, `global` and `china` fields.
- Changed how `age` is obtained and how it is serialized/deserialized. This will be done as soon as it is read/written without a method call.
- Use `student.age` instead of `student.age()`.

### Fixes ⚒️

## 0.5.0 - 2024-04-01

### Additions ✨

Added the new `blocking` feature. It is not enabled by default, so you must require it if you wish to use it!

- This uses reqwest's `blocking` feature to handle all requests in a non-asynchronous way.

### Changes 📝

- Changed how some internal deserialization and hashing works in the crate.

### Fixes ⚒️

## 0.4.0 - 2024-03-23

### Additions ✨

- This changelog. It will be assumed that the latest update will be on the top. Read from ascending order.
- Currency API has been added. You can use the existing functions:
- `blue_archive::fetch_all_currencies`
- `blue_archive::fetch_currency_by_name`
- Equipment API has been added. You can use the existing functions:
- `blue_archive::fetch_all_equipment`
- `blue_archive::fetch_equipment_by_name`
- `blue_archive::fetch_equipment_by_category`
- Enemies API has been added. You can use the existing functions:
- `blue_archive::fetch_all_enemies`
- `blue_archive::fetch_enemy_by_name`

### Changes 📝

- `impl Into<String>` has been changed to a more suitable `AsRef<str>`. This is an internal change related to name-based searching.
- `ID(u32)`'s inner value has been set to private, access the value by using `ID::to_u32`.
- Raid skills have been modified into enumerations, which allows for better differentiation of the data.
- Descriptions are now directly decoded through `serde` deserialization.
- Instead of `description()`, please use `description`.
- Student's first and last names have been made directly public through member field access.
- Instead of `Student::first_name()` & `Student::last_name()`, please use `Student::first_name` & `Student::last_name`.
- `Released` type has been changed to a struct with an inner tuple value, though to get the regions, you use the functions:
- `Released::japan()`, `Released::global()`, and `Released::china()` for example.

### Fixes ⚒️

- Applied a change to the `Student::position` function, was passing in the `Student::armor_type` for some reason... oops!
- Resolved an issue with raid data.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

[package]
name = "blue_archive"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
license-file = "LICENSE"
description = "A Blue Archive api wrapper for Rust, based off of SchaleDB's data: https://github.com/lonqie/SchaleDB"
Expand Down Expand Up @@ -41,3 +42,6 @@ blocking = ["reqwest/blocking"]
name = "get_all_students"
path = "examples/blocking/get_all_students.rs"
required-features = ["blocking"]

[profile.dev]
debug-assertions = false
4 changes: 3 additions & 1 deletion examples/fetch_students_under_clubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ async fn main() -> anyhow::Result<()> {
println!("|::{club}{}::|", " ".repeat(max - club.to_string().len()));
// Iterating over each student and checking if they associate with the club.
students.iter().for_each(|student| {
(student.club() == club).then(|| println!("{student}"));
if student.club() == club {
println!("{student}")
}
})
});

Expand Down
2 changes: 1 addition & 1 deletion src/types/raids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub struct SpecialRaidSkill {
atg_cost: u8,
icon: String,
effects: Option<Vec<Effect>>,
name: String,
name: Option<String>,
#[serde(
alias = "Desc",
deserialize_with = "serialization::deserialize_html_encoded_string"
Expand Down

0 comments on commit b9f25f7

Please sign in to comment.