示例#1
0
        public mvcasgateway.Api.Model.GetToDoResponse GetTodos(string token)
        {
            var client = new mvcasgatewayAPIService(token);

            var response = client.TodoApi.TodoGetWithHttpInfo();

            return(response.Data);
        }
示例#2
0
        public void CreateTodo(string token, string name)
        {
            var client = new mvcasgatewayAPIService(token);

            var response = client.TodoApi.TodoPostWithHttpInfo(new mvcasgateway.Api.Model.PostTodoRequest
            {
                Name = name,
            });
        }
示例#3
0
        public string Login(string username, string password)
        {
            var client = new mvcasgatewayAPIService("");

            var response = client.AuthenticationApi.AuthenticationLoginWithHttpInfo(new mvcasgateway.Api.Model.LoginRequest
            {
                Username = username,
                Password = password,
            });

            return(response.Data.Token);
        }
示例#4
0
        public void Register(string email, string firstname, string lastname, string password, string confirmPassword)
        {
            var client = new mvcasgatewayAPIService("");

            var response = client.AuthenticationApi.AuthenticationRegisterWithHttpInfo(new mvcasgateway.Api.Model.RegisterRequest
            {
                Email           = email,
                Password        = password,
                FirstName       = firstname,
                LastName        = lastname,
                ConfirmPassword = confirmPassword
            });
        }