Example #1
0
		public async Task<bool> ValidaEmail(string email)
		{

			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("User/ValidaEmail?email="+email);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<bool> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return true;
			}
		}
Example #2
0
		public async Task<ResultMsg<Users>> Login(string email,string pwd)
		{

			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("User/Login?email="+email+"&pwd="+pwd);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<ResultMsg<Users>> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;
			}
		}
Example #3
0
		public async Task<PublicViews> GetPublicViewsByIdUser(string id,string IdCategory,string key)
		{
			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("Grill/GetPublicViewsByIdUser?id="+id+"&idc="+IdCategory+"&key="+key);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<PublicViews> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;
			}
		}
Example #4
0
		public async Task<PublicViews> GetPublicViews(string id)
		{
			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("Grill/GetPublicViews?id="+id);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<PublicViews> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;
			}
		}
Example #5
0
		public async Task<List<PublicViews>> GetAllPublicViews()
		{
			try {
				using (var Client = new  ApiClient ()) {


					var Result = await Client.GetAsync ("User/GetAllPublicViews");

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<List<PublicViews>> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return null;
			}
		}
Example #6
0
		public async Task<int>   UpdatePoint(string id ,string idp, string key)
		{

			try {
				using (var Client = new  ApiClient ()) {
					
					var Result = await Client.GetAsync ("User/UpdatePoint?id="+id+"&idp="+idp+"&key="+key);

					var ResultJson = Result.Content.ReadAsStringAsync ().Result;

					var dato = JsonConvert.DeserializeObject<int> (ResultJson);

					return dato;

				}
			} catch (Exception) {

				return 0;
			}
		}
Example #7
0
		public async void UpdateGCM(string email ,string RegisterID)
		{

			try {
				using (var Client = new  ApiClient ()) {

					await Client.GetAsync ("User/UpdateGcm?email="+email+"&gcmid="+RegisterID);
				}
			} catch (Exception) {

				return;
			}
		}