예제 #1
0
 public JsonResult Create(string transformName, string transformDescription, MediaTransformOutput[] transformOutputs, int?thumbnailSpriteColumns)
 {
     try
     {
         Transform transform;
         string    authToken = HomeController.GetAuthToken(Request, Response);
         using (MediaClient mediaClient = new MediaClient(authToken))
         {
             transform = mediaClient.CreateTransform(transformName, transformDescription, transformOutputs, thumbnailSpriteColumns);
         }
         return(Json(transform));
     }
     catch (ApiErrorException ex)
     {
         return(new JsonResult(ex.Response.Content)
         {
             StatusCode = (int)ex.Response.StatusCode
         });
     }
 }