diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fdb2ec9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Unreleased + +# 0.7.0-alpha.3 +- Add `.into_parts()` for some types where it makes sense + - All activity subtypes + - ApActor + - ApObject + +# 0.7.0-alpha.2 +- Add `.iter()`, `.iter_mut()` and `.into_iter()` for `OneOrMany` + +# 0.7.0-alpha.1 +- The `items` methods for collections now deal in options + +# 0.7.0-alpha.0 +- Complete rewrite from 0.6.x, [check the docs](https://docs.rs/activitystreams) diff --git a/activitystreams-ext/CHANGELOG.md b/activitystreams-ext/CHANGELOG.md new file mode 100644 index 0000000..5ec0a9f --- /dev/null +++ b/activitystreams-ext/CHANGELOG.md @@ -0,0 +1,10 @@ +# Unreleased + +# 0.1.0-alpha.2 +Fix docs + +# 0.1.0-alpha.1 +Add `.into_parts()` for ext types + +# 0.1.0-alpha.0 +Initial release diff --git a/activitystreams-ext/Cargo.toml b/activitystreams-ext/Cargo.toml index b555392..aecd0ce 100644 --- a/activitystreams-ext/Cargo.toml +++ b/activitystreams-ext/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "activitystreams-ext" description = "Extension types for the ActivityStreams crate" -version = "0.1.0-alpha.1" +version = "0.1.0-alpha.2" license = "GPL-3.0" authors = ["asonix "] repository = "https://git.asonix.dog/Aardwolf/activitystreams" diff --git a/activitystreams-ext/README.md b/activitystreams-ext/README.md index 0bfa607..2ffe130 100644 --- a/activitystreams-ext/README.md +++ b/activitystreams-ext/README.md @@ -12,7 +12,7 @@ First, add ActivityStreams to your dependencies ```toml [dependencies] activitystreams = "0.7.0-alpha.3" -activitystreams-ext = "0.1.0-alpha.1" +activitystreams-ext = "0.1.0-alpha.2" ``` For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1 diff --git a/activitystreams-ext/examples/public_key.rs b/activitystreams-ext/examples/public_key.rs index 8232aa1..0478c7a 100644 --- a/activitystreams-ext/examples/public_key.rs +++ b/activitystreams-ext/examples/public_key.rs @@ -1,12 +1,12 @@ -use activitystreams_ext::{Ext1, UnparsedExtension}; use activitystreams::{ actor::{ApActor, Person}, context, prelude::*, - primitives::XsdAnyUri, security, unparsed::UnparsedMutExt, + url::Url, }; +use activitystreams_ext::{Ext1, UnparsedExtension}; #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "camelCase")] @@ -17,8 +17,8 @@ pub struct PublicKey { #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "camelCase")] pub struct PublicKeyInner { - id: XsdAnyUri, - owner: XsdAnyUri, + id: Url, + owner: Url, public_key_pem: String, } @@ -43,11 +43,7 @@ where pub type ExtendedPerson = Ext1, PublicKey>; fn main() -> Result<(), anyhow::Error> { - let actor = ApActor::new( - "http://in.box".parse()?, - "http://out.box".parse()?, - Person::new(), - ); + let actor = ApActor::new("http://in.box".parse()?, Person::new()); let mut person = Ext1::new( actor, diff --git a/activitystreams-ext/src/lib.rs b/activitystreams-ext/src/lib.rs index baa9623..24bd6c7 100644 --- a/activitystreams-ext/src/lib.rs +++ b/activitystreams-ext/src/lib.rs @@ -12,20 +12,20 @@ //! ```toml //! [dependencies] //! activitystreams = "0.7.0-alpha.3" -//! activitystreams-ext = "0.1.0-alpha.1" +//! activitystreams-ext = "0.1.0-alpha.2" //! ``` //! //! For an example, we'll implement a PublicKey extension and demonstrate usage with Ext1 //! ```rust -//! use activitystreams_ext::{Ext1, UnparsedExtension}; //! use activitystreams::{ //! actor::{ApActor, Person}, //! context, //! prelude::*, -//! primitives::XsdAnyUri, //! security, //! unparsed::UnparsedMutExt, +//! url::Url, //! }; +//! use activitystreams_ext::{Ext1, UnparsedExtension}; //! //! #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] //! #[serde(rename_all = "camelCase")] @@ -36,8 +36,8 @@ //! #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] //! #[serde(rename_all = "camelCase")] //! pub struct PublicKeyInner { -//! id: XsdAnyUri, -//! owner: XsdAnyUri, +//! id: Url, +//! owner: Url, //! public_key_pem: String, //! } //! @@ -62,11 +62,7 @@ //! pub type ExtendedPerson = Ext1, PublicKey>; //! //! fn main() -> Result<(), anyhow::Error> { -//! let actor = ApActor::new( -//! "http://in.box".parse()?, -//! "http://out.box".parse()?, -//! Person::new(), -//! ); +//! let actor = ApActor::new("http://in.box".parse()?, Person::new()); //! //! let mut person = Ext1::new( //! actor,