public static InstagramApiWrapper GetInstance() {
     if (_sharedInstance == null) {
         if (_sharedConfiguration == null)
             throw new ApplicationException("API Uninitialized");
         else
             _sharedInstance = new InstagramApiWrapper();
     }
     return _sharedInstance;
 }
Exemplo n.º 2
0
 public HomeController()
 {
     _instagramApiWrapper =
         InstagramApiWrapper.GetInstance(
             new Configuration { ApiBaseUrl = "https://api.instagram.com/v1/",
                     AuthUrl = "http://localhost:25221/Auth",
                     ClientId = WebConfigurationManager.AppSettings["InstagramClientId"],
                     ClientSecret = WebConfigurationManager.AppSettings["InstagramClientSecret"]
                 });
 }
        public static InstagramApiWrapper GetInstance(Configuration configuration) {
            lock (threadlock) {
                if(_sharedInstance == null) {
                    _sharedInstance = new InstagramApiWrapper();
                    _sharedInstance.Configuration = configuration;

                }
            }

            return _sharedInstance;
        }
Exemplo n.º 4
0
        public static InstagramApiWrapper GetInstance(Configuration configuration)
        {
            lock (threadlock) {
                if (_sharedInstance == null)
                {
                    _sharedInstance = new InstagramApiWrapper();
                    _sharedInstance.Configuration = configuration;
                }
            }

            return(_sharedInstance);
        }
Exemplo n.º 5
0
 public static InstagramApiWrapper GetInstance()
 {
     if (_sharedInstance == null)
     {
         if (_sharedConfiguration == null)
         {
             throw new ApplicationException("API Uninitialized");
         }
         else
         {
             _sharedInstance = new InstagramApiWrapper();
         }
     }
     return(_sharedInstance);
 }