Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jpush-api-python-client
Project
Project
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
钟尚武
jpush-api-python-client
Commits
3cc87909
Commit
3cc87909
authored
Jun 03, 2014
by
hupantingxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update setup scripts;
parent
3380379e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
common.py
jpush/common.py
+1
-1
audience.py
jpush/push/audience.py
+7
-2
core.py
jpush/push/core.py
+0
-0
setup.py
setup.py
+10
-5
No files found.
jpush/common.py
View file @
3cc87909
...
...
@@ -2,7 +2,7 @@ import json
import
logging
BASE_URL
=
"https://api.jpush.cn/"
BASE_URL
=
"https://api.jpush.cn
:15088
/"
PUSH_URL
=
BASE_URL
+
'v3/push/'
logger
=
logging
.
getLogger
(
'jpush'
)
...
...
jpush/push/audience.py
View file @
3cc87909
...
...
@@ -22,7 +22,12 @@ def audience(*children):
"""Select audience that match all of the given selectors.
>>> audience(tag('sports'), tag_and('business'))
{'audience': {'tag':
'sports'}, {'tag_and':
'business'}}
{'audience': {'tag':
'sports', 'tag_and':
'business'}}
"""
return
{
"audience"
:
[
child
for
child
in
children
]}
if
len
(
types
)
==
1
and
types
[
0
]
==
'all'
:
return
{
'audience'
:
'all'
}
for
t
in
types
:
if
t
not
in
(
'tag'
,
'tag_and'
,
'alias'
,
'registration_id'
):
raise
ValueError
(
"Invalid platform '
%
s'"
%
t
)
return
[
t
for
t
in
types
]
jpush/push/core.py
View file @
3cc87909
setup.py
View file @
3cc87909
# -*- coding: utf-8 -*-
from
setuptools
import
setup
try
:
from
setuptools
import
setup
except
(
ImportError
):
from
distutils.core
import
setup
from
jpush
import
__version__
setup
(
name
=
'jpush'
,
version
=
__version__
,
...
...
@@ -17,7 +18,7 @@ setup(
author
=
'hupantingxue'
,
author_email
=
'hupantingxue@126.com'
,
packages
=
[
'jpush'
],
packages
=
[
'jpush'
,
'jpush.push'
],
platforms
=
'any'
,
classifiers
=
[
'Environment :: Console'
,
...
...
@@ -26,4 +27,8 @@ setup(
'Operating System :: OS Independent'
,
'Programming Language :: Python'
,
],
install_requires
=
[
'requests>=1.2'
,
],
)
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