- Implement
TryFrom<i64>
forId<T>
type. - Introduce
Timestamp
newtype the Unix timestamp fields.
- Remove
ALL
constants from bitflags, use theall()
method instead. - Add new community options for games and mod objects.
- Fix wrong API endpoint url for the security code exchange
- Update
reqwest
to 0.12 - Implement
From
trait for newtype integer enums
- Implement
std::str::FromStr
forId<T>
.
- Add method to retrieve the content length for the download request.
The download request is now started when callingModio::download(action).await?
. - Add support for reordering mod media files & links.
- Add support for renaming tags.
- Add support for revoking the current access token.
- Add new
locked
field to game's platform object. - Expose the returned API error from response as getter.
- Use the
retry-after
http header for rate limit checking. - Map validation errors as a Vec of tupled strings instead of HashMap.
- Add new
dependencies
field to indicate if a mod has dependencies. - Remove the
service
parameter from the terms endpoint. - Remove unsupported authentication endpoints for GOG and itch.io.
- Move the
AccessToken
struct into thetypes::auth
module. - Introduce type-safe ID type for resource (games, mods, files, etc.).
TheId<T>
newtype wraps each resource ID as non-zero u64. - Change string enums to newtypes with associated constants.
- Make the
types
module public. - Remove deprecated & unstable items:
virustotal_hash
field from mods.revenue_options
field from games.- deprecated flags from
community_options
. MonetisationOptions
from games and mods.
- Move
serde_test
to dev dependencies.
- Add workaround for renamed
monetisation_options
field. - Increase size of community options for games.
- Add workaround for missing
monetisation_options
field for mods. - Export missing bitflags options for games and mods.
- Update bitflags to allow unsupported flags.
- Change the game's maturity options into bitflags.
- Change the virus scan status & result fields into enums.
- Add community options for mods.
- Add new monetisation options and deprecate the revenue options.
- Change number enums to newtypes with associated constants.
// Before
pub enum Visibility {
Hidden,
Public,
Unknown(u8),
}
impl From<Visibility> for u8 {
fn from(vis: Visibility) -> Self {
match vis {
Visibility::Hidden => 0,
Visibility::Public => 1,
Visibility::Unknown(value) => value,
}
}
}
// After
pub struct Visibility(u8);
impl Visibility {
pub const HIDDEN: Self = Self(0);
pub const PUBLIC: Self = Self(1);
fn new(raw_value: u8) -> Self { Self(raw_value) }
fn get(self) -> u8 { self.0 }
}
- Export the
VirusScan
struct for mod files. - Deprecate virustotal hash string for mod files.
- Add uncompressed filesize attribute for mod files.
- Add new
Source
platform.
- Bump MSRV to 1.60
- Add new community options for games
- Add missing
Clone
trait impls
- Make the endpoint & reference types clonable.
-
Add support for muting users.
-
Update/add fields to several structs.
Game
: +stats +theme +other_urlsTagOption
: +locked ModStatistics
: +downloads_today ModComment
: +resource_id -mod_id -karma_guest -
Remove the
submitted_by
field from the game object. -
Edit game endpoint is removed.
-
Add/edit/delete endpoints for team members are removed.
-
Add support for the new
platforms
fields of game, mod and modfile structs. -
Update supported target platforms & portals. (Platform: +Oculus -Wii, Portal: +Facebook +Discord)
-
Rename
EventType::Other
enum variants toUnknown
. -
Preserve values for unknown enum variants.
-
Fix missing feature for
tokio-util
. -
Add EGS as a service for the terms endpoint.
-
Add support for the
X-Modio-Platform
/X-Modio-Portal
headers. -
Add new
tag_count
field toTagOption
. -
Add Google auth endpoint.
-
Allow mod rating to be reset.
-
Add support for the new terms endpoint.
-
Add error variant for the case when the acceptance of Terms of Use is required.
-
Don't ignore deserialization errors for metadata kvp data.
-
Make cloning of the client cheaper.
-
Fix the deserialization of mod event types for unknown events.
-
Improve serde's error message for untagged enums
- Update to tokio 1.0 and reqwest 0.11
- Update pin-project-lite to 0.2.
-
Improve the crate description.
-
Rearrange the readme badges + MSRV badge.
-
Switch to
async/await
,std::future
andtokio 0.2
. -
Rework the
Error
type, remove severalError::is_*
methods. (a230d3c) -
Replace
DownloadAction::Url
withDownloadAction::FileObj
. (1fd5ff6, 8fbd8d1) -
Introduce
Downloader
withsave_to_file(path)
,bytes()
andstream()
methods. (3ba706a, b4b7a87)
// Before
let action = modio::DownloadAction::Primary {
game_id: 123,
mod_id: 45,
};
let file = std::file::File::create("mod.zip")?;
let (len, out) = rt.block_on(modio.download(action, out))?;
// After
modio.download(action).save_to_file("mod.zip").await?;
let bytes: Bytes = modio.download(action).bytes().await?;
let stream = Box::pin(modio.download(action).stream());
while let Some(bytes) = stream.try_next().await? {
// process(bytes)
}
-
Remove
Users::get|list|iter
methods. The/users
endpoints are no longer supported. (1c547aa) -
Replace list & iter methods with
search(filter)
returning theQuery<T>
type which implements various methods to load search results. (ebf5374, f8a35de)
// Before
let stream = modio.games().iter(&filter);
let first_page: modio::List<Game> = rt.block_on(modio.games().list(&filter));
// After
let stream = modio.games().search(filter).iter().await?;
let first: Option<Game> = modio.games().search(filter).first().await?;
let first_page: Vec<Game> = modio.games().search(filter).first_page().await?;
let list: Vec<Game> = modio.games().search(filter).collect().await?;
// stream of `modio::Page<Game>`
let stream = modio.games().search(filter).paged().await?;
-
Add Oculus, itch.io, Xbox Live, Discord & Switch authentication. (5d46974, 2315236, 96fdc07, 013f43d, 38698cc)
-
Add expiry date of the access token. (9445c3c)
-
Remove all deprecated code. (c3032af)
-
Update
url
to v2.0. -
Use
tracing
instead oflog
. (0a1c2e4) -
New endpoints for adding & editing comments and game stats. (1062775, 633cf28)
-
New event type variants for added/deleted comments and unsupported with
Other(String)
. (8a85576, d636096) -
Add modio's new
error_ref
error code. (24b7c33)
-
New
Error::is_authentication
accessor -
Fix typo
EditDependenciesOptions
-
Replace
ModioResult
with deprecated type alias forEntityResult
. -
Replace
ModioListResponse
with deprecated type alias forList
.
- Add new
modio::games::CommunityOptions::DISABLE_SUBSCRIBE
flag. (bde909fd)
- A
Builder
to create aModio
client with custom configuration. (45de8cc6)
let creds = Credentials::Token("<token>".to_string());
let modio = Modio::builder(creds)
.host("host")
.agent("user-agent")
.build()?;
- Proxy support (2b12b40a)
let proxy = modio::client::Proxy::all("http://127.0.0.1:8888")?;
let modio = Modio::builder(creds)
.proxy(proxy)
.build()?;
-
Add optional
rustls-tls
feature to use rustls instead of native-tls. (a12b4aa8)if compiled with
default-tls
andrustls-tls
features then it's possible to choose the backend withBuilder::use_default_tls()
andBuilder::use_rustls_tls()
. -
Add methods to provide streams over entities. (39bd3287, 2a47d67c)
use modio::filter::prelude::*;
let filter = Fulltext::eq("foobar");
let mods = game.mods().iter(&filter).for_each(|m| {
// do stuff
});
let stats = game.mods().statistics(&Default::default()).for_each(|stats| {
// do stuff
});
-
Add type alias
List<T>
forModioListResponse<T>
. -
Add Steam authentication
modio.auth().steam_auth("<auth-ticket>")
. (60072f86) -
Add GOG Galaxy authentication
modio.auth().gog_auth("<auth-ticket>")
. (6e1b1e67) -
Link external accounts
modio.auth().link("email", modio::auth::Service)
. (30b158ab) -
modio::me::Event
with new fieldgame_id
. -
Validate credentials before sending requests.
-
debug & trace log for requests & responses.
-
Rewrite of filtering and sorting. (e94c4dcd)
// Before use modio::filter::{Operator, Order}; let mut opts = ModsListOptions::new(); opts.game_id(Operator::In, vec![1, 2]); opts.limit(10); opts.sort_by(ModsListOptions::POPULAR, Order::Desc); // After use modio::filter::prelude::*; use modio::mods::filters::{GameId, Popular}; let filter = GameId::_in(vec![1, 2]) .limit(10) .order_by(Popular::desc());
-
Removed builders of all *Options types and changed the options to be by-value instead of by-ref. (7fe661b6, 07c3ecb6)
// Before let mut builder = EditModOptions::builder(); if some_val { builder.name("foobar"); } let opts = builder.build(); modio.mod_(34, 101).edit(&opts); // After let mut opts = EditModOptions::default(); if some_val { opts = opts.name("foobar"); } modio.mod_(34, 101).edit(&opts);
-
GameRef::edit
,ModRef::edit
andFileRef::edit
are now returningFuture<modio::ModioResult<T>>
. (6b31ac4a) -
Switch from
hyper
toreqwest
. Type parameter forModio
is no longer necessary. -
Drop
failure
crate again and implement std error trait. -
Restrict conversion to
Error
to internal use only. (1ac2b471) -
Modio::new
andModio::host
returnResult<Modio>
. -
Modio::custom
removed in flavor ofBuilder
. -
User-Agent parameter removed from
Modio::new
andModio::host
. -
No longer expose
ModioMessage
. -
New ErrorKind for validation errors. (ca4fe09b)
-
Map status, visibility and other options as enums and bitfields as
bitflags
. (97a86e8a, f2f1acec) -
Break up event & event types to
modio::me::{Event, EventType}
andmodio::mods::{Event, EventType}
. (57fc4447) -
Change
Me::{events, subscriptions, ratings}
,Mods::{events, statistics}
andMod::events
to streams over entities. (2a47d67c)
- builtin method
Modio::download
for downloading files (c4029f1b)
- reworked errors with
failure
crate (0acc1e80)
-
add missing
Mod::stats
property (0af0580b) -
update dev dependencies to fix build issues with openssl (41a143e5)
-
new method to add custom filters to list options (a81771c4)
-
use the new endpoint
/me/ratings
to list the submitted mod ratings (09117df5) -
new property
total
forModioListResponse
added (f2d84642) -
new read-only property
Mod::description_plaintext
(743b5c5c) -
fixed query string separator (fa90195c)
-
Mod::rating_summary
is gone. Replaced with the new statistics endpointsMods::statistics
andModRef::statistics
.(33388dd3)