This file contains 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 sendgrid | |
import os | |
if os.path.exists('.env'): | |
for line in open('.env'): | |
var = line.strip().split('=') | |
if len(var) == 2: | |
os.environ[var[0]] = var[1] | |
client = sendgrid.SendGridAPIClient(os.environ.get('SENDGRID_API_KEY')) | |
start_date = '2015-10-01' |
This file contains 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
require 'sendgrid-ruby' | |
require 'dotenv' | |
Dotenv.load | |
sendgrid_apikey = ENV['SENDGRID_APIKEY'] | |
client = SendGrid::Client.new do |c| | |
c.api_key = sendgrid_apikey | |
end |
This file contains 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 sendgrid | |
from bs4 import BeautifulSoup | |
def send_email(self, to_email, from_email, subject, body): | |
message = sendgrid.Mail() | |
message.add_to(to_email) | |
message.set_subject(subject) | |
soup = BeautifulSoup(body, "html.parser") | |
message.set_text(soup.get_text()) | |
message.set_html(body) |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Net.Mail; | |
using System.Linq; | |
using SendGrid; | |
namespace Example | |
{ | |
internal class Program | |
{ |
This file contains 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
class Fluent: | |
def __init__(self, cache=None): | |
self._cache = cache or [] | |
# Build the cache, and handle special cases | |
def _(self, name): | |
# Enables method chaining | |
return Fluent(self._cache+[name]) | |
# Final method call |
This file contains 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
<?php | |
class Fluent { | |
function __construct($cache) { | |
$this->cache = ($cache ? $cache : []); | |
} | |
// Build the cache, and handle special cases | |
public function _($name) { | |
array_push($this->cache, $name); |
This file contains 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
using System; | |
using System.Dynamic; | |
namespace Fluent | |
{ | |
class Client : DynamicObject | |
{ | |
public string UrlPath; | |
public Client(string urlPath = null) |
This file contains 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
print "Hello World" |
This file contains 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
class Fluent | |
def initialize(cache: nil) | |
@cache = cache ? cache : [] | |
end | |
# Reflection | |
def method_missing(name, *args, &block) | |
_(name.to_s) | |
end |
This file contains 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
"/user/webhooks/parse/settings": { | |
"get": { | |
"consumes": [ | |
"application/json" | |
], | |
"description": "**This endpoint allows you to retrieve all of your current inbound parse settings.**\n\nThe inbound parse webhook allows you to have incoming emails parsed, extracting some or all of the contnet, and then have that content POSTed by SendGrid to a URL of your choosing. For more information, please see our [User Guide](https://sendgrid.com/docs/API_Reference/Webhooks/parse.html).", | |
"operationId": "GET_user-webhooks-parse-settings", | |
"produces": [ | |
"application/json" | |
], |