Compare commits

...

2 Commits

Author SHA1 Message Date
MedzikUser 304034f037
chore(release): v0.11.1 2022-12-11 11:05:51 +01:00
Andre Julius b6e715accf album_title can be null. account_id can be a string or a number 2022-12-11 09:40:18 +01:00
6 changed files with 23 additions and 8 deletions

View File

@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [0.11.1] - 2022-12-11
### Fixed
- `album_title` can be null, `account_id` can be null, string or number #92, thanks to @NotNorom
### Changed
- Updated dependencies
## [0.11.0] - 2022-11-07
### Added
- Added `with_http_client` method to ImgurClient #87, thanks to @NotNorom
@ -147,7 +154,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- upload image
<!-- next-url -->
[Unreleased]: https://github.com/MedzikUser/imgurs/compare/v0.11.0...HEAD
[Unreleased]: https://github.com/MedzikUser/imgurs/compare/v0.11.1...HEAD
[0.11.1]: https://github.com/MedzikUser/imgurs/commits/v0.11.1
[0.11.0]: https://github.com/MedzikUser/imgurs/commits/v0.11.0
[0.10.0]: https://github.com/MedzikUser/imgurs/commits/v0.10.0
[0.9.1]: https://github.com/MedzikUser/imgurs/commits/v0.9.1

4
Cargo.lock generated
View File

@ -849,7 +849,7 @@ dependencies = [
[[package]]
name = "imgurs"
version = "0.11.0"
version = "0.11.1"
dependencies = [
"base64",
"reqwest",
@ -862,7 +862,7 @@ dependencies = [
[[package]]
name = "imgurs-cli"
version = "0.11.0"
version = "0.11.1"
dependencies = [
"anyhow",
"arboard",

View File

@ -4,7 +4,7 @@ resolver = "2"
[package]
name = "imgurs"
version = "0.11.0"
version = "0.11.1"
description = "API for Imgur"
license = "BSD-3-Clause"
authors = ["MedzikUser <medzik@duck.com>"]

View File

@ -74,4 +74,4 @@ Download imgurs-windows.exe from [the releases page](https://github.com/MedzikUs
### **Compile with Cargo**
Make sure you have a recent version of Rust. Then you can run
cargo install imgurs
cargo install imgurs-cli

View File

@ -1,6 +1,6 @@
[package]
name = "imgurs-cli"
version = "0.11.0"
version = "0.11.1"
description = "CLI for Imgur"
license = "BSD-3-Clause"
authors = ["MedzikUser <medzik@duck.com>"]

View File

@ -18,7 +18,7 @@ pub struct AlbumInfoData {
/// Album ID
pub id: String,
/// Title of the album
pub title: String,
pub title: Option<String>,
/// Description of the album
pub description: Option<String>,
pub datetime: i64,
@ -27,7 +27,7 @@ pub struct AlbumInfoData {
pub cover_width: i64,
pub cover_height: i64,
pub account_url: Option<String>,
pub account_id: Option<String>,
pub account_id: Option<AccountId>,
pub privacy: String,
pub layout: String,
pub views: i64,
@ -45,6 +45,13 @@ pub struct AlbumInfoData {
pub ad_config: AdConfig,
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
#[serde(untagged)]
pub enum AccountId {
String(String),
Int(i64),
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
pub struct AdConfig {
#[serde(rename = "safeFlags")]