So my first challenge with the n+ was to lit up a led whenever I get a new mail.
So a few issues goes thourgh my mind:
1- I suppose there is a limit amount of queries you can do in a certain amount of time... But how many?
2- I need an api key but where do I get it? I keep finding those for use with a domain name (which I don't have as its a standalone program)
So this is my code as for now:
using System; using System.Net; using System.Net.Sockets; using System.Threading; using System.Xml; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using Microsoft.SPOT.Net; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; using Google.GData.Client; namespace GmailAlert { public class Program { public static void Main() { string CONSUMER_KEY = "mydomain.com"; string CONSUMER_SECRET = "my_consumer_secret"; string TARGET_USER = "test_user"; OAuth2LeggedAuthenticator auth = new OAuth2LeggedAuthenticator("GmailFeedReader", CONSUMER_KEY, CONSUMER_SECRET, TARGET_USER, CONSUMER_KEY); HttpWebRequest request = auth.CreateHttpWebRequest("GET", new Uri("https://mail.google.com/mail/feed/atom/")); HttpWebResponse response = request.GetResponse() as HttpWebResponse; XmlReader reader = XmlReader.Create(response.GetResponseStream()); while (reader.Read()) { Debug.Print(reader.Name); } } } }
I still need to implement the code to get the number of the "fullamount" node. But as for now this is a test.
But as for the questions I tried expert-exchange forum and even the google groups and none have answered so far... Quite ironic if you ask me.
So I hope you guys could help me with that
Also if someone knew how to get the same result for hotmail (api) you'll get a cookie!
as the only things I seem to find info on is contacts, calendar, files... but no mails.