Example #1
0
        public async Task <int> CreateLdapUser(CreateLdapUserRequest request)
        {
            var body     = Json.ToString(request);
            var response = await http.Post("api/v4/users.json", body);

            var created = Json.ToObject <Created>(response);

            return(Int32.Parse(created.Id));
        }
Example #2
0
        public async Task <int> CreatePassword(CreateMyPasswordRequest request)
        {
            var body     = Json.ToString(request);
            var response = await http.Post("api/v4/my_passwords.json", body);

            var created = Json.ToObject <Created>(response);

            return(Int32.Parse(created.Id));
        }
        public async Task <int> CreateGroup(string name)
        {
            var body = Json.ToString(new CreateGroupRequest
            {
                Name = name
            });

            var response = await http.Post("api/v4/groups.json", body);

            var created = Json.ToObject <Created>(response);

            return(Int32.Parse(created.Id));
        }