Nothing has been indexed for 0.6.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  hqtrivia:
    github: taylorfinnell/hqtrivia
    version: ~> 0.6.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.6.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

hqtrivia

A small framework for building HQ Trivia and HQ Words bots.

Installation

Add this to your application's shard.yml:

dependencies:
  hqtrivia:
    github: taylorfinnell/hqtrivia

Usage

require "hqtrivia"
class WordFrequencyBot
  include HqTrivia::Bot

  getter words
  @words = {} of String => Int32

  def handle_message(message : HqTrivia::Model::Interaction)
    message.metadata.message.split(/\s/).each do |word|
      @words[word.downcase] ||= 0
      @words[word.downcase] +=  1
    end
  end
end

coordinator = HqTrivia::HqCoordinator.new("us")
HqTrivia.on_show(coordinator) do |show|
  bot = WordFrequencyBot.new(coordinator)

  bot.play
end

HQ Trivia Messages

  • HqTriva::Model::Question
  • HqTriva::Model::QuestionSummary
  • HqTriva::Model::QuestionFinished
  • HqTriva::Model::GameSummary
  • HqTriva::Model::SurveyQuestion
  • HqTriva::Model::SurveyResults
  • HqTriva::Model::Checkpoint
  • HqTriva::Model::CheckpointSummary

HQ Words Messages

  • HqTriva::Model::ShowWheel
  • HqTriva::Model::HideWheel
  • HqTriva::Model::StartRound
  • HqTriva::Model::EndRound
  • HqTriva::Model::WordsGameResult

HQ Heart Messages

  • HeartEpisodeWinners
  • HeartFinalistIntro
  • HeartFinalistUploadStatus
  • HeartFinalistUploadUpdate
  • HeartFinalistVote
  • HeartFinalistWalkthrough
  • HeartPhotoResults
  • HeartPhotoUpload
  • HeartPhotoVote

Shared Messages

  • HqTriva::Model::QuestionClosed
  • HqTriva::Model::PostGame
  • HqTriva::Model::Interaction
  • HqTriva::Model::UnknownMessage
  • HqTriva::Model::BroadcastStats
  • HqTriva::Model::BroadcastEnded
  • HqTriva::Model::Kicked

Contributors