Project

Chizuru

0.0
No commit activity in last 3 years
No release in over 3 years
Twitter bot framework
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

Chizuru

re-structured twitter bot framework

On RubyGems.org: https://rubygems.org/gems/Chizuru

Installation

Add this line to your application's Gemfile:

gem 'Chizuru'

And then execute:

$ bundle

Or install it yourself as:

$ gem install Chizuru

How To

Notice: See test.rb.

  1. Add require 'chizuru'.
  2. Define Consumer and Deliverer.
  3. Acquire the consumer secret and access token, and save it. We use YAML file that have these keys: consumer_key, consumer_secret, access_token, access_token_secret.
  4. Prepare the source. We provide the default source that uses UserStreaming. If you decide to use it, add require 'chizuru/user_stream' and set the instance of Chizuru::UserStream as the source in the next step. Otherwise, you must define the source class that is inherited from Chizuru::Source.
  5. Configure the bot. Use Chizuru::Bot.configure. Set the source and consumer.
  6. Start it!

Basic Structure

Source

Source provides the tweets. We provide UserStream class. It uses UserStreaming.

Consumer

Consumer receives tweets. Consumer must be inherited from Chizuru::Consumer, and must have receive(data) method.

Deliverer

Deliverer posts tweets. Deliverer must have deliver(data) method.

Contributing to Chizuru

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2013 mayth.

Chizuru is licensed under the MIT License. See LICENSE.txt.