66 lines
2.2 KiB
Rust
66 lines
2.2 KiB
Rust
use spaceapi::{Contact, Feed, Feeds, Icon, IssueReportChannel, Location, State, Status, StatusBuilder};
|
|
|
|
|
|
|
|
fn fetch_room_state() -> Option<bool> {
|
|
None
|
|
}
|
|
|
|
pub fn build_status_v13() -> Status {
|
|
build_status(StatusBuilder::v0_13)
|
|
.add_issue_report_channel(IssueReportChannel::Ml)
|
|
.add_issue_report_channel(IssueReportChannel::IssueMail)
|
|
.build()
|
|
.expect("Creating status failed")
|
|
}
|
|
|
|
pub fn build_status_v14() -> Status {
|
|
build_status(StatusBuilder::v14)
|
|
.build()
|
|
.expect("Creating status failed")
|
|
}
|
|
|
|
fn build_status(builder: fn(String) -> StatusBuilder) -> StatusBuilder {
|
|
builder("Chaostreff Dortmund".into())
|
|
.logo("https://www.chaostreff-dortmund.de/presse/logo/logo_ctdo.png")
|
|
.url("https://www.chaostreff-dortmund.de/")
|
|
.state(State {
|
|
open: fetch_room_state(),
|
|
icon: Some(Icon {
|
|
open: "https://status.ctdo.de/img/green.png".into(),
|
|
close: "https://status.ctdo.de/img/red.png".into(),
|
|
}),
|
|
..State::default()
|
|
})
|
|
.location(
|
|
Location {
|
|
address: Some("Braunschweiger Str 22, 44145 Dortmund, Germany".into()),
|
|
lat: 51.527611,
|
|
lon: 7.4649449,
|
|
})
|
|
.contact(
|
|
Contact {
|
|
phone: Some("+49 231 8 404 777".into()),
|
|
irc: Some("irc://irc.hackint.eu/#ccc.do".into()),
|
|
ml: Some("discuss@lists.chaostreff-dortmund.de".into()),
|
|
twitter: Some("@ctdo".into()),
|
|
issue_mail: Some("vorstand@chaostreff-dortmund.de".into()),
|
|
matrix: Some("#ccc.do:hackint.org".into()),
|
|
..Default::default()
|
|
})
|
|
.feeds(Feeds {
|
|
blog: Some(Feed {
|
|
url: "https://www.chaostreff-dortmund.de".into(),
|
|
..Feed::default()
|
|
}),
|
|
calendar: Some(Feed {
|
|
url: "https://www.chaostreff-dortmund.de/kalender/".into(),
|
|
..Feed::default()
|
|
}),
|
|
wiki: Some(Feed {
|
|
url: "https://wiki.chaostreff-dortmund.de".into(),
|
|
..Feed::default()
|
|
}),
|
|
..Feeds::default()
|
|
})
|
|
} |