Code Monkey home page Code Monkey logo

rails_twitter_stream's Introduction

Rails Twitter Stream

Intro

This app uses Twitter Streaming api and 'tweetstream' gem to get live tweets results.

Installation

1. configure your tokens in /app/models/tweets.rb - this app uses dotenv gem (https://github.com/bkeepers/dotenv). Include '.env' file in your root directory, and save twitter tokens (https://apps.twitter.com/). Don't forget to include .env in your .gitignore file. 2. 'bundle install' 3. 'rails s' 4. Visit root page (localhost:3000) to see list of tweets and counts. 5. Note - the app is set to receive 1 min of streamed tweet results. If you want to change default min, go to /app/controllers/tweets_controller.rb and change min number in make_stream_request method. If streaming stops suddenly, the app would display saved results so far(tweet words saved in instance variable of Tweet model -> @store, @popular).

Improvements needed

1. Test Coverage. 2. Refactoring 3. Model, Controller renaming (implemented client for api request not related to tweet itself. Tweet -> TweetClient) 4. Takes too much time loading the results page. Live update and visualization of data would be great to implement.

Gems

1. dotenv-rails 2. awesome-print 3. tweetstream 4. eventmachine 5. pry-byebug (for dev, test only)

What you can expect

#1

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.