/// <summary> /// A simple constructor that initilaizes the object. /// </summary> /// <param name="p_nxsSite">The nexus site with which to interect.</param> /// <param name="p_strLoginKey">The login key used by the site to track logins.</param> public NexusAPI(NexusSite p_nxsSite, string p_strLoginKey) : this(p_nxsSite) { Cookie ckeLoginCookie = null; ckeLoginCookie = new Cookie("sid", p_strLoginKey, "/", "www.nexusmods.com"); m_ckcCookies.Add(ckeLoginCookie); m_booLoggedIn = true; }
/// <summary> /// Gets the website for the given Nexus site. /// </summary> /// <param name="p_nstSite">The site for which the retrieve the website.</param> /// <returns>The website for the given Nexus site.</returns> public static string GetWebsite(NexusSite p_nstSite) { switch (p_nstSite) { case NexusSite.Fallout3: return("www.nexusmods.com/fallout3/"); case NexusSite.FalloutNV: return("www.nexusmods.com/newvegas/"); default: throw new Exception("Unrecognized value for NexusSite."); } }
/// <summary> /// Gets the website for the given Nexus site. /// </summary> /// <param name="p_nstSite">The site for which the retrieve the website.</param> /// <returns>The website for the given Nexus site.</returns> public static string GetWebsite(NexusSite p_nstSite) { switch (p_nstSite) { case NexusSite.Fallout3: return "www.nexusmods.com/fallout3/"; case NexusSite.FalloutNV: return "www.nexusmods.com/newvegas/"; default: throw new Exception("Unrecognized value for NexusSite."); } }
/// <summary> /// A simple constructor that initilaizes the object. /// </summary> /// <param name="p_nxsSite">The nexus site with which to interect.</param> /// <param name="p_strUsername">The username with which to log into the site.</param> /// <param name="p_strPassword">The password with which to log into the site.</param> public NexusAPI(NexusSite p_nxsSite, string p_strUsername, string p_strPassword) : this(p_nxsSite) { m_strUsername = p_strUsername; m_strPassword = p_strPassword; }
/// <summary> /// A simple constructor that initilaizes the object. /// </summary> /// <param name="p_nxsSite">The nexus site with which to interect.</param> public NexusAPI(NexusSite p_nxsSite) { m_nxsSite = p_nxsSite; m_strSite = GetWebsite(m_nxsSite); }