summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 07:51:32 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 07:51:32 +0000
commitf6f09f75a6286e321402f6cafc9a00e5a338fd45 (patch)
treee709e737f64ecb5b38861f51f52b896d51671197
parente8ee9e27b5ca2d2447515f0d7010bc594924bbcf (diff)
automatic import of python-discordwebhook
-rw-r--r--.gitignore1
-rw-r--r--python-discordwebhook.spec406
-rw-r--r--sources1
3 files changed, 408 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b1d7002 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/discordwebhook-1.0.3.tar.gz
diff --git a/python-discordwebhook.spec b/python-discordwebhook.spec
new file mode 100644
index 0000000..df88bd9
--- /dev/null
+++ b/python-discordwebhook.spec
@@ -0,0 +1,406 @@
+%global _empty_manifest_terminate_build 0
+Name: python-discordwebhook
+Version: 1.0.3
+Release: 1
+Summary: discordwebhlok is a python library for discord webhook with discord rest api on Python 3.6 and above.
+License: MIT
+URL: https://github.com/10mohi6/discord-webhook-python
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/15/e1/9a4b4ed4aded1c4dc6e708d8d10dd2a72097f8711f027e4cc76364783d83/discordwebhook-1.0.3.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+
+%description
+# discordwebhook
+
+[![PyPI](https://img.shields.io/pypi/v/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![codecov](https://codecov.io/gh/10mohi6/discord-webhook-python/branch/master/graph/badge.svg)](https://codecov.io/gh/10mohi6/discord-webhook-python)
+[![Build Status](https://travis-ci.com/10mohi6/discord-webhook-python.svg?branch=master)](https://travis-ci.com/10mohi6/discord-webhook-python)
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![Downloads](https://pepy.tech/badge/discordwebhook)](https://pepy.tech/project/discordwebhook)
+
+discordwebhook is a python library for discord webhook with discord rest api on Python 3.6 and above.
+
+
+## Installation
+
+ $ pip install discordwebhook
+
+## Usage
+
+### basic
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(content="Hello, world.")
+```
+![basic.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic.png)
+
+### basic, username and avatar_url
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ content="Hello, world.",
+ username="10mohi6",
+ avatar_url="https://avatars2.githubusercontent.com/u/38859131?s=460&amp;v=4"
+)
+```
+![basic-username.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-username.png)
+
+### basic embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[{"title": "Embed Title", "description": "Embed description"}],
+)
+```
+![basic-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-embed.png)
+
+### advanced embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[
+ {
+ "author": {
+ "name": "Embed Name",
+ "url": "https://github.com/10mohi6/discord-webhook-python",
+ "icon_url": "https://picsum.photos/24/24",
+ },
+ "title": "Embed Title",
+ "description": "Embed description",
+ "fields": [
+ {"name": "Field Name 1", "value": "Value 1", "inline": True},
+ {"name": "Field Name 2", "value": "Value 2", "inline": True},
+ {"name": "Field Name 3", "value": "Field Value 3"},
+ ],
+ "thumbnail": {"url": "https://picsum.photos/80/60"},
+ "image": {"url": "https://picsum.photos/400/300"},
+ "footer": {
+ "text": "Embed Footer",
+ "icon_url": "https://picsum.photos/20/20",
+ },
+ }
+ ],
+)
+```
+![advanced-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/advanced-embed.png)
+
+### send file
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ file={
+ "file1": open("tests/file1.jpg", "rb"),
+ "file2": open("tests/file2.jpg", "rb"),
+ },
+)
+```
+![send-file.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/send-file.png)
+
+
+## Getting started
+
+For help getting started with discord webhook, view our online [documentation](https://discordapp.com/developers/docs/resources/webhook).
+
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+
+
+%package -n python3-discordwebhook
+Summary: discordwebhlok is a python library for discord webhook with discord rest api on Python 3.6 and above.
+Provides: python-discordwebhook
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-discordwebhook
+# discordwebhook
+
+[![PyPI](https://img.shields.io/pypi/v/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![codecov](https://codecov.io/gh/10mohi6/discord-webhook-python/branch/master/graph/badge.svg)](https://codecov.io/gh/10mohi6/discord-webhook-python)
+[![Build Status](https://travis-ci.com/10mohi6/discord-webhook-python.svg?branch=master)](https://travis-ci.com/10mohi6/discord-webhook-python)
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![Downloads](https://pepy.tech/badge/discordwebhook)](https://pepy.tech/project/discordwebhook)
+
+discordwebhook is a python library for discord webhook with discord rest api on Python 3.6 and above.
+
+
+## Installation
+
+ $ pip install discordwebhook
+
+## Usage
+
+### basic
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(content="Hello, world.")
+```
+![basic.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic.png)
+
+### basic, username and avatar_url
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ content="Hello, world.",
+ username="10mohi6",
+ avatar_url="https://avatars2.githubusercontent.com/u/38859131?s=460&amp;v=4"
+)
+```
+![basic-username.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-username.png)
+
+### basic embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[{"title": "Embed Title", "description": "Embed description"}],
+)
+```
+![basic-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-embed.png)
+
+### advanced embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[
+ {
+ "author": {
+ "name": "Embed Name",
+ "url": "https://github.com/10mohi6/discord-webhook-python",
+ "icon_url": "https://picsum.photos/24/24",
+ },
+ "title": "Embed Title",
+ "description": "Embed description",
+ "fields": [
+ {"name": "Field Name 1", "value": "Value 1", "inline": True},
+ {"name": "Field Name 2", "value": "Value 2", "inline": True},
+ {"name": "Field Name 3", "value": "Field Value 3"},
+ ],
+ "thumbnail": {"url": "https://picsum.photos/80/60"},
+ "image": {"url": "https://picsum.photos/400/300"},
+ "footer": {
+ "text": "Embed Footer",
+ "icon_url": "https://picsum.photos/20/20",
+ },
+ }
+ ],
+)
+```
+![advanced-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/advanced-embed.png)
+
+### send file
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ file={
+ "file1": open("tests/file1.jpg", "rb"),
+ "file2": open("tests/file2.jpg", "rb"),
+ },
+)
+```
+![send-file.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/send-file.png)
+
+
+## Getting started
+
+For help getting started with discord webhook, view our online [documentation](https://discordapp.com/developers/docs/resources/webhook).
+
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+
+
+%package help
+Summary: Development documents and examples for discordwebhook
+Provides: python3-discordwebhook-doc
+%description help
+# discordwebhook
+
+[![PyPI](https://img.shields.io/pypi/v/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![codecov](https://codecov.io/gh/10mohi6/discord-webhook-python/branch/master/graph/badge.svg)](https://codecov.io/gh/10mohi6/discord-webhook-python)
+[![Build Status](https://travis-ci.com/10mohi6/discord-webhook-python.svg?branch=master)](https://travis-ci.com/10mohi6/discord-webhook-python)
+[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/discordwebhook)](https://pypi.org/project/discordwebhook/)
+[![Downloads](https://pepy.tech/badge/discordwebhook)](https://pepy.tech/project/discordwebhook)
+
+discordwebhook is a python library for discord webhook with discord rest api on Python 3.6 and above.
+
+
+## Installation
+
+ $ pip install discordwebhook
+
+## Usage
+
+### basic
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(content="Hello, world.")
+```
+![basic.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic.png)
+
+### basic, username and avatar_url
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ content="Hello, world.",
+ username="10mohi6",
+ avatar_url="https://avatars2.githubusercontent.com/u/38859131?s=460&amp;v=4"
+)
+```
+![basic-username.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-username.png)
+
+### basic embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[{"title": "Embed Title", "description": "Embed description"}],
+)
+```
+![basic-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/basic-embed.png)
+
+### advanced embed
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ embeds=[
+ {
+ "author": {
+ "name": "Embed Name",
+ "url": "https://github.com/10mohi6/discord-webhook-python",
+ "icon_url": "https://picsum.photos/24/24",
+ },
+ "title": "Embed Title",
+ "description": "Embed description",
+ "fields": [
+ {"name": "Field Name 1", "value": "Value 1", "inline": True},
+ {"name": "Field Name 2", "value": "Value 2", "inline": True},
+ {"name": "Field Name 3", "value": "Field Value 3"},
+ ],
+ "thumbnail": {"url": "https://picsum.photos/80/60"},
+ "image": {"url": "https://picsum.photos/400/300"},
+ "footer": {
+ "text": "Embed Footer",
+ "icon_url": "https://picsum.photos/20/20",
+ },
+ }
+ ],
+)
+```
+![advanced-embed.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/advanced-embed.png)
+
+### send file
+```python
+from discordwebhook import Discord
+
+discord = Discord(url="<your webhook url>")
+discord.post(
+ file={
+ "file1": open("tests/file1.jpg", "rb"),
+ "file2": open("tests/file2.jpg", "rb"),
+ },
+)
+```
+![send-file.png](https://raw.githubusercontent.com/10mohi6/discord-webhook-python/master/tests/send-file.png)
+
+
+## Getting started
+
+For help getting started with discord webhook, view our online [documentation](https://discordapp.com/developers/docs/resources/webhook).
+
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+
+
+%prep
+%autosetup -n discordwebhook-1.0.3
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-discordwebhook -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.3-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..a0bd1fa
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3b0d70210a267c89bee83784d6468e3b discordwebhook-1.0.3.tar.gz