Sha256: b7c2bcb2548cb0ef9b14294096a937fc790dda3abb5af0d8ab49a17a9421bfd0

Contents?: true

Size: 297 Bytes

Versions: 2

Compression:

Stored size: 297 Bytes

Contents

# frozen_string_literal: true

module Lexicorn
  module UrlBuilder
    require 'net/http'
    require 'json'

    BASE = 'https://www.dictionaryapi.com/api/v3/references/collegiate/json/'

    module_function

    def build(word:, api_key:)
      "#{BASE}#{word}?key=#{api_key}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lexicorn-0.0.5 lib/lexicorn/url_builder.rb
lexicorn-0.0.4 lib/lexicorn/url_builder.rb