Example #1
0
 public settingItem UpdateSetting(sessionType session, settingItem setting)
 {
     UpdateSettingRequest UpdateSettingRequest = new UpdateSettingRequest();
       DateTime utcNow = DateTime.UtcNow;
       UpdateSettingRequest.nonce = Signature.GetNonce();
       UpdateSettingRequest.connectId = session.connectId;
       UpdateSettingRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "updatesetting", UpdateSettingRequest.nonce);
       UpdateSettingRequest.timestamp = Signature.GetZDateTime(utcNow);
       UpdateSettingRequest.settingItem = setting;
       UpdateSettingResponse updateSettingResponse = this.publisherService.UpdateSetting(UpdateSettingRequest);
       if (updateSettingResponse == null)
     return (settingItem) null;
       else
     return updateSettingResponse.settingItem;
 }
Example #2
0
 public settingItem CreateSetting(sessionType session, settingItem setting)
 {
     CreateSettingRequest CreateSettingRequest = new CreateSettingRequest();
       DateTime utcNow = DateTime.UtcNow;
       CreateSettingRequest.nonce = Signature.GetNonce();
       CreateSettingRequest.connectId = session.connectId;
       CreateSettingRequest.signature = Signature.SoapSignature(utcNow, session.secretKey, "publisherservice", "createsetting", CreateSettingRequest.nonce);
       CreateSettingRequest.timestamp = Signature.GetZDateTime(utcNow);
       CreateSettingRequest.settingItem = setting;
       CreateSettingResponse setting1 = this.publisherService.CreateSetting(CreateSettingRequest);
       if (setting1 == null)
     return (settingItem) null;
       else
     return setting1.settingItem;
 }