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; }
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; }
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; }