Sha256: 14e68eb0f529519bb531bae92238dbca75fd75f28485129ca4b659124bcc7702
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
require 'oxford_dictionary/endpoints/endpoint' module OxfordDictionary module Endpoints # Interface for the /sentences endpoint # # API documentation can be found here: # https://developer.oxforddictionaries.com/documentation class Sentences < Endpoint ENDPOINT = 'sentences'.freeze def sentence(word:, language:, params: {}) path = "#{ENDPOINT}/#{language}/#{word}" uri = request_uri(path: path, params: params) response = @request_client.get(uri: uri) deserialize.call(response.body) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oxford_dictionary-3.0.0 | lib/oxford_dictionary/endpoints/sentences.rb |