Skip to content

REST API wrapper interacting with Emailvision

Notifications You must be signed in to change notification settings

kaluznyo/emailvision

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emailvision Gem

Emailvision is a REST API wrapper interacting with Emailvision. It :

  • Has a very comfortable syntax (ruby style);

  • Uses the “lazy loading” pattern;

  • Support further changes on Emailvision API (dynamic call);

Credentials

Credentials can be set in the environment.rb file like this:

  • EMV_LOGIN = “”

  • EMV_PASSWORD = “”

  • EMV_KEY = “”

Or when you instance your object like this: emv = Emailvision::Api.new “login”, “password”, “key”

Login/Logout

  • Login -> emv.login;

  • Logout -> emv.logout;

  • Check status -> emv.connected?;

Method calling

Method list can be found @ emvapi.emv3.com/apiccmd/services/rest?_wadl&_type=xml

Example #1

Method to call

<resource path=“campaign/last/”> <method name=“GET”> <request> <param name=“token” style=“query” type=“xs:string”/> <param name=“limit” style=“query” type=“xs:int”/> </request> <response> <representation mediaType=“application/xml”/> </response> </method> </resource>

Summary

  • Name : campaign/last

  • Method : GET

  • Parameters : token, limit

Method calling syntax

  • emv.get.campaign.last(:limit => 5).call

Explanation

  • get is the HTTP verb

  • campaign.last is the method name

  • (:limit => 5) is the parameters. token is automatically given

  • call is the keyword to perform the API call

About

REST API wrapper interacting with Emailvision

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%