Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 817 Bytes

README.md

File metadata and controls

41 lines (26 loc) · 817 Bytes

Papapi

A gem for access to the Post Affiliate Pro API.

Getting started example

###Create session as merchant

session = new Papapi::Session("http://demo.postaffiliatepro.com/scripts/server.php");
session.login("merchant@example.com", "demo")

###Create session as affiliate in debug mode

session = new Papapi::Session("http://demo.postaffiliatepro.com/scripts/server.php",true);
session.login("affiliate@example.com", "demo")

###Get information about affiliate

affiliate = Papapi::Affiliate.new(session)
affiliate.load()
affiliate[:username]

###Get information about merchant

merchant = Papapi::Merchant.new(session)
merchant.load()
merchant[:username]

More documentation, and examples can be found there