git
gitter
cargo install gitter
git

gitter

A library that provides Gitter API

by Sherzod Mutalov

0.4.0 (see all)License:MIT/Apache-2.0
cargo install gitter
Readme

gitter-rs

license gitter-rs on crates.io Join the chat at https://gitter.im/gitter-rs/general

Gitter API in Rust

WIP

https://developer.gitter.im

Building

cargo build

Install

Current version

[dependencies]
gitter = "0.4.0"

Development version

[dependencies]
gitter = { git = "https://github.com/shmutalov/gitter-rs" }

Initialize

extern crate gitter;
use gitter::Gitter;

...

let api = Gitter::new("YOUR_ACCESS_TOKEN").unwrap();

Following code snippets did not updated yet

Users

  • Get current user

    let user = api.get_user().unwrap();

Rooms

// Get all rooms
let rooms = api.get_rooms().unwrap();

// Get room by id
let room = api.get_room("roomID").unwrap();

// Get rooms of some user
let rooms = api.get_rooms("userID").unwrap();

// Join room
let room = api.join_room("roomID", "userID").unwrap();

// Leave room
let room = api.leave_room("roomID", "userID").unwrap();

// Get room id
let room_id = api.get_room_id("room/uri").unwrap();

// Search gitter rooms
let rooms = api.search_rooms("search/string").unwrap();

Messages

// Get messages of room
let messages = api.get_messages("roomID", None).unwrap();

// Get one message
let message = api.get_message("roomID", "messageID").unwrap();

// Send message
api.send_message("roomID", "free chat text").unwrap();

Roadmap

This project is a work in progress.

  • Implement base Rest API's and add some tests
  • Test send_message method
  • Implement all Rest API methods
  • Add support for Streaming API
  • Add support for Faye [Optional]
  • Add support for automated access token retreive via Github authentification
  • Cover with tests
  • Add examples

License

gitter-rs is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

GitHub Stars

14

LAST COMMIT

4yrs ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.4.0
4yrs ago
0.3.0
4yrs ago
0.2.0
4yrs ago
0.1.3
5yrs ago
No alternatives found
No tutorials found
Add a tutorial