module Yodaspeak

Constants

VERSION

Public Class Methods

credentials(api_key) click to toggle source
# File lib/yodaspeak.rb, line 18
def self.credentials api_key
  @headers= {
    "X-Mashape-Key" => api_key,
    "Accept" => "text/plain"
  }
end
speak(words) click to toggle source
# File lib/yodaspeak.rb, line 10
def self.speak words
  include Default
  @api_endpoint = @@api_endpoint
  yodaish = words.split(" ").join("+")
  @api_endpoint += yodaish
  Unirest.get(@api_endpoint, headers: @headers)
end