[英]C# yammer api export csv file
I 'm looking for a code which exports Yammer data in zip file like I need only message.csv, users.csv, groups.csv, could you please help ? 我正在寻找一个将zip文件中的Yammer数据导出的代码,就像我只需要message.csv,users.csv,groups.csv一样,请您帮忙吗? I 'm getting 20 messages initially instead of all public messages and I want to get data based on date how to pass query for the same ? 我最初收到20条消息,而不是所有公共消息,并且我想根据日期获取数据如何传递相同的查询?
Code I have used 我使用的代码
wr = WebRequest.CreateHttp(Url);
wr.Method = "GET";
if (!string.IsNullOrEmpty(authHeader))
wr.Headers.Add("Authorization", "Bearer " + authHeader);
wResp = (HttpWebResponse)wr.GetResponse();
Stream dataStream = wResp.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
results = reader.ReadToEnd();
reader.Close();
You can use the HttpClient
to call the given endpoints that are described at https://developer.yammer.com/docs/ then you can then save these to disk using File.Write
Then you can create Zip file using the ZipFile
object - https://msdn.microsoft.com/en-gb/library/system.io.compression.zipfile(v=vs.110).aspx 您可以使用HttpClient
调用,在描述给定的端点https://developer.yammer.com/docs/那么你可以然后使用这些保存到磁盘File.Write
然后你就可以使用创建Zip文件ZipFile
对象- HTTPS ://msdn.microsoft.com/zh-CN/library/system.io.compression.zipfile(v = vs.110).aspx
There's a lot to all this, It might be worth having a stab at something and when you get stuck create a question related to a specific problem area. 所有这些都有很多,可能值得一试,当您陷入困境时,请创建与特定问题区域相关的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.