コード例 #1
0
        public List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GetGroupUpdates(oAuthLinkedIn OAuth, int Count)
        {
            Domain.Myfashion.Domain.LinkedInGroup.Group_Updates group_Updates = new Domain.Myfashion.Domain.LinkedInGroup.Group_Updates();
            List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GroupUpdatesList = new List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates>();
            ShareAndSocialStream socialStream = new ShareAndSocialStream();
            xmlResult = socialStream.Get_GroupUpdates(OAuth, Count);

            XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("group-membership");

            foreach (XmlNode xn in xmlNodeList)
            {

                try
                {
                    XmlElement Element = (XmlElement)xn;
                    //double timestamp = Convert.ToDouble(Element.GetElementsByTagName("timestamp")[0].InnerText);
                    //network_Updates.DateTime = JavaTimeStampToDateTime(timestamp);


                    try
                    {
                        group_Updates.id = Element.GetElementsByTagName("id")[0].InnerText;
                    }
                    catch
                    { }

                    try
                    {
                        group_Updates.GroupName = Element.GetElementsByTagName("name")[0].InnerText;
                    }
                    catch
                    { }


                    GroupUpdatesList.Add(group_Updates);
                }
                catch
                {

                }
            }
            return GroupUpdatesList;

        }
コード例 #2
0
        public List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GetGroupUpdates(oAuthLinkedIn OAuth, int Count)
        {
            Domain.Myfashion.Domain.LinkedInGroup.Group_Updates        group_Updates    = new Domain.Myfashion.Domain.LinkedInGroup.Group_Updates();
            List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GroupUpdatesList = new List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates>();
            ShareAndSocialStream socialStream = new ShareAndSocialStream();

            xmlResult = socialStream.Get_GroupUpdates(OAuth, Count);

            XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("group-membership");

            foreach (XmlNode xn in xmlNodeList)
            {
                try
                {
                    XmlElement Element = (XmlElement)xn;
                    //double timestamp = Convert.ToDouble(Element.GetElementsByTagName("timestamp")[0].InnerText);
                    //network_Updates.DateTime = JavaTimeStampToDateTime(timestamp);


                    try
                    {
                        group_Updates.id = Element.GetElementsByTagName("id")[0].InnerText;
                    }
                    catch
                    { }

                    try
                    {
                        group_Updates.GroupName = Element.GetElementsByTagName("name")[0].InnerText;
                    }
                    catch
                    { }


                    GroupUpdatesList.Add(group_Updates);
                }
                catch
                {
                }
            }
            return(GroupUpdatesList);
        }
コード例 #3
0
        public List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GetGroupPostData(oAuthLinkedIn OAuth, int Count, string groupid,string linkedinId)
        {
            Domain.Myfashion.Domain.LinkedInGroup.Group_Updates group_Updates = new Domain.Myfashion.Domain.LinkedInGroup.Group_Updates();
            List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GroupUpdatesList = new List<Domain.Myfashion.Domain.LinkedInGroup.Group_Updates>();
            ShareAndSocialStream socialStream = new ShareAndSocialStream();
            xmlResult = socialStream.Get_GroupPostData(OAuth, Count, groupid);

            XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("post");


            foreach (XmlNode xn in xmlNodeList)
            {

                try
                {
                    
                    XmlElement Element = (XmlElement)xn;

                    try
                    {

                        group_Updates.LinkedInProfileId = linkedinId;


                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {

                        group_Updates.id = groupid;

                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                       
                        group_Updates.GpPostid = Element.GetElementsByTagName("id")[0].InnerText;


                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {
                        group_Updates.firstname = Element.GetElementsByTagName("first-name")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }



                    try
                    {
                        string following = Element.GetElementsByTagName("is-following")[0].InnerText;
                        if (following == "true")
                        {
                            group_Updates.isFollowing = 1;
                        }
                        else { group_Updates.isFollowing = 0; }

                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        string like = Element.GetElementsByTagName("is-liked")[0].InnerText;
                        if (like == "true")
                        {
                            group_Updates.isLiked = 1;
                        }
                        else { group_Updates.isLiked = 0; }


                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {

                        group_Updates.likes_total = Element.GetElementsByTagName("likes")[0].Attributes["total"].Value;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                    try
                    {
                        group_Updates.comments_total = Element.GetElementsByTagName("comments")[0].Attributes["total"].Value;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }

                    try
                    {
                        group_Updates.summary = Element.GetElementsByTagName("summary")[0].InnerText;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }

                    try
                    {
                        group_Updates.lastname = Element.GetElementsByTagName("last-name")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        group_Updates.headline = Element.GetElementsByTagName("headline")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {

                        group_Updates.pictureurl = Element.GetElementsByTagName("picture-url")[0].InnerText;

                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        group_Updates.pictureurl = "www.socioboard.com/Themes/" + System.Configuration.ConfigurationManager.AppSettings["domain"] + "/Contents/img/blank_img.png";//"../../Contents/img/blank_img.png";
                       
                    }
                    
                    try
                    {
                        group_Updates.title = Element.GetElementsByTagName("title")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    GroupUpdatesList.Add(group_Updates);
                }
                catch (Exception ex)
                { Console.WriteLine(ex.StackTrace); }

            }
            return GroupUpdatesList;

        }
コード例 #4
0
        public List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GetGroupPostData(oAuthLinkedIn OAuth, int Count, string groupid, string linkedinId)
        {
            Domain.Myfashion.Domain.LinkedInGroup.Group_Updates        group_Updates    = new Domain.Myfashion.Domain.LinkedInGroup.Group_Updates();
            List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates> GroupUpdatesList = new List <Domain.Myfashion.Domain.LinkedInGroup.Group_Updates>();
            ShareAndSocialStream socialStream = new ShareAndSocialStream();

            xmlResult = socialStream.Get_GroupPostData(OAuth, Count, groupid);

            XmlNodeList xmlNodeList = xmlResult.GetElementsByTagName("post");


            foreach (XmlNode xn in xmlNodeList)
            {
                try
                {
                    XmlElement Element = (XmlElement)xn;

                    try
                    {
                        group_Updates.LinkedInProfileId = linkedinId;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {
                        group_Updates.id = groupid;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        group_Updates.GpPostid = Element.GetElementsByTagName("id")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {
                        group_Updates.firstname = Element.GetElementsByTagName("first-name")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }



                    try
                    {
                        string following = Element.GetElementsByTagName("is-following")[0].InnerText;
                        if (following == "true")
                        {
                            group_Updates.isFollowing = 1;
                        }
                        else
                        {
                            group_Updates.isFollowing = 0;
                        }
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        string like = Element.GetElementsByTagName("is-liked")[0].InnerText;
                        if (like == "true")
                        {
                            group_Updates.isLiked = 1;
                        }
                        else
                        {
                            group_Updates.isLiked = 0;
                        }
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    try
                    {
                        group_Updates.likes_total = Element.GetElementsByTagName("likes")[0].Attributes["total"].Value;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }
                    try
                    {
                        group_Updates.comments_total = Element.GetElementsByTagName("comments")[0].Attributes["total"].Value;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }

                    try
                    {
                        group_Updates.summary = Element.GetElementsByTagName("summary")[0].InnerText;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                    }

                    try
                    {
                        group_Updates.lastname = Element.GetElementsByTagName("last-name")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        group_Updates.headline = Element.GetElementsByTagName("headline")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }
                    try
                    {
                        group_Updates.pictureurl = Element.GetElementsByTagName("picture-url")[0].InnerText;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        group_Updates.pictureurl = "www.socioboard.com/Themes/" + System.Configuration.ConfigurationManager.AppSettings["domain"] + "/Contents/img/blank_img.png";//"../../Contents/img/blank_img.png";
                    }

                    try
                    {
                        group_Updates.title = Element.GetElementsByTagName("title")[0].InnerText;
                    }
                    catch (Exception ex)
                    { Console.WriteLine(ex.StackTrace); }

                    GroupUpdatesList.Add(group_Updates);
                }
                catch (Exception ex)
                { Console.WriteLine(ex.StackTrace); }
            }
            return(GroupUpdatesList);
        }