Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Fix Attachments and Get Subcribers (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-symphony authored Jul 15, 2020
1 parent 66ce9a2 commit 1500043
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions apiClientDotNet/Clients/Constants/AgentConstants.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace apiClientDotNet.Clients.Constants
{
Expand All @@ -10,7 +8,7 @@ public class AgentConstants
public static String READDATAFEED = "/agent/v4/datafeed/{id}/read";
public static String CREATEMESSAGE = "/agent/v4/stream/{sid}/message/create";
public static String GETMESSAGES = "/agent/v4/stream/{sid}/message";
public static String GETATTACHMENT = "/v1/stream/{sid}/attachment";
public static String GETATTACHMENT = "/agent/v1/stream/{sid}/attachment";

public static String SEARCHMESSAGES = "/agent/v1/message/search";
public static String MESSAGEIMPORT = "/agent/v4/message/import" ;
Expand All @@ -22,7 +20,7 @@ public class AgentConstants
public static String DELETESIGNAL = "/agent/v1/signals/{id}/delete";
public static String SUBSCRIBESIGNAL = "/agent/v1/signals/{id}/subscribe";
public static String UNSUBSCRIBESIGNAL = "/agent/v1/signals/{id}/unsubscribe";
public static String GETSUBSCRIBERS = "/v1/signals/{id}/subscribers";
public static String GETSUBSCRIBERS = "/agent/v1/signals/{id}/subscribers";

}
}
2 changes: 1 addition & 1 deletion apiClientDotNet/Clients/DatafeedClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace apiClientDotNet
{
public class DatafeedClient
{
List<RoomListener> listeners = new List<RoomListener>();
List<IRoomListener> listeners = new List<IRoomListener>();
static HttpClient client = new HttpClient();

public Datafeed createDatafeed(SymConfig symConfig)
Expand Down
2 changes: 1 addition & 1 deletion apiClientDotNet/Clients/MessageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public byte[] getAttachment(String streamId, String attachmentId, String message
SymConfig symConfig = botClient.getConfig();

RestRequestHandler restRequestHandler = new RestRequestHandler();
string url = CommonConstants.HTTPSPREFIX + symConfig.agentHost + ":" + symConfig.agentPort + AgentConstants.GETATTACHMENT.Replace("{sid}", streamId) + "?filedId=" + attachmentId + "&messageId=" + messageId;
string url = CommonConstants.HTTPSPREFIX + symConfig.agentHost + ":" + symConfig.agentPort + AgentConstants.GETATTACHMENT.Replace("{sid}", streamId) + "?fileId=" + attachmentId + "&messageId=" + messageId;

HttpWebResponse resp = restRequestHandler.executeRequest(null, url, false, WebRequestMethods.Http.Get, symConfig, true);
string body = restRequestHandler.ReadResponse(resp);
Expand Down

0 comments on commit 1500043

Please sign in to comment.