예제 #1
0
 //add attendee for zoom webinar
 public static ZoomPanalist addAttendee(int webinarId, string fname, string lname, string email)
 {
     try
     {
         ZoomPanalist panalist = new ZoomPanalist {
             first_name = fname, last_name = lname, email = email
         };
         string response = RequestZoomAPIData("Post", "webinars/" + webinarId + "/panelists", JsonConvert.SerializeObject(panalist));
         if (!string.IsNullOrWhiteSpace(response))
         {
             return(JsonConvert.DeserializeObject <ZoomPanalist>(response));
         }
     }
     catch (Exception ex)
     {
         App.InsertException(ex);
     }
     return(null);
 }
예제 #2
0
 //add panalist for zoom webinar
 public static ZoomPanalist addPanalist(int webinarId, string name, string email)
 {
     try
     {
         ZoomPanalist panalist = new ZoomPanalist {
             name = name, email = email
         };
         //string jsonValue = "{\"panelists\":[{\"name\":\"" + name + "\", \"email\":\"" + email + "\"}]}";
         string jsonValue = "{\"panelists\":" + JsonConvert.SerializeObject(new List <ZoomPanalist> {
             panalist
         }) + "}";
         string response = RequestZoomAPIData("Post", "webinars/" + webinarId + "/panelists", jsonValue);
         if (!string.IsNullOrWhiteSpace(response))
         {
             return(JsonConvert.DeserializeObject <ZoomPanalist>(response));
         }
     }
     catch (Exception ex)
     {
         App.InsertException(ex);
     }
     return(null);
 }