Skip to content

Commit

Permalink
bump model version
Browse files Browse the repository at this point in the history
  • Loading branch information
greaka committed Mar 18, 2024
1 parent 4658cfe commit 49740f5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: integration_test

on:
push:
pull_request:
pull_request_target:
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions http/tests/pets.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![cfg(feature = "blocking")]

use gw2lib::{
model::game_mechanics::pets::{Pet, PetId},
Requester
model::game_mechanics::pets::{Pet, PetId},
Requester,
};

pub mod setup;
Expand Down
2 changes: 1 addition & 1 deletion model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gw2lib-model"
version = "2.1.4"
version = "2.1.5"
authors = ["Greaka <[email protected]>"]
edition = "2021"
workspace = "../"
Expand Down
4 changes: 3 additions & 1 deletion model/src/authenticated/characters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ use std::collections::HashMap;

use serde::{Deserialize, Serialize};

// todo: remove this pub use on next breaking version
pub use crate::game_mechanics::pets::PetId;
use crate::{
game_mechanics::{skills::SkillId, specializations::SpecializationId, traits::TraitId, pets::PetId},
game_mechanics::{skills::SkillId, specializations::SpecializationId, traits::TraitId},
items::{itemstats::StatsId, recipes::RecipeId, skins::SkinId, AttributeType, ItemId},
misc::{colors::ColorId, titles::TitleId},
pvp::amulets::AmuletId,
Expand Down
2 changes: 1 addition & 1 deletion model/src/game_mechanics.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod pets;
pub mod skills;
pub mod specializations;
pub mod traits;
pub mod pets;
16 changes: 8 additions & 8 deletions model/src/game_mechanics/pets.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
use serde::{Deserialize, Serialize};

use crate::*;
pub use crate::game_mechanics::skills::SkillId;
use crate::*;

pub type PetId = u16;

#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(test, serde(deny_unknown_fields))]
pub struct PetSkill {
pub id: SkillId,
pub id: SkillId,
}

#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[cfg_attr(test, serde(deny_unknown_fields))]
pub struct Pet {
pub id: PetId,
pub name: String,
pub description: String,
pub icon: Option<String>,
pub skills: Vec<PetSkill>,
pub id: PetId,
pub name: String,
pub description: String,
pub icon: Option<String>,
pub skills: Vec<PetSkill>,
}

impl Endpoint for Pet {
Expand All @@ -29,7 +29,7 @@ impl Endpoint for Pet {
}

impl EndpointWithId for Pet {
type IdType = PetId;
type IdType = PetId;
}

impl BulkEndpoint for Pet {
Expand Down

0 comments on commit 49740f5

Please sign in to comment.