Skip to content

Commit 54a9f3b

Browse files
author
OneSignal
committed
Update Python API
1 parent 64345f0 commit 54a9f3b

File tree

186 files changed

+29394
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+29394
-1
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 🙋‍♂️ Ask a question
2+
description: Tell us what's on your mind
3+
title: "[question]: "
4+
labels: ["triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Having issues integrating this API library?
10+
- type: textarea
11+
id: question
12+
attributes:
13+
label: How can we help?
14+
description: Specific question regarding integrating this API library.
15+
placeholder: How do I...?
16+
validations:
17+
required: true
18+
- type: checkboxes
19+
id: terms
20+
attributes:
21+
label: Code of Conduct
22+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23+
options:
24+
- label: I agree to follow this project's Code of Conduct
25+
required: true

.github/ISSUE_TEMPLATE/bug-report.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 🪳 Bug report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: Provide a thorough description of whats going on.
15+
placeholder: The latest version of the API library throws an exception when creating a notification targetting all Active Users.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: reproduction-steps
20+
attributes:
21+
label: Steps to reproduce?
22+
description: Provide as much detail as posible to reproduce the issue.
23+
placeholder: |
24+
1. Install vX.Y.Z of dependency
25+
2. Run provided code snippet
26+
3. Note that the app crashes
27+
render: Markdown
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: what-are-expectations
32+
attributes:
33+
label: What did you expect to happen?
34+
description: Also tell us, what did you expect to happen?
35+
placeholder: I expected the API library to properly deserialize any response returned by OneSignal.
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: logs
40+
attributes:
41+
label: Relevant log output
42+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
43+
render: Shell
44+
- type: checkboxes
45+
id: terms
46+
attributes:
47+
label: Code of Conduct
48+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
49+
options:
50+
- label: I agree to follow this project's Code of Conduct
51+
required: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 📣 General feedback
2+
description: Tell us what's on your mind
3+
title: "[Bug]: "
4+
labels: ["triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for sharing your valuable feedback!
10+
- type: textarea
11+
id: feedback
12+
attributes:
13+
label: What's on your mind?
14+
description: Feedback regarding this API library.
15+
placeholder: Share your feedback...
16+
validations:
17+
required: true
18+
- type: checkboxes
19+
id: terms
20+
attributes:
21+
label: Code of Conduct
22+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
23+
options:
24+
- label: I agree to follow this project's Code of Conduct
25+
required: true

.github/pull_request_template.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!-- START -->
2+
# READ AND DELETE THIS SECTION BEFORE SUBMITTING PR
3+
* **Fill out each _REQUIRED_ section**
4+
* **Fill out _OPTIONAL_ sections, remove section if it doesn't apply to your PR**
5+
* **Read and fill out each of the checklists below**
6+
* **Remove this section after reading**
7+
<!-- END -->
8+
9+
# Description
10+
## One Line Summary
11+
**REQUIRED** - Very short description that summaries the changes in this PR.
12+
13+
## Details
14+
15+
### Motivation
16+
**REQUIRED -** Why is this code change being made? Or what is the goal of this PR? Examples: Fixes a specific bug, provides additional logging to debug future issues, feature to allow X.
17+
18+
### Scope
19+
**RECOMMEND - OPTIONAL -** What is intended to be effected. What is known not to change. Example: Notifications are grouped when parameter X is set, not enabled by default.
20+
21+
### OPTIONAL - Other
22+
**OPTIONAL -** Feel free to add any other sections or sub-sections that can explain your PR better.
23+
24+
# Testing
25+
26+
## Manual testing
27+
**REQUIRED -** Explain what scenarios were tested and the environment.
28+
29+
30+
# Checklist
31+
## Overview
32+
- [ ] I have filled out all **REQUIRED** sections above
33+
- [ ] PR does one thing
34+
- If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
35+
- [ ] Any Public API changes are explained in the PR details and conform to existing APIs
36+
37+
## Testing
38+
- [ ] I have personally tested this on my device, or explained why that is not possible
39+
40+
## Final pass
41+
- [ ] Code is as readable as possible.
42+
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
43+
- [ ] I have reviewed this PR myself, ensuring it meets each checklist item
44+
- WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

.gitignore

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.venv/
49+
.python-version
50+
.pytest_cache
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
59+
# Sphinx documentation
60+
docs/_build/
61+
62+
# PyBuilder
63+
target/
64+
65+
#Ipython Notebook
66+
.ipynb_checkpoints

.gitlab-ci.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ref: https://docs.gitlab.com/ee/ci/README.html
2+
3+
stages:
4+
- test
5+
6+
.tests:
7+
stage: test
8+
script:
9+
- pip install -r requirements.txt
10+
- pip install -r test-requirements.txt
11+
- pytest --cov=onesignal
12+
13+
test-3.6:
14+
extends: .tests
15+
image: python:3.6-alpine
16+
test-3.7:
17+
extends: .tests
18+
image: python:3.7-alpine
19+
test-3.8:
20+
extends: .tests
21+
image: python:3.8-alpine
22+
test-3.9:
23+
extends: .tests
24+
image: python:3.9-alpine

LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Modified MIT License
2+
3+
Copyright 2022 OneSignal
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
1. The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
2. All copies of substantial portions of the Software may only be used in connection
16+
with services provided by OneSignal.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
THE SOFTWARE.

0 commit comments

Comments
 (0)