daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Dec 12th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require 'sinatra'
  2. require 'twitter'
  3.  
  4. get '/' do
  5.  
  6.   # Assign the parameter value of `query` to the instance variable `@query`
  7.   @query = params['query']
  8.  
  9.   client = Twitter::Client.new
  10.   tweet_container = client.search(@query)
  11.   @tweets = tweet_container.results
  12.  
  13.   erb :index
  14. end
  15.  
  16. get '/about_me' do
  17.   erb :about_me
  18. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top