/// <summary> /// Returns the current allocation limits for your application for the specified integration points. Allocation limits are determined daily. /// </summary> /// <returns>The requested allocation</returns> public int getAllocation(IntegrationPointName name) { var parameterList = new Dictionary<string, string> {{"method", "facebook.admin.getAllocation"}}; _api.AddRequiredParameter(parameterList, "integration_point_name", name.ToString()); var response = _api.SendRequest(parameterList); return !string.IsNullOrEmpty(response) ? admin_getAllocation_response.Parse(response).TypedValue : 0; }
/// <summary> /// Returns the current allocation limits for your application for the specified integration points. Allocation limits are determined daily. /// </summary> /// <returns>The requested allocation</returns> public int getAllocation(IntegrationPointName name) { var parameterList = new Dictionary <string, string> { { "method", "facebook.admin.getAllocation" } }; _api.AddRequiredParameter(parameterList, "integration_point_name", name.ToString()); var response = _api.SendRequest(parameterList); return(!string.IsNullOrEmpty(response) ? admin_getAllocation_response.Parse(response).TypedValue : 0); }
private int GetAllocation(IntegrationPointName name, bool isAsync, GetAllocationCallback callback, Object state) { var parameterList = new Dictionary <string, string> { { "method", "facebook.admin.getAllocation" } }; Utilities.AddRequiredParameter(parameterList, "integration_point_name", name.ToString()); if (isAsync) { SendRequestAsync <admin_getAllocation_response, int>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <int>(callback), state); return(0); } var response = SendRequest <admin_getAllocation_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return(response == null ? default(int) : response.TypedValue); }
private int GetAllocation(IntegrationPointName name, bool isAsync, GetAllocationCallback callback, Object state) { var parameterList = new Dictionary<string, string> {{"method", "facebook.admin.getAllocation"}}; Utilities.AddRequiredParameter(parameterList, "integration_point_name", name.ToString()); if (isAsync) { SendRequestAsync<admin_getAllocation_response, int>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<int>(callback), state); return 0; } var response = SendRequest<admin_getAllocation_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return response == null ? default(int) : response.TypedValue; }