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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest android:versionCode="2" | |
android:versionName="1" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.thinkingserious.sendgrid.glass.gdk.example"> | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="15" /> |
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
package com.thinkingserious.sendgrid.glass.gdk.example; | |
import java.util.HashMap; | |
import java.util.Hashtable; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.concurrent.ExecutionException; | |
import org.json.JSONException; | |
import org.json.JSONObject; |
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
package com.thinkingserious.sendgrid.glass.gdk.example; | |
import java.util.Hashtable; | |
import android.os.AsyncTask; | |
import com.github.sendgrid.SendGrid; | |
// This is the magic that sends the email through SendGrid's web API. | |
public class SendEmailWithSendGrid extends AsyncTask<Hashtable<String,String>, Void, String> { |
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
package com.thinkingserious.sendgrid.glass.gdk.example; | |
import java.util.HashMap; | |
/* | |
Since the voice recognition in Glass makes it hard to speak email addresses, we instead use nicknames | |
Once Contacts are implemented in the GDK, we can replace this class | |
*/ | |
public class AddressBook { | |
private HashMap<String, String> emails; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="app_name">SendGrid Glass GDK Example</string> | |
<string name="hello_world"></string> | |
<string name="send_email">send an email</string> | |
<!-- Menu item strings. --> | |
<string name="read_aloud">Read aloud</string> | |
<string name="send">Send the Email</string> |
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
FORMAT: 1A | |
HOST: http://api.gtdtodoapi.com | |
# GTD TODO API | |
This is an example API, written as a companion to a blog post at SendGrid.com | |
## Folder [/folder{id}] | |
A single Folder object, it represents a single folder. | |
Required attributes: |
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
#!flask/bin/python | |
from flask import Flask, jsonify, abort, make_response, request | |
app = Flask(__name__) | |
folders = [ | |
{ | |
"id": 1, | |
"name": "Health", | |
"description": "This represents projects that are related to health", |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap-theme.min.css"> | |
<link rel="stylesheet" href="https://app.userapp.io/css/demo/tutorial.css"> | |
</head> | |
<body> | |
<div class="container" style="text-align: center;"> |
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
function signup() { | |
UserApp.User.save({ | |
login: document.getElementById("username").value, | |
first_name: document.getElementById("name").value, | |
email: document.getElementById("email").value, | |
password: document.getElementById("password").value | |
}, function(error, user) { | |
if (error) { | |
alert("Error: " + error.message); | |
} else { |
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 Newtonsoft.Json; | |
using System.Collections.Generic; | |
namespace SendGridEventWebhook.Models | |
{ | |
// This class models the data we POST from our Event Webhook stream | |
public class SendGridEvents | |
{ | |
// Docs: https://sendgrid.com/docs/API_Reference/Webhooks/event.html | |
public string email { get; set; } |
OlderNewer