Ejemplo n.º 1
0
        public void UpdatePost(Model.Label label, ICollection <Model.ShareRecipient> recipients, ICollection <Model.FileAsset> files)
        {
            var api = new postServiceClass()
            {
                session_token = CloudService.SessionToken,
                APIKEY        = CloudService.APIKey,
                group_id      = Settings.Default.GroupId
            };

            if (recipients == null)
            {
                recipients = new List <Model.ShareRecipient>();
            }

            if (files == null)
            {
                files = new List <Model.FileAsset>();
            }

            // use an old last_update_time to work around cloud consistency checking
            var lastUpdateTime = DateTime.Now.AddMinutes(-10.0);

            api.UpdatePost(
                api.session_token,
                label.share_post_id,
                files.Select(x => x.file_id.ToString()).ToList(),
                lastUpdateTime,
                recipients.Select(x => x.email).ToList(),
                label.name,
                ""
                );
        }
        private void updateSender(Label label, string sender)
        {
            var ws = new postServiceClass
            {
                session_token = Cloud.CloudService.SessionToken,
                APIKEY        = Cloud.CloudService.APIKey,
                group_id      = Settings.Default.GroupId
            };

            var attList = getAttachmentList(label);

            ws.UpdatePost(ws.session_token, label.share_post_id, attList, DateTime.Now.AddDays(-1.0), new List <string>(), label.name, sender);
        }