== RESTfull API
Public:
NOTE: Authethication could be performed with adding the user:password authentication to the request with:
http://user:pass@app.nouri.sh/campaigns.xml- All Campaigns listing with GET request:
- HTML -
http://app.nouri.sh/campaigns - XML -
http://app.nouri.sh/campaigns.xml - JSON -
http://app.nouri.sh/campaigns.json- Example for the Campaing with id: 4
- show the campaign details with GET request to:
- HTML -
http://app.nouri.sh/campaigns/4 - XML -
http://app.nouri.sh/campaigns/4.xml - JSON -
http://app.nouri.sh/campaigns/4.json- create new campaign with POST request to:
- HTML -
http://app.nouri.sh/campaigns/4 - XML -
http://app.nouri.sh/campaigns/4.xml - JSON -
http://app.nouri.sh/campaigns/4.json NOTE: DATE format: "Mon Feb 08 20:42:03 +0200 2010"
- with parameters hash:
- camapign[name] - Name of the camapign
- campaign[subject] - Subject of the campaign
- campaign[from_name] - The name to send campaign from
- campaign[from_email]- The email to send campaign from
- campaign[ignore_posts_before] - Date to start extracting from feed source
- campaign[frequency] - Takes values monthly/custom
- campaign[custom_days_of_the_week] - if frequency="custom" here should have
the comma separated days of the week to be able to run the campaign
Example: campaign[custom_days_of_the_week]="monday,tuesday" to run the campaign
only on mondays or tuesdays
- campaign[custom_weeks_of_the_month] - if frequency="custom" here should have
the comma separated weeks number the month to be able to run the campaign
Example: cample: campaign[custom_weeks_of_the_month]="1,2" - to be able to run
the campaign in the first and second weeks of the month
- campaign[day_of_month] - if frequency="monthly" this value specify the day of the month
to run the campaign
- campaign[time_of_day] - DATE value where only hours and minutes are setfor the time of
the Day to run campaign
- campaign[effective_date] - DATE This value specify the actual date the campaign will
be lunched
- campaign[min_number_articles] - specifies the min feeds to be extracted from source
in order campaign to run
New XML feeds parameter
- campaign[new_xml_feeds][:xml_feed.id][url] - The addres to XML feed source
NOTE: URL must be full with prefix : http://[domain]/[feed]
- campaign[new_xml_feeds][:xml_feed.id][login]- User if feed source requires authenthication
- campaign[new_xml_feeds][:xml_feed.id][password]- password if feed source requires authenthication
- update exisitng campaign with PUT request to:
- HTML -
http://app.nouri.sh/campaigns/4 - XML -
http://app.nouri.sh/campaigns/4.xml - JSON -
http://app.nouri.sh/campaigns/4.jsonCampaigns parameters same as above.
Exisitng XML feeds parameter
- campaign[existing_xml_feeds][:xml_feed.id][url] - The addres to XML feed source
NOTE: URL must be full with prefix : http://[domain]/[feed]
- campaign[existing_xml_feeds][:xml_feed.id][login]- User if feed source requires authenthication
- campaign[existing_xml_feeds][:xml_feed.id][password]- password if feed source requires authenthication
- subscribe to campaign with GET/POST request :
- HTML -
http://app.nouri.sh/campaigns/4/subscribe - XML -
http://app.nouri.sh/campaigns/4/subscribe.xml - JSON -
http://app.nouri.sh/campaigns/4/subscribe.json- with parameters hash:
- subscriber[email]
- subscriber[name]
- notify_them - sends email to subscriber
- notify_me - send email to account owner
- unsubscribe to campaign with GET/POST request :
- HTML -
http://app.nouri.sh/campaigns/4/subscri ... nsubscribe - XML -
http://app.nouri.sh/campaigns/4/subscri ... scribe.xml - JSON -
http://app.nouri.sh/campaigns/4/subscri ... cribe.jsonNOTE: If not able to make a PUT request place the method in "_method" parameter