lazyad 0.0.11__tar.gz → 0.0.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lazyad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.11
3
+ Version: 0.0.13
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -84,7 +84,6 @@ def oauth_token3(
84
84
  :param redirect_uri: 回调地址
85
85
  :return:
86
86
  """
87
- url = 'https://api.e.qq.com/v3.0/oauth/token'
88
87
  params = {
89
88
  'client_id': app_id,
90
89
  'client_secret': app_secret,
@@ -95,6 +94,9 @@ def oauth_token3(
95
94
  params['access_token'] = access_token
96
95
  params['timestamp'] = int(time.time())
97
96
  params['nonce'] = make_nonce()
97
+ url = 'https://api.e.qq.com/v3.0/oauth/token'
98
+ else:
99
+ url = 'https://api.e.qq.com/oauth/token'
98
100
  if auth_code:
99
101
  params['authorization_code'] = auth_code
100
102
  if refresh_token:
@@ -108,3 +110,38 @@ def oauth_token3(
108
110
  url=url,
109
111
  params=params
110
112
  )
113
+
114
+
115
+ def get_organization_account_relation(
116
+ access_token: str,
117
+ account_id=None,
118
+ page: int = 1,
119
+ page_size: int = 100
120
+ ):
121
+ """
122
+ 版本:3.0
123
+ 获取子账号列表
124
+ 这里获取子账户主要使用这个方法
125
+ https://developers.e.qq.com/v3.0/docs/api/organization_account_relation/get
126
+ :param access_token:
127
+ :param account_id:
128
+ :param page:
129
+ :param page_size: 最小值 1,最大值 100
130
+ :return:
131
+ """
132
+ url = 'https://api.e.qq.com/v3.0/organization_account_relation/get'
133
+ params = {
134
+ 'access_token': access_token,
135
+ 'timestamp': int(time.time()),
136
+ 'nonce': make_nonce(),
137
+ "page": page,
138
+ "page_size": page_size,
139
+ "pagination_mode": "PAGINATION_MODE_NORMAL"
140
+ }
141
+ if account_id:
142
+ params["account_id"] = account_id
143
+ return lazyrequests.lazy_requests(
144
+ method="GET",
145
+ url=url,
146
+ params=params
147
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.11
3
+ Version: 0.0.13
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
13
13
 
14
14
  setuptools.setup(
15
15
  name="lazyad",
16
- version="0.0.11",
16
+ version="0.0.13",
17
17
  description="基于Python的懒人包-适用于广告投放模块",
18
18
  long_description=long_description,
19
19
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes