Skip to content

Commit 51475a5

Browse files
committed
0.4.4
1 parent 9a76faf commit 51475a5

File tree

5 files changed

+147
-99
lines changed

5 files changed

+147
-99
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ wget https://bootstrap.pypa.io/ez_setup.py -O - | python
1919

2020
## Install
2121
```sh
22-
23-
2422
cd python2-sdk
2523
python setup.py build
2624
python setup.py install --record log
@@ -51,7 +49,7 @@ def main():
5149

5250
third_uid = "test-py-tob"
5351
a_id = "test"
54-
r = live.GetTokenByThirdUID(third_uid, a_id, user_name='test-py',
52+
r = live.GetTokenByThirdUID(third_uid, a_id, user_name='test-py', sex=linkv_sdk.SexTypeUnknown,
5553
portrait_uri='http://meet.linkv.sg/app/rank-list/static/img/defaultavatar.cd935fdb.png')
5654

5755
if not r['status']:
@@ -66,10 +64,10 @@ def main():
6664
return
6765
golds0 = r1['golds']
6866
print('golds0:%d' % golds0)
69-
unique_id = '123123123'
67+
order_id = ''
7068
gold = 10
71-
r2 = live.SuccessOrderByLiveOpenID(live_open_id, unique_id, linkv_sdk.OrderAdd, gold, 10, 1,
72-
linkv_sdk.PlatformH5, '')
69+
r2 = live.SuccessOrderByLiveOpenID(live_open_id, linkv_sdk.OrderTypeAdd, gold, 10, 1,
70+
linkv_sdk.PlatformTypeH5, order_id)
7371
if not r2['status']:
7472
print('live.SuccessOrderByLiveOpenID(%s)' % r2['error'])
7573
return
@@ -80,8 +78,7 @@ def main():
8078
print('(golds0+gold) != golds1')
8179
return
8280

83-
unique_id1 = '456456456'
84-
ok = live.ChangeGoldByLiveOpenID(live_open_id, unique_id1, linkv_sdk.OrderDel, gold, 1, 'test del')
81+
ok = live.ChangeGoldByLiveOpenID(live_open_id, linkv_sdk.OrderTypeDel, gold, 1, 'test del')
8582
if not ok:
8683
print('!ok')
8784
return
@@ -101,7 +98,6 @@ def main():
10198

10299
if __name__ == "__main__":
103100
main()
104-
105101
```
106102

107103
## License

example/example.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def main():
1414

1515
third_uid = "test-py-tob"
1616
a_id = "test"
17-
r = live.GetTokenByThirdUID(third_uid, a_id, user_name='test-py',
17+
r = live.GetTokenByThirdUID(third_uid, a_id, user_name='test-py', sex=linkv_sdk.SexTypeUnknown,
1818
portrait_uri='http://meet.linkv.sg/app/rank-list/static/img/defaultavatar.cd935fdb.png')
1919

2020
if not r['status']:
@@ -29,10 +29,10 @@ def main():
2929
return
3030
golds0 = r1['golds']
3131
print('golds0:%d' % golds0)
32-
unique_id = '123123123'
32+
order_id = ''
3333
gold = 10
34-
r2 = live.SuccessOrderByLiveOpenID(live_open_id, unique_id, linkv_sdk.OrderAdd, gold, 10, 1,
35-
linkv_sdk.PlatformH5, '')
34+
r2 = live.SuccessOrderByLiveOpenID(live_open_id, linkv_sdk.OrderTypeAdd, gold, 10, 1,
35+
linkv_sdk.PlatformTypeH5, order_id)
3636
if not r2['status']:
3737
print('live.SuccessOrderByLiveOpenID(%s)' % r2['error'])
3838
return
@@ -43,8 +43,7 @@ def main():
4343
print('(golds0+gold) != golds1')
4444
return
4545

46-
unique_id1 = '456456456'
47-
ok = live.ChangeGoldByLiveOpenID(live_open_id, unique_id1, linkv_sdk.OrderDel, gold, 1, 'test del')
46+
ok = live.ChangeGoldByLiveOpenID(live_open_id, linkv_sdk.OrderTypeDel, gold, 1, 'test del')
4847
if not ok:
4948
print('!ok')
5049
return

linkv_sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
LINKV SDK for the Python programming language.
44
"""
55

6-
__version__ = '0.4.3'
6+
__version__ = '0.4.4'
77
__licence__ = 'Apache-2.0 License'
88
__doc__ = 'LINKV SDK for the Python programming language.'
99
__all__ = ['linkv_sdk']

linkv_sdk/linkv_sdk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
from .config.config import init
44
from .im.im import LvIM
55
from .rtc.rtc import LvRTC
6-
from .live.live import LvLIVE, OrderAdd, OrderDel, PlatformH5, PlatformANDROID, PlatformIOS
7-
6+
from .live.live import LvLIVE, OrderTypeAdd, OrderTypeDel, PlatformTypeH5, PlatformTypeANDROID, PlatformTypeIOS, \
7+
SexTypeFemale, SexTypeMale, SexTypeUnknown

0 commit comments

Comments
 (0)