Beispiel #1
0
//------------------------------------------------------------------------------------------------
        /// <summary>
        ///     Get list of user associated with a project.
        /// </summary>
        /// <param name="project_id">The project_id is the identifier of the project.</param>
        /// <returns>List of User objects.</returns>
        public UserList GetUsers(string project_id)
        {
            var url      = baseAddress + "/" + project_id + "/users";
            var responce = ZohoHttpClient.get(url, getQueryParameters());

            return(ProjectParser.getUserList(responce));
        }
Beispiel #2
0
        /// <summary>
        ///     Assigns the users to a project.
        /// </summary>
        /// <param name="project_id">The project_id is the identifier of the project.</param>
        /// <param name="users_to_assign">The users_to_assign is the UsersToAssign object with user_id as mandatory attribute.</param>
        /// <returns>List of User objects.</returns>
        public UserList AssignUsers(string project_id, UsersToAssign users_to_assign)
        {
            var url        = baseAddress + "/" + project_id + "/users";
            var json       = JsonConvert.SerializeObject(users_to_assign);
            var jsonstring = new Dictionary <object, object>();

            jsonstring.Add("JSONString", json);
            var responce = ZohoHttpClient.post(url, getQueryParameters(jsonstring));

            return(ProjectParser.getUserList(responce));
        }