Example #1
0
        /// <summary>
        /// Instantiate a new Netflix client to send requests.
        /// [Note] Although GetUserInfo method is only required the first time,
        /// it may be provided in every instantiation (or can be changed for each 
        /// instantiation if so desired)
        /// </summary>
        /// <param name="FillObjectsOnDemand">
        /// FlixSharp Movie and Person objects will fill themselves upon access of fields
        /// that are outside the current scope of information
        /// Ex: Accessing Awards on a Movie object with a "Completeness" set at Minimal will result
        /// in Awards being loaded on access.
        /// </param>
        /// <param name="GetUserInfo">A static method that returns a Netflix Account 
        /// (presumably for the current logged in user to make Protected requests)</param>
        public Netflix(Boolean FillObjectsOnDemand = true, GetCurrentUserNetflixUserInfo GetUserInfo = null)
        {
            _FillObjectsOnDemand = FillObjectsOnDemand;

            Login.CheckInformationSet();
            if (_GetUserInfo == null)
                _GetUserInfo = GetUserInfo;
        }
Example #2
0
        /// <summary>
        /// Instantiate a new Netflix client to send requests.
        /// [Note] Although GetUserInfo method is only required the first time,
        /// it may be provided in every instantiation (or can be changed for each
        /// instantiation if so desired)
        /// </summary>
        /// <param name="FillObjectsOnDemand">
        /// FlixSharp Movie and Person objects will fill themselves upon access of fields
        /// that are outside the current scope of information
        /// Ex: Accessing Awards on a Movie object with a "Completeness" set at Minimal will result
        /// in Awards being loaded on access.
        /// </param>
        /// <param name="GetUserInfo">A static method that returns a Netflix Account
        /// (presumably for the current logged in user to make Protected requests)</param>
        public Netflix(Boolean FillObjectsOnDemand = true, GetCurrentUserNetflixUserInfo GetUserInfo = null)
        {
            _FillObjectsOnDemand = FillObjectsOnDemand;

            Login.CheckInformationSet();
            if (_GetUserInfo == null)
            {
                _GetUserInfo = GetUserInfo;
            }
        }
Example #3
0
 public static void SetMethodForGettingCurrentUserAccount(GetCurrentUserNetflixUserInfo GetUserInfo)
 {
     _GetUserInfo = GetUserInfo;
 }
Example #4
0
 public static void SetMethodForGettingCurrentUserAccount(GetCurrentUserNetflixUserInfo GetUserInfo)
 {
     _GetUserInfo = GetUserInfo;
 }