Skip to content

Latest commit

History

History
478 lines (326 loc) 路 16.1 KB

CHANGELOG.md

File metadata and controls

478 lines (326 loc) 路 16.1 KB

v0.11.0 (2024-06-04)

  • Remove ALL constants from bitflags, use the all() method instead.
  • Add new community options for games and mod objects.

v0.10.1 (2024-04-11)

  • Fix wrong API endpoint url for the security code exchange

v0.10.0 (2024-03-21)

  • Update reqwest to 0.12
  • Implement From trait for newtype integer enums

v0.9.1 (2023-11-12)

  • Implement std::str::FromStr for Id<T>.

v0.9.0 (2023-11-09)

  • Add method to retrieve the content length for the download request.
    The download request is now started when calling Modio::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 the types::auth module.
  • Introduce type-safe ID type for resource (games, mods, files, etc.).
    The Id<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.

v0.8.3 (2023-10-02)

  • Move serde_test to dev dependencies.

v0.8.2 (2023-09-22)

  • Add workaround for renamed monetisation_options field.
  • Increase size of community options for games.

v0.8.1 (2023-09-21)

  • Add workaround for missing monetisation_options field for mods.
  • Export missing bitflags options for games and mods.

v0.8.0 (2023-06-26)

  • 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 }
}

v0.7.4 (2023-06-12)

  • Export the VirusScan struct for mod files.
  • Deprecate virustotal hash string for mod files.
  • Add uncompressed filesize attribute for mod files.

v0.7.3 (2023-06-09)

  • Add new Source platform.

v0.7.2 (2023-03-17)

  • Bump MSRV to 1.60
  • Add new community options for games
  • Add missing Clone trait impls

v0.7.1 (2022-11-21)

  • Make the endpoint & reference types clonable.

v0.7.0 (2022-09-01)

  • Add support for muting users.

  • Update/add fields to several structs. Game: +stats +theme +other_urls TagOption: +locked Mod Statistics: +downloads_today Mod Comment: +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 to Unknown.

  • Preserve values for unknown enum variants.

v0.6.3 (2022-08-08)

  • 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 to TagOption.

  • Add Google auth endpoint.

  • Allow mod rating to be reset.

v0.6.2 (2021-02-13)

  • 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.

v0.6.1 (2021-01-28)

  • Make cloning of the client cheaper.

  • Fix the deserialization of mod event types for unknown events.

  • Improve serde's error message for untagged enums

v0.6.0 (2021-01-05)

  • Update to tokio 1.0 and reqwest 0.11

v0.5.2 (2020-11-24)

  • Update pin-project-lite to 0.2.

v0.5.1 (2020-11-10)

  • Improve the crate description.

  • Rearrange the readme badges + MSRV badge.

v0.5 (2020-11-02)

  • Switch to async/await, std::future and tokio 0.2.

  • Rework the Error type, remove several Error::is_* methods. (a230d3c)

  • Replace DownloadAction::Url with DownloadAction::FileObj. (1fd5ff6, 8fbd8d1)

  • Introduce Downloader with save_to_file(path), bytes() and stream() 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 the Query<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 of log. (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)

v0.4.2 (not released)

  • New Error::is_authentication accessor

  • Fix typo EditDependenciesOptions

  • Replace ModioResult with deprecated type alias for EntityResult.

  • Replace ModioListResponse with deprecated type alias for List.

v0.4.1 (2020-02-05)

  • Add new modio::games::CommunityOptions::DISABLE_SUBSCRIBE flag. (bde909fd)

v0.4 (2019-04-01)

Features

  • A Builder to create a Modio client with custom configuration. (45de8cc6)
let creds = Credentials::Token("<token>".to_string());
let modio = Modio::builder(creds)
    .host("host")
    .agent("user-agent")
    .build()?;
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 and rustls-tls features then it's possible to choose the backend with Builder::use_default_tls() and Builder::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> for ModioListResponse<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 field game_id.

  • Validate credentials before sending requests.

  • debug & trace log for requests & responses.

Breaking Changes

  • 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 and FileRef::edit are now returning Future<modio::ModioResult<T>>. (6b31ac4a)

  • Switch from hyper to reqwest. Type parameter for Modio is no longer necessary.

  • Drop failure crate again and implement std error trait.

  • Restrict conversion to Error to internal use only. (1ac2b471)

  • Modio::new and Modio::host return Result<Modio>.

  • Modio::custom removed in flavor of Builder.

  • User-Agent parameter removed from Modio::new and Modio::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} and modio::mods::{Event, EventType}. (57fc4447)

  • Change Me::{events, subscriptions, ratings}, Mods::{events, statistics} and Mod::events to streams over entities. (2a47d67c)

v0.3 (2018-10-04)

  • builtin method Modio::download for downloading files (c4029f1b)

Breaking Changes

  • reworked errors with failure crate (0acc1e80)

v0.2.2 (2018-09-20)

  • 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)

v0.2.1 (2018-09-10)

  • use the new endpoint /me/ratings to list the submitted mod ratings (09117df5)

  • new property total for ModioListResponse added (f2d84642)

  • new read-only property Mod::description_plaintext (743b5c5c)

  • fixed query string separator (fa90195c)

v0.2.0 (2018-08-09)

Breaking Changes

  • Mod::rating_summary is gone. Replaced with the new statistics endpoints Mods::statistics and ModRef::statistics.

    (33388dd3)