Sha256: 334d719ed302928e42e350b93184fe5d866fc47aeb7ea8176b81380d5670600a
Contents?: true
Size: 889 Bytes
Versions: 18
Compression:
Stored size: 889 Bytes
Contents
require 'addressable/uri' module Poms module Api module Uris # Builds uri's for /media endpoints module Media API_PATH = '/v1/api/media'.freeze module_function def single(base_uri, mid) uri_for_path(base_uri, "/#{mid}") end def multiple(base_uri) uri_for_path(base_uri, '/multiple') end def descendants(base_uri, mid) uri_for_path(base_uri, "/#{mid}/descendants") end def members(base_uri, mid) uri_for_path(base_uri, "/#{mid}/members") end # URI for merged series def redirects(base_uri) uri_for_path(base_uri, '/redirects/') end def uri_for_path(base_uri, path) base_uri.merge(path: "#{API_PATH}#{path}") end private_class_method :uri_for_path end end end end
Version data entries
18 entries across 18 versions & 1 rubygems