예제 #1
0
 public void ApplyEmotion(EmotionParameter emotioinParameter)
 {
     if (this.isOnline)
     {
         Oniyamma.OniyammaService.Current.ApplyEmotion(emotioinParameter);
     }
 }
		/// <summary>
		/// Apply emotion value
		/// </summary>
		public void ApplyEmotion(EmotionParameter param)
		{
			var request = new RestRequest("/api/v1/apply_emotion", Method.GET);
			if (param.Kiss.HasValue)
				request.AddQueryParameter("kiss", param.Kiss.Value.ToString());
			if (param.Smile.HasValue)
				request.AddQueryParameter("smile", param.Smile.Value.ToString());
			if (param.MouthOpen.HasValue)
				request.AddQueryParameter("mouse_open", param.MouthOpen.Value.ToString());
			if (param.EyesUp.HasValue)
				request.AddQueryParameter("eyes_up", param.EyesUp.Value.ToString());
			if (param.EyesDown.HasValue)
				request.AddQueryParameter("eyes_down", param.EyesDown.Value.ToString());
			if (param.EyesClosedLeft.HasValue)
				request.AddQueryParameter("eyes_closed_left", param.EyesClosedLeft.Value.ToString());
			if (param.EyesClosedRight.HasValue)
				request.AddQueryParameter("eyes_closed_right", param.EyesClosedRight.Value.ToString());
			client.Execute(request);
		}