Sha256: 0e2232c6b154a3e83e51805faa334dc58dd2d7208713c292a4ddbca60f74fc34
Contents?: true
Size: 803 Bytes
Versions: 25
Compression:
Stored size: 803 Bytes
Contents
require 'stream/url' module Stream class PersonalizationClient < Client def url_generator PersonalizationURLGenerator.new(@client_options) end def get(resource, params = {}) make_personalization_request(:get, resource, params, {}) end def post(resource, params = {}, data = {}) make_personalization_request(:post, resource, params, data: data) end def delete(resource, params = {}) make_personalization_request(:delete, resource, params, {}) end private def make_personalization_request(method, resource, params, data) endpoint = "/#{resource}/" auth_token = Stream::Signer.create_jwt_token('personalization', '*', @api_secret, '*', '*') make_request(method, endpoint, auth_token, params, data) end end end
Version data entries
25 entries across 25 versions & 1 rubygems