4 Star 20 Fork 12

还是相信爱过 / gitee-python-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
OrganizationsApi.md 22.18 KB
一键复制 编辑 原始数据 按行查看 历史
还是相信爱过 提交于 2017-11-14 22:10 . init

gitee_client.OrganizationsApi

All URIs are relative to https://gitee.com/api

Method HTTP request Description
delete_v5_orgs_org_memberships_username DELETE /v5/orgs/{org}/memberships/{username} 移除授权用户所管理组织中的成员
delete_v5_user_memberships_orgs_org DELETE /v5/user/memberships/orgs/{org} 退出一个组织
get_v5_orgs_org GET /v5/orgs/{org} 获取一个组织
get_v5_orgs_org_members GET /v5/orgs/{org}/members 列出一个组织的所有成员
get_v5_orgs_org_memberships_username GET /v5/orgs/{org}/memberships/{username} 获取授权用户所属组织的一个成员
get_v5_user_memberships_orgs GET /v5/user/memberships/orgs 列出授权用户在所属组织的成员资料
get_v5_user_memberships_orgs_org GET /v5/user/memberships/orgs/{org} 获取授权用户在一个组织的成员资料
get_v5_user_orgs GET /v5/user/orgs 列出授权用户所属的组织
get_v5_users_username_orgs GET /v5/users/{username}/orgs 列出用户所属的组织
patch_v5_orgs_org PATCH /v5/orgs/{org} 更新授权用户所管理的组织资料
patch_v5_user_memberships_orgs_org PATCH /v5/user/memberships/orgs/{org} 更新授权用户在一个组织的成员资料
put_v5_orgs_org_memberships_username PUT /v5/orgs/{org}/memberships/{username} 增加或更新授权用户所管理组织的成员

delete_v5_orgs_org_memberships_username

delete_v5_orgs_org_memberships_username(org, username, access_token=access_token)

移除授权用户所管理组织中的成员

移除授权用户所管理组织中的成员

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
username = 'username_example' # str | 用户名(username/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)

try: 
    # 移除授权用户所管理组织中的成员
    api_instance.delete_v5_orgs_org_memberships_username(org, username, access_token=access_token)
except ApiException as e:
    print("Exception when calling OrganizationsApi->delete_v5_orgs_org_memberships_username: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
username str 用户名(username/login)
access_token str 用户授权码 [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_v5_user_memberships_orgs_org

delete_v5_user_memberships_orgs_org(org, access_token=access_token)

退出一个组织

退出一个组织

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)

try: 
    # 退出一个组织
    api_instance.delete_v5_user_memberships_orgs_org(org, access_token=access_token)
except ApiException as e:
    print("Exception when calling OrganizationsApi->delete_v5_user_memberships_orgs_org: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_orgs_org

Group get_v5_orgs_org(org, access_token=access_token)

获取一个组织

获取一个组织

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)

try: 
    # 获取一个组织
    api_response = api_instance.get_v5_orgs_org(org, access_token=access_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_orgs_org: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]

Return type

Group

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_orgs_org_members

list[UserBasic] get_v5_orgs_org_members(org, access_token=access_token, page=page, per_page=per_page, role=role)

列出一个组织的所有成员

列出一个组织的所有成员

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)
page = 1 # int | 当前的页码 (optional) (default to 1)
per_page = 20 # int | 每页的数量 (optional) (default to 20)
role = 'all' # str | 根据角色筛选成员 (optional) (default to all)

try: 
    # 列出一个组织的所有成员
    api_response = api_instance.get_v5_orgs_org_members(org, access_token=access_token, page=page, per_page=per_page, role=role)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_orgs_org_members: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]
page int 当前的页码 [optional] [default to 1]
per_page int 每页的数量 [optional] [default to 20]
role str 根据角色筛选成员 [optional] [default to all]

Return type

list[UserBasic]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_orgs_org_memberships_username

GroupMember get_v5_orgs_org_memberships_username(org, username, access_token=access_token)

获取授权用户所属组织的一个成员

获取授权用户所属组织的一个成员

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
username = 'username_example' # str | 用户名(username/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)

try: 
    # 获取授权用户所属组织的一个成员
    api_response = api_instance.get_v5_orgs_org_memberships_username(org, username, access_token=access_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_orgs_org_memberships_username: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
username str 用户名(username/login)
access_token str 用户授权码 [optional]

Return type

GroupMember

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_user_memberships_orgs

list[GroupMember] get_v5_user_memberships_orgs(access_token=access_token, active=active, page=page, per_page=per_page)

列出授权用户在所属组织的成员资料

列出授权用户在所属组织的成员资料

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
access_token = 'access_token_example' # str | 用户授权码 (optional)
active = true # bool | 根据成员是否已激活进行筛选资料,缺省返回所有资料 (optional)
page = 1 # int | 当前的页码 (optional) (default to 1)
per_page = 20 # int | 每页的数量 (optional) (default to 20)

try: 
    # 列出授权用户在所属组织的成员资料
    api_response = api_instance.get_v5_user_memberships_orgs(access_token=access_token, active=active, page=page, per_page=per_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_user_memberships_orgs: %s\n" % e)

Parameters

Name Type Description Notes
access_token str 用户授权码 [optional]
active bool 根据成员是否已激活进行筛选资料,缺省返回所有资料 [optional]
page int 当前的页码 [optional] [default to 1]
per_page int 每页的数量 [optional] [default to 20]

Return type

list[GroupMember]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_user_memberships_orgs_org

GroupMember get_v5_user_memberships_orgs_org(org, access_token=access_token)

获取授权用户在一个组织的成员资料

获取授权用户在一个组织的成员资料

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)

try: 
    # 获取授权用户在一个组织的成员资料
    api_response = api_instance.get_v5_user_memberships_orgs_org(org, access_token=access_token)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_user_memberships_orgs_org: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]

Return type

GroupMember

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_user_orgs

list[Group] get_v5_user_orgs(access_token=access_token, page=page, per_page=per_page, admin=admin)

列出授权用户所属的组织

列出授权用户所属的组织

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
access_token = 'access_token_example' # str | 用户授权码 (optional)
page = 1 # int | 当前的页码 (optional) (default to 1)
per_page = 20 # int | 每页的数量 (optional) (default to 20)
admin = true # bool | 只列出授权用户管理的组织 (optional)

try: 
    # 列出授权用户所属的组织
    api_response = api_instance.get_v5_user_orgs(access_token=access_token, page=page, per_page=per_page, admin=admin)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_user_orgs: %s\n" % e)

Parameters

Name Type Description Notes
access_token str 用户授权码 [optional]
page int 当前的页码 [optional] [default to 1]
per_page int 每页的数量 [optional] [default to 20]
admin bool 只列出授权用户管理的组织 [optional]

Return type

list[Group]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_v5_users_username_orgs

list[Group] get_v5_users_username_orgs(username, access_token=access_token, page=page, per_page=per_page)

列出用户所属的组织

列出用户所属的组织

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
username = 'username_example' # str | 用户名(username/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)
page = 1 # int | 当前的页码 (optional) (default to 1)
per_page = 20 # int | 每页的数量 (optional) (default to 20)

try: 
    # 列出用户所属的组织
    api_response = api_instance.get_v5_users_username_orgs(username, access_token=access_token, page=page, per_page=per_page)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->get_v5_users_username_orgs: %s\n" % e)

Parameters

Name Type Description Notes
username str 用户名(username/login)
access_token str 用户授权码 [optional]
page int 当前的页码 [optional] [default to 1]
per_page int 每页的数量 [optional] [default to 20]

Return type

list[Group]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patch_v5_orgs_org

GroupDetail patch_v5_orgs_org(org, access_token=access_token, email=email, location=location, name=name, description=description, html_url=html_url)

更新授权用户所管理的组织资料

更新授权用户所管理的组织资料

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)
email = 'email_example' # str | 组织公开的邮箱地址 (optional)
location = 'location_example' # str | 组织所在地 (optional)
name = 'name_example' # str | 组织名称 (optional)
description = 'description_example' # str | 组织简介 (optional)
html_url = 'html_url_example' # str | 组织站点 (optional)

try: 
    # 更新授权用户所管理的组织资料
    api_response = api_instance.patch_v5_orgs_org(org, access_token=access_token, email=email, location=location, name=name, description=description, html_url=html_url)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->patch_v5_orgs_org: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]
email str 组织公开的邮箱地址 [optional]
location str 组织所在地 [optional]
name str 组织名称 [optional]
description str 组织简介 [optional]
html_url str 组织站点 [optional]

Return type

GroupDetail

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patch_v5_user_memberships_orgs_org

GroupMember patch_v5_user_memberships_orgs_org(org, access_token=access_token, remark=remark)

更新授权用户在一个组织的成员资料

更新授权用户在一个组织的成员资料

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)
remark = 'remark_example' # str | 在组织中的备注信息 (optional)

try: 
    # 更新授权用户在一个组织的成员资料
    api_response = api_instance.patch_v5_user_memberships_orgs_org(org, access_token=access_token, remark=remark)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->patch_v5_user_memberships_orgs_org: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
access_token str 用户授权码 [optional]
remark str 在组织中的备注信息 [optional]

Return type

GroupMember

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

put_v5_orgs_org_memberships_username

GroupMember put_v5_orgs_org_memberships_username(org, username, access_token=access_token, role=role)

增加或更新授权用户所管理组织的成员

增加或更新授权用户所管理组织的成员

Example

from __future__ import print_function
import time
import gitee_client
from gitee_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = gitee_client.OrganizationsApi()
org = 'org_example' # str | 组织的路径(path/login)
username = 'username_example' # str | 用户名(username/login)
access_token = 'access_token_example' # str | 用户授权码 (optional)
role = 'member' # str | 设置用户在组织的角色 (optional) (default to member)

try: 
    # 增加或更新授权用户所管理组织的成员
    api_response = api_instance.put_v5_orgs_org_memberships_username(org, username, access_token=access_token, role=role)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrganizationsApi->put_v5_orgs_org_memberships_username: %s\n" % e)

Parameters

Name Type Description Notes
org str 组织的路径(path/login)
username str 用户名(username/login)
access_token str 用户授权码 [optional]
role str 设置用户在组织的角色 [optional] [default to member]

Return type

GroupMember

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Python
1
https://gitee.com/wuyu15255872976/gitee-python-client.git
git@gitee.com:wuyu15255872976/gitee-python-client.git
wuyu15255872976
gitee-python-client
gitee-python-client
master

搜索帮助