Esempio n. 1
0
        /// <summary>
        /// チームメンバー取得
        /// </summary>
        /// <param name="projectId">プロジェクトID</param>
        /// <param name="userId">ユーザーID</param>
        /// <returns>チームメンバークラス</returns>
        public async Task <ProjectTeamMember> RequestProjectTeamMember(string projectId, string userId)
        {
            ProjectTeamMember member = null;

            try
            {
                string uri = string.Format(URI_PREFIX + this.Version + "/projects/{1}/members/{2}?private_token={3}", this.host, projectId, userId, this.private_token);

                string responseBody = await this.HttopGet(uri);

                member = ProjectTeamMemberFactory.Create(responseBody);
            }
            catch (HttpRequestException ex)
            {
                // 例外処理
                this.NotifyException(ex);
            }
            return(member);
        }
Esempio n. 2
0
        /// <summary>
        /// チームメンバーリスト取得
        /// </summary>
        /// <param name="id">プロジェクトID</param>
        /// <returns>チームメンバーリスト</returns>
        public async Task <List <ProjectTeamMember> > RequestProjectTeamMembers(string id)
        {
            List <ProjectTeamMember> members = new List <ProjectTeamMember>();

            try
            {
                string uri = string.Format(URI_PREFIX + this.Version + "/projects/{1}/members?private_token={2}", this.host, id, this.private_token);

                string responseBody = await this.HttopGet(uri);

                members = ProjectTeamMemberFactory.Creates(responseBody);
            }
            catch (HttpRequestException ex)
            {
                // 例外処理
                this.NotifyException(ex);
            }
            return(members);
        }