C Sharp

出自Manyou开发者指南

(重定向自C)
跳转到: 导航, 搜索

Manyou API .NET client

This is a opensource c-sharp client project for the manyou REST-like web service.you can use it develop apps for Manyou Open Platform by csharp or other .NET languages.20Guide].

使用方法 ManyouSession session = new ManyouSession(api_key, secret);

调用session相关方法即可

地址: http://www.codeplex.com/manyoutoolkit/

作者: 大川

示例

ManyouSession session = new ManyouSession(apikey, apisecret); //应用需要安装 session.RequireAdd(); //user.getLoggedInUser Me me = session.GetLoggedInUser(); //user.getInfo User user = session.GetUserInfo(session.GetLoggedInUser().UId); //friend.get Friend[] f = session.GetFriends(); //friend.areFriends bool arefriends = session.AreFriends( session.GetLoggedInUser().UId, 1592626) //feed.publishTemplatizedAction session.PublishTemplatizedAction("{actor} 阅读了 {book}", "{\"book\":\"男人的魅力\"}", "来自 读书吧 的用户为 {book} 打了 {numstars} 分", "{\"book\":\"<a href=\\\"http:\\/\\/www.someurl.com\\/men\\\">男人的魅力<\\/a>\",\"numstars\":5}", "<my:name uid=\"1000439\" /> Ta 说 \"本书改变了我的人生\"", "http://www.discuz.net/ucserver/avatar.php?uid=881035", "http://www.discuz.net/ucserver/avatar.php?uid=881035", "", "", "", "", "", ""); //profile.setMYML string myml = session.GetMYML(); //profile.getMYML session.SetMYML("asdfasdfasdf"); //notification.get Notification n = session.GetNotification(); //notification.send session.SendNotification(session.GetLoggedInUser().UId.ToString(), "hello world");
个人工具
接口文档