No commit activity in last 3 years
No release in over 3 years
This gem generates Trustpilot Business Generated Links described on https://support.trustpilot.com/hc/en-us/articles/115002337108-Trustpilot-s-Business-Generated-Links-
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.11
~> 0.5
~> 12.2
~> 3.6
~> 1.2
~> 0.15
 Project Readme

Trustpilot Business Links generator gem Build Status Gem Version

Generate the Trustpilot Business Generated Links in ruby.

Requirements

Ruby 2.1.0 or newer.

This gem is tested against supported versions of Ruby and no support will be provided for EOL Ruby releases.

Installation

gem install trustpilot-business-links

Usage

require 'json'
require 'trustpilot-business-links'

# Keys generated on https://businessapp.b2b.trustpilot.com/#/invitations/business-generated-links
encryption_key = 'gn96sJwFRQuQl3bjNIPM0xp+TnK4iBaW0I4DpR0o+cs='
authentication_key = 'eE4zdEfGNlxjGVjtWpOLAYAM0gKeF5j6Db7ZXd1Bixo='
trustpilot_bgl = TrustpilotBusinessLinks.new(encryption_key, authentication_key)

review_payload = {
  email: "customer1@example.net",
  name: "John Smith",
  ref: "1234",
}

encrypted_payload = trustpilot_bgl.encrypt(review_payload.to_json)

puts "https://www.trustpilot.com/evaluate-bgl/www.example.com?p=#{encrypted_payload}"

Test

make test

100% of the source code should be covered by tests.

Contributing

You are warmly welcome to contribute to the project!

Documentation

License

The projected is licensed under the MIT license. See LICENSE.md.