コード例 #1
0
ファイル: Api.cs プロジェクト: kasthack/kasthack.vksharp
 public async Task <Group> Create(
     string title , PageType type = PageType.Group, PageSubtype? subtype = null,  string description = ""
 ) {
     return (
         await _parent.Executor.ExecAsync(
             _parent._reqapi.Groups.Create(
                 title,type,subtype,description
             )
         ).ConfigureAwait(false)
     ).Response;
 }
コード例 #2
0
ファイル: Api.cs プロジェクト: kasthack/kasthack.vksharp
 public Group CreateSync(
     string title , PageType type = PageType.Group, PageSubtype? subtype = null,  string description = ""
 ) {
     var task = _parent.Executor.ExecAsync(
             _parent._reqapi.Groups.Create(
                 title,type,subtype,description
             )
         );
     task.Wait();
     return task.Result.Response;
 }
コード例 #3
0
            public Request<Group> Create(
                string title , PageType type = PageType.Group, PageSubtype? subtype = null,  string description = ""
            ) {
                var req = new Request<Group>{
                    MethodName = "groups.create",
                    Parameters = new Dictionary<string, string> {

                        { "title", title},
                        { "type", type.ToNCString().ToSnake()},
                        { "subtype", MiscTools.NullableString( (int?)subtype )},
                        { "description", description},

                    }
                };
                    req.Token = _parent.CurrentToken;
                return req;
            }