Skip to content

Commit

Permalink
Merge pull request #37 from Asesjix/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
S3bt3r authored Oct 25, 2018
2 parents 4ff6421 + fafad78 commit 9e2fbd8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/Zammad.Client/OrganizationClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public Task<IList<Organization>> SearchOrganizationAsync(string query, int limit
return GetAsync<IList<Organization>>("/api/v1/organizations/search", $"query={query}&limit={limit}&expand=true");
}

public Task<IList<Organization>> SearchOrganizationAsync(string query, int limit, string sortBy, string orderBy)
{
return GetAsync<IList<Organization>>("/api/v1/organizations/search", $"query={query}&limit={limit}&expand=true&sort_by={sortBy}&order_by={orderBy}");
}

public Task<Organization> GetOrganizationAsync(int id)
{
return GetAsync<Organization>($"/api/v1/organizations/{id}");
Expand Down
3 changes: 2 additions & 1 deletion src/Zammad.Client/Services/IOrganizationService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Zammad.Client.Resources;

Expand All @@ -9,6 +9,7 @@ public interface IOrganizationService
Task<IList<Organization>> GetOrganizationListAsync();
Task<IList<Organization>> GetOrganizationListAsync(int page, int count);
Task<IList<Organization>> SearchOrganizationAsync(string query, int limit);
Task<IList<Organization>> SearchOrganizationAsync(string query, int limit, string sortBy, string orderBy);
Task<Organization> GetOrganizationAsync(int id);
Task<Organization> CreateOrganizationAsync(Organization organization);
Task<Organization> UpdateOrganizationAsync(int id, Organization organization);
Expand Down
3 changes: 2 additions & 1 deletion src/Zammad.Client/Services/ITicketService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Zammad.Client.Resources;

Expand All @@ -9,6 +9,7 @@ public interface ITicketService
Task<IList<Ticket>> GetTicketListAsync();
Task<IList<Ticket>> GetTicketListAsync(int page, int count);
Task<IList<Ticket>> SearchTicketAsync(string query, int limit);
Task<IList<Ticket>> SearchTicketAsync(string query, int limit, string sortBy, string orderBy);
Task<Ticket> GetTicketAsync(int id);
Task<Ticket> CreateTicketAsync(Ticket ticket, TicketArticle article);
Task<Ticket> UpdateTicketAsync(int id, Ticket ticket);
Expand Down
3 changes: 2 additions & 1 deletion src/Zammad.Client/Services/IUserService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using Zammad.Client.Resources;

Expand All @@ -10,6 +10,7 @@ public interface IUserService
Task<IList<User>> GetUserListAsync();
Task<IList<User>> GetUserListAsync(int page, int count);
Task<IList<User>> SearchUserAsync(string query, int limit);
Task<IList<User>> SearchUserAsync(string query, int limit, string sortBy, string orderBy);
Task<User> GetUserAsync(int id);
Task<User> CreateUserAsync(User user);
Task<User> UpdateUserAsync(int id, User user);
Expand Down
5 changes: 5 additions & 0 deletions src/Zammad.Client/TicketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public Task<IList<Ticket>> SearchTicketAsync(string query, int limit)
return GetAsync<IList<Ticket>>("/api/v1/tickets/search", $"query={query}&limit={limit}&expand=true");
}

public Task<IList<Ticket>> SearchTicketAsync(string query, int limit, string sortBy, string orderBy)
{
return GetAsync<IList<Ticket>>("/api/v1/tickets/search", $"query={query}&limit={limit}&expand=true&sort_by={sortBy}&order_by={orderBy}");
}

public Task<Ticket> GetTicketAsync(int id)
{
return GetAsync<Ticket>($"/api/v1/tickets/{id}");
Expand Down
5 changes: 5 additions & 0 deletions src/Zammad.Client/UserClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public Task<IList<User>> SearchUserAsync(string query, int limit)
return GetAsync<IList<User>>("/api/v1/users/search", $"query={query}&limit={limit}&expand=true");
}

public Task<IList<User>> SearchUserAsync(string query, int limit, string sortBy, string orderBy)
{
return GetAsync<IList<User>>("/api/v1/users/search", $"query={query}&limit={limit}&expand=true&sort_by={sortBy}&order_by={orderBy}");
}

public Task<User> GetUserAsync(int id)
{
return GetAsync<User>($"/api/v1/users/{id}");
Expand Down

0 comments on commit 9e2fbd8

Please sign in to comment.