Skip to content

Instantly share code, notes, and snippets.

@evan-007
Last active August 29, 2015 13:55
Show Gist options
  • Save evan-007/8781832 to your computer and use it in GitHub Desktop.
Save evan-007/8781832 to your computer and use it in GitHub Desktop.
require 'nokogiri'
require 'open-uri'
puts "Enter a word"
@word = gets.chomp!
@key = 'api-key-goes-here'
@type = 'learner'
page = Nokogiri::XML(open("http://www.dictionaryapi.com/api/v1/references/#{@type}/xml/#{@word}?key=#{@key}"))
puts page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment