project.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2023/09/27 11:15:55
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc : project manger
  8. '''
  9. import os,sys,re,requests,json
  10. class Project(object):
  11. host="https://e.coding.net/open-api"
  12. def __init__(self, Id, Name, DisplayName, Description, TeamOwnerId, TeamId) -> None:
  13. self.Id = Id
  14. self.Name = Name
  15. self.DisplayName = DisplayName
  16. self.Description = Description
  17. self.TeamOwnerId = TeamOwnerId
  18. self.TeamId= TeamId
  19. def create_project(self):
  20. ''' 创建项目 '''
  21. # https://{your-team}.coding.net/api/user/{user}/project
  22. pass
  23. def delete_project(self):
  24. ''' 删除项目 '''
  25. # https://{your-team}.coding.net/api/user/{user}/project/{project}
  26. pass
  27. def get_project(self):
  28. ''' 查询项目信息 '''
  29. # https://{your-team}.coding.net/api/user/{user}/project/{project}
  30. url=self.host + "/open-api?Action=DescribeOneProject"
  31. payload = {
  32. }
  33. def get_project_uesr(self):
  34. ''' 查询项目成员 '''
  35. # https://{your-team}.coding.net/api/user/{user}/project/{project}/members
  36. pass