From a9b6b528906c51c947101a9d6c0ee50a76ef2050 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Tue, 21 Aug 2018 17:01:05 -0400 Subject: [PATCH] Change mammut references to elefren --- Cargo.toml | 8 ++++---- README.md | 20 ++++++++++---------- examples/register.rs | 10 +++++----- src/apps.rs | 4 ++-- src/entities/itemsiter.rs | 4 ++-- src/lib.rs | 24 ++++++++++++------------ src/registration.rs | 12 ++++++------ src/status_builder.rs | 2 +- 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c232600..27c391b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "mammut" -version = "0.11.0" +name = "elefren" +version = "0.12.0" description = "A wrapper around the Mastodon API." -authors = ["Aaron Power "] +authors = ["Aaron Power ", "Paul Woolcock "] license = "MIT/Apache-2.0" readme = "README.md" -repository = "https://github.com/Aaronepower/mammut.git" +repository = "https://github.com/pwoolcoc/elefren.git" keywords = ["api", "web", "social", "mastodon", "wrapper"] categories = ["web-programming", "http-client"] diff --git a/README.md b/README.md index 3e15415..16817c7 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ -# Mammut. A API Wrapper for the Mastodon API. +# Elefren. A API Wrapper for the Mastodon API. -[![crates.io](https://img.shields.io/crates/v/mammut.svg)](https://crates.io/crates/mammut) -[![Docs](https://docs.rs/mammut/badge.svg)](https://docs.rs/mammut) -[![MIT/APACHE-2.0](https://img.shields.io/crates/l/mammut.svg)](https://crates.io/crates/mammut) +[![crates.io](https://img.shields.io/crates/v/elefren.svg)](https://crates.io/crates/elefren) +[![Docs](https://docs.rs/elefren/badge.svg)](https://docs.rs/elefren) +[![MIT/APACHE-2.0](https://img.shields.io/crates/l/elefren.svg)](https://crates.io/crates/elefren) -## [Documentation](https://docs.rs/mammut/) +## [Documentation](https://docs.rs/elefren/) A wrapper around the [API](https://github.com/tootsuite/mastodon/blob/master/docs/Using-the-API/API.md#tag) for [Mastodon](https://mastodon.social/) ```rust -extern crate mammut; +extern crate elefren; extern crate toml; use std::io; use std::fs::File; use std::io::prelude::*; -use mammut::{Data, Mastodon, Registration}; -use mammut::apps::{AppBuilder, Scopes}; +use elefren::{Data, Mastodon, Registration}; +use elefren::apps::{AppBuilder, Scopes}; fn main() { let mastodon = match File::open("mastodon-data.toml") { @@ -37,10 +37,10 @@ fn main() { fn register() -> Mastodon { let app = AppBuilder { - client_name: "mammut-examples", + client_name: "elefren-examples", redirect_uris: "urn:ietf:wg:oauth:2.0:oob", scopes: Scopes::Read, - website: Some("https://github.com/Aaronepower/mammut"), + website: Some("https://github.com/pwoolcoc/elefren"), }; let mut registration = Registration::new("https://mastodon.social"); diff --git a/examples/register.rs b/examples/register.rs index 89c05e5..e3b6179 100644 --- a/examples/register.rs +++ b/examples/register.rs @@ -1,7 +1,7 @@ -extern crate mammut; +extern crate elefren; extern crate toml; -pub use self::mammut::MastodonClient; +pub use self::elefren::MastodonClient; use std::{ error::Error, @@ -9,7 +9,7 @@ use std::{ io, }; -use self::mammut::{ +use self::elefren::{ apps::{ AppBuilder, Scopes @@ -36,10 +36,10 @@ pub fn get_mastodon_data() -> Result> { pub fn register() -> Result> { let app = AppBuilder { - client_name: "mammut-examples", + client_name: "elefren-examples", redirect_uris: "urn:ietf:wg:oauth:2.0:oob", scopes: Scopes::All, - website: Some("https://github.com/Aaronepower/mammut"), + website: Some("https://github.com/pwoolcoc/elefren"), }; let website = read_line("Please enter your mastodon instance url:")?; diff --git a/src/apps.rs b/src/apps.rs index 61cae43..00c64a2 100644 --- a/src/apps.rs +++ b/src/apps.rs @@ -2,10 +2,10 @@ use std::fmt; /// Builder struct for defining your application. /// ``` -/// use mammut::apps::{AppBuilder, Scopes}; +/// use elefren::apps::{AppBuilder, Scopes}; /// /// let app = AppBuilder { -/// client_name: "mammut_test", +/// client_name: "elefren_test", /// redirect_uris: "urn:ietf:wg:oauth:2.0:oob", /// scopes: Scopes::Read, /// website: None, diff --git a/src/entities/itemsiter.rs b/src/entities/itemsiter.rs index e5f835a..dbf8f03 100644 --- a/src/entities/itemsiter.rs +++ b/src/entities/itemsiter.rs @@ -4,8 +4,8 @@ use serde::Deserialize; /// Abstracts away the `next_page` logic into a single stream of items /// /// ```no_run -/// # extern crate mammut; -/// # use mammut::{Data, Mastodon, MastodonClient}; +/// # extern crate elefren; +/// # use elefren::{Data, Mastodon, MastodonClient}; /// # use std::error::Error; /// # fn main() -> Result<(), Box> { /// # let data = Data { diff --git a/src/lib.rs b/src/lib.rs index 4894b8c..e5f11d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,19 +1,19 @@ -//! # Mammut: API Wrapper around the Mastodon API. +//! # Elefren: API Wrapper around the Mastodon API. //! //! Most of the api is documented on [Mastodon's //! github](https://github.com/tootsuite/mastodon/blob/master/docs/Using-the-API/API.md#tag) //! //! ```no_run -//! # extern crate mammut; +//! # extern crate elefren; //! # fn main() { //! # try().unwrap(); //! # } -//! # fn try() -> mammut::Result<()> { -//! use mammut::{MastodonClient, Registration}; -//! use mammut::apps::{AppBuilder, Scopes}; +//! # fn try() -> elefren::Result<()> { +//! use elefren::{MastodonClient, Registration}; +//! use elefren::apps::{AppBuilder, Scopes}; //! //! let app = AppBuilder { -//! client_name: "mammut_test", +//! client_name: "elefren_test", //! redirect_uris: "urn:ietf:wg:oauth:2.0:oob", //! scopes: Scopes::Read, //! website: None, @@ -345,8 +345,8 @@ pub struct ApiError { /// # Example /// /// ``` -/// # extern crate mammut; -/// # use mammut::StatusesRequest; +/// # extern crate elefren; +/// # use elefren::StatusesRequest; /// let request = StatusesRequest::new() /// .only_media() /// .pinned() @@ -650,8 +650,8 @@ impl MastodonClient for Mastodon { /// # Example /// /// ```no_run - /// # extern crate mammut; - /// # use mammut::{Data, Mastodon, MastodonClient}; + /// # extern crate elefren; + /// # use elefren::{Data, Mastodon, MastodonClient}; /// # use std::error::Error; /// # fn main() -> Result<(), Box> { /// # let data = Data { @@ -668,8 +668,8 @@ impl MastodonClient for Mastodon { /// ``` /// /// ```no_run - /// # extern crate mammut; - /// # use mammut::{Data, Mastodon, MastodonClient, StatusesRequest}; + /// # extern crate elefren; + /// # use elefren::{Data, Mastodon, MastodonClient, StatusesRequest}; /// # use std::error::Error; /// # fn main() -> Result<(), Box> { /// # let data = Data { diff --git a/src/registration.rs b/src/registration.rs index b977dcf..baceed3 100644 --- a/src/registration.rs +++ b/src/registration.rs @@ -29,7 +29,7 @@ struct AccessToken { impl Registration { /// Construct a new registration process to the instance of the `base` url. /// ``` - /// use mammut::registration::Registration; + /// use elefren::registration::Registration; /// /// let registration = Registration::new("https://mastodon.social"); /// ``` @@ -47,16 +47,16 @@ impl Registration { /// Register the application with the server from the `base` url. /// /// ```no_run - /// # extern crate mammut; + /// # extern crate elefren; /// # fn main() { /// # try().unwrap(); /// # } - /// # fn try() -> mammut::Result<()> { - /// use mammut::{MastodonClient, Registration}; - /// use mammut::apps::{AppBuilder, Scopes}; + /// # fn try() -> elefren::Result<()> { + /// use elefren::{MastodonClient, Registration}; + /// use elefren::apps::{AppBuilder, Scopes}; /// /// let app = AppBuilder { - /// client_name: "mammut_test", + /// client_name: "elefren_test", /// redirect_uris: "urn:ietf:wg:oauth:2.0:oob", /// scopes: Scopes::Read, /// website: None, diff --git a/src/status_builder.rs b/src/status_builder.rs index c35cc31..3da8c91 100644 --- a/src/status_builder.rs +++ b/src/status_builder.rs @@ -41,7 +41,7 @@ impl StatusBuilder { /// Create a new status with text. /// ``` - /// use mammut::status_builder::StatusBuilder; + /// use elefren::status_builder::StatusBuilder; /// /// let status = StatusBuilder::new("Hello World!".into()); /// ```