Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkio-test-case
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuxiaoxing
tkio-test-case
Commits
b0818bf0
Commit
b0818bf0
authored
May 26, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
receive 对接se
parent
e2b61a62
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
4 deletions
+82
-4
receiveandroid.py
microservices/receiveandroid.py
+0
-0
receiveios.py
microservices/receiveios.py
+82
-4
No files found.
microservices/receiveandroid.py
View file @
b0818bf0
This diff is collapsed.
Click to expand it.
microservices/receiveios.py
View file @
b0818bf0
...
...
@@ -17,12 +17,13 @@ data = [
"application_info"
:
{
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-55705dbd45dd246751b87bba94b8c73c
"appkey"
:
"
55705dbd45dd246751b87bba94b8c73c
"
,
"appkey"
:
"
904305d99f74ce0349b11238f3eeff69
"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"default"
},
"timestamp_info"
:
{
"country"
:
"chi"
,
"time_zone"
:
"GMT+08"
,
"install_time"
:
int
(
round
(
time
.
time
()
*
1000
)),
"current_event_time"
:
int
(
round
(
time
.
time
()
*
1000
)),
...
...
@@ -39,7 +40,7 @@ data = [
"device_id_type"
:
"idfa_md5"
,
"device_id_md5"
:
"c3381276ae145b3663c8e0f6dd9f628a"
,
"device_id_md5_type"
:
"idfa_md5"
,
"os"
:
"
ios
"
,
"os"
:
"
2
"
,
"os_version"
:
"19"
,
"manufacturer"
:
"HUAWEI"
,
"model"
:
"Mate 40"
,
...
...
@@ -79,6 +80,65 @@ data = [
# "refund": "234234",
# "refund_amount": "234234"
}
},
"asa_info"
:
{
"iad_info"
:
{
# //iad归因结果。选传,限制16字符内。
"iad-attribution"
:
"true"
,
# //iad 活动组名称。选传,限制128字符内。
"iad-org-name"
:
"org name"
,
# //iad 活动组id,选传。限制32字符内。
"iad-org-id"
:
"40669820"
,
# //iad 活动id,选传。限制32字符内。
"iad-campaign-id"
:
"542370539"
,
# // iad 活动名称。选传,限制128字符内。
"iad-campaign-name"
:
"campaign name"
,
# //iad 该Apple账号首次购买(下载)该App的时间。选传,限制32字符内。
"iad-purchase-date"
:
"2020-08-04T17:18:07Z"
,
# //iad 该Apple账号本次转化(下载)该App的时间。选传,限制32字符内。
"iad-conversion-date"
:
"2020-08-04T17:18:07Z"
,
# //iad 转化配型。选传,限制32字符内。
"iad-conversion-type"
:
"newdownload"
,
# //iad 本次转化匹配到广告点击的时间。选传,限制32字符内。
"iad-click-date"
:
"2020-08-04T17:17:00Z"
,
# // iad 广告组id。选传,限制32字符内。
"iad-adgroup-id"
:
"542317095"
,
# //iad 广告组名称。选传,限制128字符内。
"iad-adgroup-name"
:
"adgroup name"
,
# //iad Apple账号的国家或地区。选传,限制16字符内。
"iad-country-or-region"
:
"US"
,
# //iad 关键词名称。选传,限制128字符内。
"iad-keyword"
:
"keyword"
,
# //iad 关键词id。选传,限制32字符内。
"iad-keyword-id"
:
"87675432"
,
# //iad 关键词匹配类型。选传,限制32字符内。
"iad-keyword-matchtype"
:
"Broad"
,
# //iad 广告素材id。选传,限制32字符内。
"iad-ad-id"
:
"542317136"
,
# //iad lineitem id。选传,限制32字符内。
"iad-lineitem-id"
:
"587848614"
,
# //iad lineitem名称。选传,限制128字符内。
"iad-lineitem-name"
:
"Brand-Exact_All-All_Test02"
,
# //通过iad框架获取归因信息时的重试次数。选传,限制2字符内。
"iad_retry_times"
:
3
,
# //任何能够描述未能获取到归因结果的错误提示。选传,无字符限制。
"iad_error_info"
:
"xxx"
},
"adservices_info"
:
{
"token"
:
"sbBoZZnCpY3Ps32Xv8K5PhyZtPKxB8i/rmjJfWATPQAuqawcQLalTgJ4Zaa4LzZohZK/bWxWg3TmynLv3XKAO+oTbn7FGmSdYAAAAVADAAAA/QAAAIAjeU4Eb6GRAsnafeLL8Ucpfzz5ErqPpxV4n5SoZ6n3q9U8tYixHXKsOcSFnEjBVYNX60xFABXS62TzYQieVzkjt4vjC6GYedWDX+IuYx7K4p6iUvUg5FAhX6kSeVF627i2Xj6Ie5K7Xi3LSM8uNWvADZQESKvdkWF9CQoNY37dEgAAABJfluG0V1jsF3OcqXJPotzTE1YAAACfAe5iGXrTDo893L1XIXjACtCXvdjaAAAAhgAGP0aWIK/sat96xlkNAzEZ8WJd/AGhKQCKZ7dTc+NvyRyic1WsAryc6dkpfhzKUot2l9wrft8I/+dRLggPPFGTTmgdXzaabldMH4iVdaIRDtVQPsxTQw1naa1ainIrehF/VXVsUgngZ0ONhi01Bqw75hq2yuyWRGb1CXkm0dlCtR8L8DVXAAAAAAAAAAAAAAAAAAABBEYXAAA="
,
"attribution"
:
'true'
,
"orgId"
:
40669820
,
"campaignId"
:
542370539
,
"conversionType"
:
"Download"
,
"clickDate"
:
"2020-04-08T17:17Z"
,
"adGroupId"
:
542317095
,
"countryOrRegion"
:
"US"
,
"keywordId"
:
87675432
,
"adId"
:
542317136
,
"adservices_retry_times"
:
3
,
"adservices_error_info"
:
"xxx"
}
}
}
]
...
...
@@ -87,10 +147,12 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
#
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
# 线上
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
#
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
...
...
@@ -123,6 +185,22 @@ def send_request2():
return
response
# iad_retry_times为num型,应该返回214,但是实时接收时接收到的是string类型,无法判断number
def
test_se1
():
data
[
0
][
"asa_info"
][
"iad_info"
][
'iad_retry_times'
]
=
3
response
=
send_request
()
assert
response
[
"status"
]
==
"0"
# iad_retry_times为num型,同上test_se1
def
test_se2
():
data
[
0
][
"asa_info"
][
"adservices_info"
][
'adservices_retry_times'
]
=
3
response
=
send_request
()
assert
response
[
"status"
]
==
"0"
# os为ios,channel_name不等于default
def
test_os_ios
():
data
[
0
][
"device_info"
][
"os"
]
=
'ios'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment