Socket
Book a DemoInstallSign in
Socket

PrexView

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

PrexView

1.0.0
bundlerRubygems
Version published
Maintainers
2
Created
Source

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.

FAQs

Package last updated on 07 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.