activitystreams/activitystreams-types
2019-10-28 18:25:24 -05:00
..
src Update to 2018 edition 2019-10-28 18:18:12 -05:00
Cargo.toml Update to 2018 edition 2019-10-28 18:18:12 -05:00
LICENSE Move licences around 2018-05-13 22:29:44 -05:00
README.md Update readmes 2019-10-28 18:25:24 -05:00

ActivityStreams Types

A base set of types from the Activity Streams specification.

Usage

First, add the crate to your cargo.toml

# Cargo.toml

activitystreams-types = "0.3"

Then use it in your project!

// in your project

use activitystreams_types::{context, link::Mention};
use failure::Error;

fn run() -> Result<(), Error> {
    /// A Mention is the only predefined Link type in the Activity Streams spec
    let mut mention = Mention::default();
    mention.link_props.set_context_object(context())?;

    let mention_string = serde_json::to_string(&mention)?;

    let mention: Mention = serde_json::from_str(&mention_string)?;

    Ok(())
}

Contributing

Feel free to open issues for anything you find an issue with. Please note that any contributed code will be licensed under the GPLv3.

License

Copyright © 2018 Riley Trautman

ActivityStreams Types is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ActivityStreams Types is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This file is part of ActivityStreams Types.

You should have received a copy of the GNU General Public License along with ActivityStreams Types. If not, see http://www.gnu.org/licenses/.