private async Task <HttpStatusCode> DoDescribe(string authToken)
        {
            string   describeAccountPath = "/services/data/" + ApiVersionStrings.VersionNumber + "/sobjects/Account/describe";
            var      headers             = new HttpCallHeaders(authToken, new Dictionary <string, string>());
            HttpCall result =
                await HttpCall.CreateGet(headers, TestCredentials.InstanceServer + describeAccountPath).ExecuteAsync();

            return(result.StatusCode);
        }
        private async Task <HttpStatusCode> DoDescribe(string authToken)
        {
            string   describeAccountPath = "/services/data/v33.0/sobjects/Account/describe";
            var      headers             = new HttpCallHeaders(authToken, new Dictionary <string, string>());
            HttpCall result =
                await HttpCall.CreateGet(headers, TestCredentials.INSTANCE_SERVER + describeAccountPath).Execute();

            return(result.StatusCode);
        }
Example #3
0
        /// <summary>
        ///     Async method to call the identity service (to get the mobile policy among other pieces of information)
        /// </summary>
        /// <param name="idUrl"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static async Task <IdentityResponse> CallIdentityServiceAsync(string idUrl, string accessToken)
        {
            LoggingService.Log("Calling identity service", LoggingLevel.Verbose);

            // Auth header
            var headers = new HttpCallHeaders(accessToken, new Dictionary <string, string>());
            // Get
            HttpCall c = HttpCall.CreateGet(headers, idUrl);

            // ExecuteAsync get
            return(await c.ExecuteAndDeserializeAsync <IdentityResponse>());
        }
        /// <summary>
        ///     Async method to call the identity service (to get the mobile policy among other pieces of information)
        /// </summary>
        /// <param name="idUrl"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static async Task <IdentityResponse> CallIdentityService(string idUrl, string accessToken)
        {
            PlatformAdapter.SendToCustomLogger("OAuth2.CallIdentityService - calling identity service", LoggingLevel.Verbose);

            // Auth header
            var headers = new HttpCallHeaders(accessToken, new Dictionary <string, string>());
            // Get
            HttpCall c = HttpCall.CreateGet(headers, idUrl);

            // Execute get
            return(await c.ExecuteAndDeserialize <IdentityResponse>());
        }
        /// <summary>
        ///     Async method to call the identity service (to get the mobile policy among other pieces of information)
        /// </summary>
        /// <param name="idUrl"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static async Task<IdentityResponse> CallIdentityServiceAsync(string idUrl, string accessToken)
        {
            LoggingService.Log("Calling identity service", LoggingLevel.Verbose);

            // Auth header
            var headers = new HttpCallHeaders(accessToken, new Dictionary<string, string>());
            // Get
            HttpCall c = HttpCall.CreateGet(headers, idUrl);

            // ExecuteAsync get
            return await c.ExecuteAndDeserializeAsync<IdentityResponse>();
        }
 private async Task<HttpStatusCode> DoDescribe(string authToken)
 {
     string describeAccountPath = "/services/data/" + ApiVersionStrings.VersionNumber + "/sobjects/Account/describe";
     var headers = new HttpCallHeaders(authToken, new Dictionary<string, string>());
     HttpCall result =
         await HttpCall.CreateGet(headers, TestCredentials.InstanceServer + describeAccountPath).ExecuteAsync();
     return result.StatusCode;
 }
        /// <summary>
        ///     Async method to call the identity service (to get the mobile policy among other pieces of information)
        /// </summary>
        /// <param name="idUrl"></param>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static async Task<IdentityResponse> CallIdentityService(string idUrl, string accessToken)
        {
            PlatformAdapter.SendToCustomLogger("OAuth2.CallIdentityService - calling identity service", LoggingLevel.Verbose);

            // Auth header
            var headers = new HttpCallHeaders(accessToken, new Dictionary<string, string>());
            // Get
            HttpCall c = HttpCall.CreateGet(headers, idUrl);

            // Execute get
            return await c.ExecuteAndDeserialize<IdentityResponse>();
        }