public RealtimeController()
        {
            _subscription = new Endpoints.Subscription(InstaSharpConfig.Instance.config);

            string token = ConfigurationManager.AppSettings.Get("everlive_id");
            _app = new EverliveApp(token);
        }
Example #2
0
 public ElDataManager()
 {
     this.app = new EverliveApp(new EverliveAppSettings()
     {
         ApiKey = "NFtPBKs75ALYLvLH"
     });
     this.app.WorkWith().Authentication().Login("7YGY2GHctdzRB36kLiY5HwyWhgG2TN4W").ExecuteSync();
 }
 public TelerikBackendServicesUploadProvider(string apiKey, bool useHttps = false)
 {
     EverliveAppSettings settings = new EverliveAppSettings();
     settings.ServiceUrl = "api.everlive.com";
     settings.ApiKey = apiKey;
     settings.UseHttps = useHttps;
     this.application = new EverliveApp(settings);
 }
Example #4
0
        public BizJetsViewModel()
        {
            EverliveAppSettings appSettings = new EverliveAppSettings()
            {
                AppId = BSAppId, UseHttps = true
            };

            ELHandle = new EverliveApp(appSettings);
        }
        public TelerikBackendServicesUploadProvider(string apiKey, bool useHttps = false)
        {
            EverliveAppSettings settings = new EverliveAppSettings();

            settings.ServiceUrl = "api.everlive.com";
            settings.ApiKey     = apiKey;
            settings.UseHttps   = useHttps;
            this.application    = new EverliveApp(settings);
        }
Example #6
0
        private async void RetrieveAuthorName()
        {
            EverliveApp nativeConnection      = CloudProvider.Current.NativeConnection as EverliveApp;
            RequestResult <CustomUser> result = await nativeConnection.WorkWith().Users <CustomUser>().GetById(this.userId).TryExecuteAsync();

            if (result.Success)
            {
                this.AuthorName = result.Value.DisplayName;
            }
        }
 internal static IEnumerable<string> ListFiles(string apiKey)
 {
     EverliveAppSettings settings = new EverliveAppSettings();
     settings.ServiceUrl = "api.everlive.com";
     settings.ApiKey = apiKey;
     var application = new EverliveApp(settings);
     AppHandler currentAppHandler = application.WorkWith();
     var files = currentAppHandler.Files().GetAll().ExecuteSync();
     return files.Select(f => f.Filename);
 }
Example #8
0
        private void Initialize()
        {
            EverliveApp myApp = new EverliveApp(new EverliveAppSettings()
            {
                ApiKey   = ConnectionSettings.EverliveApiKey,
                UseHttps = false
            });

            this.MyApp = myApp;
        }
        internal static IEnumerable <string> ListFiles(string apiKey)
        {
            EverliveAppSettings settings = new EverliveAppSettings();

            settings.ServiceUrl = "api.everlive.com";
            settings.ApiKey     = apiKey;
            var        application       = new EverliveApp(settings);
            AppHandler currentAppHandler = application.WorkWith();
            var        files             = currentAppHandler.Files().GetAll().ExecuteSync();

            return(files.Select(f => f.Filename));
        }
Example #10
0
        private async void ReloadComments()
        {
            EverliveApp nativeApp = CloudProvider.Current.NativeConnection as EverliveApp;
            // TODO
            //ItemsResult<Comment> result = await (CloudProvider.Current as ICloudProvider).getitem.GetSortedItemsByFilterAsync<Comment>(filter, sorting);
            RequestResult <IEnumerable <Comment> > comments = await nativeApp.WorkWith().Data <Comment>().GetAll().Where(comment => comment.ActivityId == this.currentActivity.Id).OrderBy <DateTime>(c => c.CreatedAt).TryExecuteAsync();

            if (comments.Success)
            {
                this.currentActivity.CommentsCount = comments.Value.Count <Comment>();
                this.CommentsList.ItemsSource      = comments.Value;
            }
        }
Example #11
0
        private async void RetrieveCommentsCount()
        {
            EverliveApp app = CloudProvider.Current.NativeConnection as EverliveApp;

            try
            {
                int count = await app.WorkWith().Data <Comment>().GetCount().Where(comment => comment.ActivityId == this.Id).ExecuteAsync();

                this.CommentsCount = count;
            }
            catch (Exception ex)
            {
            }
        }
        public string SignIn(string token)
        {
            var app = new EverliveApp("5tnum1NuePyeHNwk");

            try {
                app.WorkWith().Authentication().LoginWithGoogle(token).ExecuteSync();
                return "SUCCESS!";
            }
            catch (Exception ex)
            {
                Response.StatusCode = 500;
                return $"Operation Failed: {ex.Message}";
            }
        }
 public MainPage()
 {
     this.InitializeComponent();
     this.DataContext = this;
     if (MainPage.TelerikPlatformAppId.StartsWith("your"))
     {
         MessageDialog msgDialog = new MessageDialog("You need to set a valid Telerik Platform App ID!", "Windows Push Sample");
         UICommand     okBtn     = new UICommand("OK");
         okBtn.Invoked = OkBtnClick;
         msgDialog.Commands.Add(okBtn);
         msgDialog.ShowAsync();
     }
     else
     {
         everliveApp = new EverliveApp(MainPage.TelerikPlatformAppId);
         this.CheckRegistration();
         this.CheckSecondaryTiles();
         this.CheckSecondaryTileRegistration();
     }
 }
Example #14
0
        private async void RetrieveDisplayName()
        {
            EverliveApp app = CloudProvider.Current.NativeConnection as EverliveApp;

            try
            {
                var result = await app.WorkWith().Data <CustomUser>().GetById(this.userId).ExecuteAsync();

                if (!String.IsNullOrEmpty(result.DisplayName))
                {
                    this.AuthorName = result.DisplayName;
                }
                else
                {
                    this.AuthorName = result.Email;
                }
            }
            catch (Exception ex)
            {
            }
        }
 public TelerikBackendCloudStorage()
 {
     this.app = new EverliveApp(EverliveAppKey);
 }
 public RealtimeHub()
 {
     string token = ConfigurationManager.AppSettings.Get("everlive_id");
     _app = new EverliveApp(token);
 }
 public ImageUploader()
 {
     app = new EverliveApp(EverliveAppKey);
 }
Example #18
0
 private DataManager()
 {
     this.Everlive = new EverliveApp("E9ksyDFaxbPWtyZV");
     Task.Factory.StartNew(this.InitializeUsers, TaskCreationOptions.LongRunning);
     this.TryLoadAccessToken();
 }
Example #19
0
 public TelerikBackendServicesProvider()
 {
     app = new EverliveApp(EverliveAppKey);
 }
 public ImageUploader(EverliveApp everliveApp)
 {
     this.app = everliveApp;
 }