Coder Social home page Coder Social logo

gitter-rs's Introduction

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.

gitter-rs's People

Contributors

shmutalov avatar vitvakatu avatar wmorgue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gitter-rs's Issues

Запили уже один из Stream'ов!

Что бы библиотека была юзабельной хоть чуть-чуть, нужно реализовать один из методов стриминга указаных в плане разработки (Streaming API, Faye).

Я как-то пытался этим делом занятся, но увяз в чтении протоколов Bayeux/CometD и вебсокетов. Наткнулся на несколько вебсокетных либ, которые, как мне показалось, не очень-то и удобные (автор одного из них даже не скрывает это). Плюс, ко всему этому, мой малый опыт в расте был одним из камней преткновения: я погряз сражаясь с компилятором :(

Думаю создать тему на форуме и получить советы, как бы это сделать правильно, чтобы было и удобно мне (в реализации) и удобно конечному пользователю библиотеки.

Да, вы правильно поняли, реализацию я хочу написать сам, и отказываюсь от пулреквестов.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.