This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################# | |
| # # | |
| # IP List Segmentation # | |
| # with SendGrid Event Webhook # | |
| # # | |
| # Created by Kunal Batra 8.08.14# | |
| ################################# | |
| from flask import Flask,request, jsonify | |
| import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################################# | |
| # # | |
| # Geographic List Segmentation # | |
| # with SendGrid Event Webhook # | |
| # # | |
| # Created by Kunal Batra 7.14.14# | |
| ################################# | |
| from flask import Flask,request, jsonify | |
| import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, request | |
| import json | |
| from twilio.rest import TwilioRestClient | |
| app = Flask(__name__) | |
| @app.route('/',methods=['POST']) | |
| def foo(): | |
| account_sid = "Your Twilio Account SID" | |
| auth_token = "Your Twilio Auth Token" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Meteor.Router.add({ | |
| '/inbound': function() { | |
| post = this.request.body; | |
| color = post.subject; | |
| Colors.update({pos: 1},{ $set: { "name": color } } ); | |
| return [200, "Success"] | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "log" | |
| "github.com/sendgrid/sendgrid-go" | |
| "regexp" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //create Email Object | |
| sendgrid *msg = [sendgrid user:@"ApiUser" andPass:@"ApiKey"]; | |
| //set parameters | |
| msg.subject = @"email subject"; | |
| msg.tolist = @[@"[email protected]", @"[email protected]"]; | |
| msg.from = @"[email protected]"; | |
| msg.text = @"hello world"; | |
| msg.html = @"<html><body><h1>hello world</h1></body></html>"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSDictionary *params = [NSDictionary dictionaryWithObject:List forKey:@"text"]; | |
| [PFCloud callFunctionInBackground:@"emailGrocery" withParameters:params block:^(id object, NSError *error){} ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sendgrid = require("sendgrid"); | |
| sendgrid.initialize("SendGrid_Auth_User", "SendGrid_Auth_token"); | |
| // Use Parse.Cloud.define to define as many cloud functions as you want. | |
| // For example: | |
| Parse.Cloud.define("hello", function(request, response) { | |
| response.success("Hello world!"); | |
| }); | |
| Parse.Cloud.define("emailGrocery", function(request, response) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <UIKit/UIKit.h> | |
| #import <Parse/Parse.h> | |
| @interface ViewController : PFQueryTableViewController { | |
| NSString *List; | |
| NSDictionary *params; | |
| NSInteger counter; | |
| NSInteger refresh; | |
| } | |
| - (IBAction)sendList:(id)sender; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "ViewController.h" | |
| @interface ViewController () | |
| @end | |
| @implementation ViewController | |
| - (id)initWithCoder:(NSCoder *)aDecoder { |