Exemple #1
0
 public static void SetUserLocation(float latitude, float longtitude, Action <bool, User> onCompleted)
 {
     WebRequestService.RequestObject(
         $"{DomainUrl}{Routes.SetUserLocation}",
         $@"{{""lat"" : ""{latitude}"",  ""lng"" : ""{longtitude}""}}",
         UnityWebRequest.kHttpVerbPOST,
         new Dictionary <string, string>
     {
         { ContentTypeHeaderName, AppJsonHeader },
         { AuthorizationHeaderName, string.Format(AuthorizationHeaderFormat, BearerToken) }
     },
         onCompleted);
 }
Exemple #2
0
 public static void GetClub(string clubId, Action <bool, Club> onCompleted)
 {
     WebRequestService.RequestObject(
         $"{DomainUrl}{Routes.GetClub}{clubId}",
         string.Empty,
         UnityWebRequest.kHttpVerbGET,
         new Dictionary <string, string>
     {
         { ContentTypeHeaderName, AppJsonHeader },
         { AuthorizationHeaderName, string.Format(AuthorizationHeaderFormat, BearerToken) }
     },
         onCompleted);
 }
Exemple #3
0
 public static void SetUserClub(string clubId, Action <bool, User> onCompleted)
 {
     WebRequestService.RequestObject(
         $"{DomainUrl}{Routes.SetUserClub}",
         $@"{{""club"" : ""{clubId}""}}",
         UnityWebRequest.kHttpVerbPOST,
         new Dictionary <string, string>
     {
         { ContentTypeHeaderName, AppJsonHeader },
         { AuthorizationHeaderName, string.Format(AuthorizationHeaderFormat, BearerToken) }
     },
         onCompleted);
 }