Skip to content

NIcoZF/semaine2-mercredi-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot twitter with ruby

Little bot using the twitter gem (https://github.com/sferik/twitter)

Usage

require 'twitter'
require 'dotenv'
Dotenv.load

client = Twitter::REST::Client.new do |config|
  config.consumer_key        = ENV["TWITTER_CONSUMER_KEY"]
  config.consumer_secret     = ENV["TWITTER_CONSUMER_SECRET"]
  config.access_token        = ENV["TWITTER_ACCESS_TOKEN"]
  config.access_token_secret = ENV["TWITTER_ACCESS_TOKEN_SECRET"]
end

client.update('My first twwet in Ruby !!!!')

Good way to learn :

  • REST call to an API
  • Make safe his tokens (dotenv)
  • Have fun with ruby 😄

About

Small bot to learn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages