Project

PrexView

0.0
No commit activity in last 3 years
No release in over 3 years
A composer library to use PrexView a fast, scalable and very friendly service for programatic HTML, PDF, PNG or JPG generation using JSON or XML data.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 5.0
~> 10.0
 Project Readme

PrexView

A composer library to use PrexView a fast, scalable and very friendly service for programatic HTML, PDF, PNG or JPG generation using JSON or XML data.

Installation

Add this line to your application's Gemfile:

gem 'PrexView'

And then execute:

$ bundle

Or install it yourself as:

$ gem install PrexView

Quick Start

Get the token key by downloading PrexView Studio, click here for download

If you don't have an account create one and open the API option

API token

There are two ways to use the token, our recomendation and good practice is to use the default environment variable PREXVIEW_TOKEN :

$ export PREXVIEW_TOKEN=<token>

In your application

# xml example
xml = "<xml>hello world</xml>"
code, response = PrexView.send_xml(xml, {type: 'xml', design: "design-xml"})
# json example
json = { "hello": "world" }
code, response = PrexView.send_json(json, {type: 'json', design: "design-json" })

The second way is to pass the token key as a parameter

# xml example
xml = "<xml>hello world</xml>"
PrexView.send_xml(xml, {type: 'xml', design: "design-xml", token: "<token>" })
# json example
json = { "hello": "world" }
code, response = PrexView.send_json(json, {type: 'json', design: "design-json", token: "<token>" })

Design: For use design first you add a design in PrexView Studio, go to design section and create one:

Design

For more information please check the documentation or look our examples

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/prexview/prexview-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Credits

This gem is developed and maintained by Urielable - blog

License

The gem is available as open source under the terms of the MIT License.