Beispiel #1
0
        public ContactResponsAuthor getPerson(string AccessToken)
        {
            String         Result   = Utility.Web.WebRequest(Utility.Web.Method.GET, string.Format(ContactsUrl, AccessToken), string.Empty);
            ContactRespons Contacts = JsonConvert.DeserializeObject <ContactRespons>(Result.Replace("$", "_"));

            return(Contacts.feed.author[0]);
        }
Beispiel #2
0
        //public ContactRespons getContacts(string UserHash)
        public List <Target> getContacts(string UserHash)
        {
            List <Target> output = new List <Target>();

            String Result = Utility.Web.WebRequest(Utility.Web.Method.GET, string.Format(ContactsUrl, this.GetAccessTokenFromDatabase(UserHash)), string.Empty);

            ContactRespons Contacts = JsonConvert.DeserializeObject <ContactRespons>(Result.Replace("$", "_"));

            foreach (ContactResponsEntry item in Contacts.feed.entry)
            {
                string email = item.gd_email.FirstOrDefault().address;
                string name  = item.title._t;

                if (string.IsNullOrEmpty(name))
                {
                    name = email;
                }

                if (!string.IsNullOrEmpty(email))
                {
                    output.Add(new Target {
                        Identifier = email, Name = name, ProfilePicure = string.Empty, SourceType = 3, Network = "Google"
                    });
                }
            }

            return(output);
        }
Beispiel #3
0
        public List <Target> getContacts(string UserHash)
        {
            List <Target> output = new List <Target>();

            String Result = Utility.Web.WebRequest(Utility.Web.Method.GET, string.Format(ContactsUrl, this.GetAccessTokenFromDatabase(UserHash)), string.Empty);

            ContactRespons Contacts = JsonConvert.DeserializeObject <ContactRespons>(Result);

            foreach (ContactResponsUser item in Contacts.data)
            {
                if (!string.IsNullOrEmpty(item.emails.preferred))
                {
                    output.Add(new Target {
                        Identifier = item.emails.preferred, Name = item.name, ProfilePicure = string.Empty, SourceType = 4, Network = "Hotmail"
                    });
                }
            }

            return(output);
        }