Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions ImageKitSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,16 @@ static void Main(string[] args)

// List and search files
GetFileListRequest model = new GetFileListRequest
{
{
Name = "file_name.jpg",
Type = "file",
Limit = 10,
Skip = 0,
Sort = "ASC_CREATED",
SearchQuery = "name = \"file_name.jpg\"",
FileType = "image",
Path= "/"
SearchQuery = "createdAt >= \"7d\"",
FileType = "image",
Tags = new string[] { "sale", "summer" },
Path = "/"
};
ResultList res = imagekit.GetFileListRequest(model);

Expand Down
6 changes: 3 additions & 3 deletions Imagekit.UnitTests/ImageKitRequestModelValidation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void UpdateFileDetail_ModelValidation()
.Respond("application/json", "{'name' : 'ImageKit Response'}");

var client = mockHttp.ToHttpClient();
RestClient rs = new RestClient(GOOD_PRIVATEKEY, GOOD_URLENDPOINT, client);
RestClient rs = new RestClient(GOOD_PRIVATEKEY, GOOD_URLENDPOINT, client);
var response = rs.UpdateFileDetail(ob);
mockHttp.VerifyNoOutstandingExpectation();
}
Expand All @@ -147,8 +147,8 @@ public void GetFileListRequest_ModelValidation()
Path = "Test",
Sort = "Test",
SearchQuery = "Test",
FileType = "Test"

FileType = "Test",
Tags = null
};
string param = "sort=Test&path=Test&searchQuery=Test&fileType=Test&limit=10&skip=20";
string url = string.Format("https://api.imagekit.io/v1/files/?{0}", param);
Expand Down
2 changes: 2 additions & 0 deletions Imagekit/Models/GetFileListRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public class GetFileListRequest
public int Limit { get; set; }

public int Skip { get; set; }

public string[] Tags { get; set; }
}
}
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,14 @@ Accepts an object specifying the parameters to be used to list and search files.
```cs
GetFileListRequest model = new GetFileListRequest
{
Type = "file",
Limit = 10,
Skip = 0,
Sort = "ASC_CREATED",
SearchQuery = "name = \"file_name.jpg\"",
FileType = "image",
Path= "/"
Name = "file_name.jpg",
Type = "file",
Limit = 10,
Skip = 0,
Sort = "ASC_CREATED",
SearchQuery = "createdAt >= \"7d\"",
FileType = "image",
Tags = new string[] { "tag1", "tag2" }
};
ResultList resp = await imagekit.GetFileDetail(model);
```
Expand Down