当前位置: 首页>>代码示例>>C#>>正文


C# VkParameters类代码示例

本文整理汇总了C#中VkParameters的典型用法代码示例。如果您正苦于以下问题:C# VkParameters类的具体用法?C# VkParameters怎么用?C# VkParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VkParameters类属于命名空间,在下文中一共展示了VkParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Get

        public ReadOnlyCollection<Message> Get(
            MessageType type,
            out int totalCount,
            int? count = null,
            int? offset = null,
            DateTime? timeOffset = null,
            MessagesFilter? filter = null,
            int? previewLength = null,
            long? lastMessageId = null)
        {
            VkErrors.ThrowIfNumberIsNegative(() => count);
            VkErrors.ThrowIfNumberIsNegative(() => offset);
			VkErrors.ThrowIfNumberIsNegative(() => previewLength);
			VkErrors.ThrowIfNumberIsNegative(() => lastMessageId);

            var parameters = new VkParameters
                             {
                                 { "out", type },
                                 { "offset", offset },
                                 { "count", count },
                                 { "time_offset", timeOffset},
                                 { "filters", filter },
                                 { "preview_length", previewLength },
                                 { "last_message_id", lastMessageId }
                             };

            VkResponse response = _vk.Call("messages.get", parameters);
            totalCount = response["count"];

            VkResponseArray items = response["items"];
            return items.ToReadOnlyCollectionOf<Message>(item => item);
        }
开发者ID:G-IT-ED,项目名称:vk,代码行数:32,代码来源:MessagesCategory.cs

示例2: Leave

		public bool Leave(long groupId)
		{
			var parameters = new VkParameters {
				{ "group_id", groupId }
			};

			return _vk.Call("groups.leave", parameters);
		}
开发者ID:ProESM,项目名称:vk,代码行数:8,代码来源:GroupsCategory.cs

示例3: AddGroup

 public bool AddGroup(ulong groupId)
 {
     var parameters = new VkParameters
     {
         { "group_id", groupId }
     };
     return _vk.Call("fave.addGroup", parameters);
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:8,代码来源:FaveCategory.cs

示例4: CheckLink

        public LinkAccessType CheckLink([NotNull] string url)
        {
            VkErrors.ThrowIfNullOrEmpty(() => url);

            var parameters = new VkParameters { {"url", url} };

            return _vk.Call("utils.checkLink", parameters, true);
        }
开发者ID:Olegasdf,项目名称:vk,代码行数:8,代码来源:UtilsCategory.cs

示例5: GetStreetsById

        public ReadOnlyCollection<Street> GetStreetsById(params int[] streetIds)
        {
            var parameters = new VkParameters();
            parameters.Add<int>("street_ids", streetIds);

            VkResponseArray response = _vk.Call("database.getStreetsById", parameters, true);
            return response.ToReadOnlyCollectionOf<Street>(x => x);
        }
开发者ID:G-IT-ED,项目名称:vk,代码行数:8,代码来源:DatabaseCategory.cs

示例6: ResolveScreenName

        public VkObject ResolveScreenName([NotNull] string screenName)
        {
            VkErrors.ThrowIfNullOrEmpty(() => screenName);

            var parameters = new VkParameters {{"screen_name", screenName}};

            return _vk.Call("utils.resolveScreenName", parameters, true);
        }
开发者ID:Olegasdf,项目名称:vk,代码行数:8,代码来源:UtilsCategory.cs

示例7: IsAppUser

		public bool IsAppUser(long? userId)
		{
			var parameters = new VkParameters {
				{ "user_id", userId }
			};

			return _vk.Call("users.isAppUser", parameters);
		}
开发者ID:kadkin,项目名称:vk,代码行数:8,代码来源:UsersCategory.cs

示例8: Get

        public Status Get(long userId, long? groupId = null)
        {
            var parameters = new VkParameters {
                { "user_id", userId },
                { "group_id", groupId }
            };

            return _vk.Call("status.get", parameters);
        }
开发者ID:vknet,项目名称:vk,代码行数:9,代码来源:StatusCategory.cs

示例9: Join

		public bool Join(long? groupId, bool? notSure = null)
		{
			var parameters = new VkParameters {
				{ "group_id", groupId },
				{ "not_sure", notSure }
			};

			return _vk.Call("groups.join", parameters);
		}
开发者ID:ProESM,项目名称:vk,代码行数:9,代码来源:GroupsCategory.cs

示例10: GetLyrics

		public Lyrics GetLyrics(long lyricsId)
		{
			var parameters = new VkParameters
			{
				{ "lyrics_id", lyricsId }
			};

			return _vk.Call("audio.getLyrics", parameters);
		}
开发者ID:kadkin,项目名称:vk,代码行数:9,代码来源:AudioCategory.cs

示例11: Add

        public int Add(long owner_id, long doc_id, string access_key = null)
        {
            VkErrors.ThrowIfNumberIsNegative(() => owner_id);
            VkErrors.ThrowIfNumberIsNegative(() => doc_id);

            var parameters = new VkParameters { { "owner_id", owner_id }, { "doc_id", doc_id }, { "access_key", access_key } };

            return _vk.Call("docs.add", parameters);
        }
开发者ID:andrew-veresov,项目名称:vk,代码行数:9,代码来源:DocsCategory.cs

示例12: CreateChat

        /// <summary>
        /// Создаёт беседу с несколькими участниками. 
        /// </summary>
        /// <param name="userIds">Идентификаторы пользователей, которых нужно включить в беседу (мультидиалог).</param>
        /// <param name="title">Название беседы.</param>
        /// <returns>После успешного выполнения возвращает идентификатор созданной беседы.</returns>
        /// <remarks>
        /// Для вызова этого метода Ваше приложение должно иметь права с битовой маской, содержащей <see cref="Settings.Messages"/>. 
        /// Страница документации ВКонтакте <see href="http://vk.com/dev/messages.createChat"/>.
        /// </remarks>
        public long CreateChat(IEnumerable<long> userIds, [NotNull] string title)
        {
            if (string.IsNullOrEmpty(title))
                throw new ArgumentException("Title can not be empty or null.", "userIds");

            var parameters = new VkParameters { { "uids", userIds }, { "title", HttpUtility.UrlEncode(title) } };

            return _vk.Call("messages.createChat", parameters);
        }
开发者ID:justloot,项目名称:vk,代码行数:19,代码来源:MessagesCategory.cs

示例13: DeleteBan

 public bool DeleteBan(IEnumerable<ulong> userIds, IEnumerable<ulong> groupIds)
 {
     var parameters = new VkParameters
     {
         { "user_ids", userIds },
         { "group_ids", groupIds }
     };
     return _vk.Call("newsfeed.deleteBan", parameters);
 }
开发者ID:Olegasdf,项目名称:vk,代码行数:9,代码来源:NewsFeedCategory.cs

示例14: ApproveRequest

 public bool ApproveRequest(ulong groupId, ulong userId)
 {
     var parameters = new VkParameters
     {
         { "group_id", groupId },
         { "user_id", userId }
     };
     return _vk.Call("groups.approveRequest", parameters);
 }
开发者ID:aavezel,项目名称:vk,代码行数:9,代码来源:GroupsCategory.cs

示例15: ClearCache

        public bool ClearCache(Uri url)
        {
            var parameters = new VkParameters
            {
                { "url", url }
            };

            return _vk.Call("pages.clearCache", parameters);
        }
开发者ID:NorDroN,项目名称:vk,代码行数:9,代码来源:PagesCategory.cs


注:本文中的VkParameters类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。