Skip to content

Commit 9250681

Browse files
authored
Merge pull request #15 from tranpl/master
refactor
2 parents 88ca3dd + 5f4191c commit 9250681

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

RedcapApi/Api/Redcap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ public Task<string> GetRecordsAsync(RedcapFormat redcapFormat, ReturnFormat retu
910910
/// This method allows you to export the Arms for a project.
911911
/// NOTE: This only works for longitudinal projects. E.g. Arms are only available in longitudinal projects.
912912
/// </summary>
913-
public async Task<string> ExportArms<T>(RedcapFormat redcapFormat, ReturnFormat returnFormat, List<T> arms = null)
913+
public async Task<string> ExportArmsAsync<T>(RedcapFormat redcapFormat, ReturnFormat returnFormat, List<T> arms = null)
914914
{
915915
try
916916
{
@@ -951,7 +951,7 @@ public async Task<string> ExportArms<T>(RedcapFormat redcapFormat, ReturnFormat
951951
/// <param name="redcapFormat"></param>
952952
/// <param name="returnFormat"></param>
953953
/// <returns>Number of Arms imported</returns>
954-
public async Task<string> ImportArms<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat)
954+
public async Task<string> ImportArmsAsync<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat)
955955
{
956956
try
957957
{
@@ -990,7 +990,7 @@ public async Task<string> ImportArms<T>(List<T> data, Override overRide, RedcapF
990990
/// <param name="RedcapFormat"></param>
991991
/// <param name="returnFormat"></param>
992992
/// <returns></returns>
993-
public async Task<string> DeleteArms<T>(T data)
993+
public async Task<string> DeleteArmsAsync<T>(T data)
994994
{
995995
try
996996
{
@@ -1015,7 +1015,7 @@ public async Task<string> DeleteArms<T>(T data)
10151015

10161016
}
10171017

1018-
public Task<string> DeleteArms<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat)
1018+
public Task<string> DeleteArmsAsync<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat)
10191019
{
10201020
throw new NotImplementedException();
10211021
}

RedcapApi/Interfaces/IRedcap.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface IRedcap
3030
/// <param name="returnFormat"></param>
3131
/// <param name="arms"></param>
3232
/// <returns>Arms for the project in the format specified</returns>
33-
Task<string> ExportArms<T>(RedcapFormat redcapFormat, ReturnFormat returnFormat, List<T> arms);
33+
Task<string> ExportArmsAsync<T>(RedcapFormat redcapFormat, ReturnFormat returnFormat, List<T> arms);
3434

3535
/// <summary>
3636
/// This method allows you to import Arms into a project or to rename existing Arms in a project.
@@ -47,7 +47,7 @@ public interface IRedcap
4747
/// <param name="redcapFormat"></param>
4848
/// <param name="returnFormat"></param>
4949
/// <returns>Number of Arms imported</returns>
50-
Task<string> DeleteArms<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat);
50+
Task<string> DeleteArmsAsync<T>(List<T> data, Override overRide, RedcapFormat redcapFormat, ReturnFormat returnFormat);
5151
/// <summary>
5252
/// This method allows you to delete Arms from a project. Notice: Because of this method's destructive nature, it is only available for use for projects in Development status. Additionally, please be aware that deleting an arm also automatically deletes all events that belong to that arm, and will also automatically delete any records/data that have been collected under that arm (this is non-reversible data loss).
5353
/// NOTE: This only works for longitudinal projects.
@@ -58,7 +58,7 @@ public interface IRedcap
5858
/// <param name="RedcapFormat"></param>
5959
/// <param name="returnFormat"></param>
6060
/// <returns></returns>
61-
Task<string> DeleteArms<T>(T data);
61+
Task<string> DeleteArmsAsync<T>(T data);
6262
Task<string> ExportEvents(int[] arms, OverwriteBehavior overwriteBehavior, RedcapFormat RedcapFormat, ReturnFormat returnFormat);
6363
Task<string> ImportEvents(int[] arms, OverwriteBehavior overwriteBehavior, RedcapFormat RedcapFormat, ReturnFormat returnFormat);
6464
Task<string> DeleteEvents(int[] arms, OverwriteBehavior overwriteBehavior, RedcapFormat RedcapFormat, ReturnFormat returnFormat);

RedcapApi/Redcap.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<AssemblyVersion>0.2.4.0</AssemblyVersion>
1515
<PackageTags>redcap</PackageTags>
1616
<PackageReleaseNotes>initial alpha release</PackageReleaseNotes>
17+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1718
</PropertyGroup>
1819

1920
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

RedcapApiDemo/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ static void Main(string[] args)
1515
var redcap_api = new RedcapApi("3D57A7FA57C8A43F6C8803A84BB3957B", "http://localhost/redcap/api/");
1616

1717
var armList = new List<int> {2 }.ToArray();
18-
var result = redcap_api.DeleteArms(armList).Result;
18+
var result = redcap_api.DeleteArmsAsync(armList).Result;
1919
var data = JsonConvert.DeserializeObject(result);
2020
Console.WriteLine(data);
2121
Console.ReadLine();

0 commit comments

Comments
 (0)