Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cdfbc6dc5 | |||
|
|
90378bb2e5 | ||
|
|
f34f1ae793 | ||
| e53af9bb26 | |||
|
|
f5abc6f0f4 | ||
|
|
14b48e7f41 |
@@ -10,7 +10,7 @@ jobs:
|
||||
uses: actions/checkout@main
|
||||
- name: Building the package
|
||||
run: |
|
||||
mv ${{ gitea.workspace }}\AirwatchAPI.py ${{ gitea.workspace }}\build\src\AirwatchAPI\
|
||||
powershell mv ${{ gitea.workspace }}\AirwatchAPI.py build\src\AirwatchAPI\
|
||||
cd ${{ gitea.workspace }}\build
|
||||
python -m build
|
||||
- name: Publish package
|
||||
|
||||
@@ -7,7 +7,6 @@ variables:
|
||||
build: # This job runs in the build stage, which runs first.
|
||||
script:
|
||||
- pip install build twine
|
||||
- mkdir build/src/AirwatchAPI/
|
||||
- mv AirwatchAPI.py build/src/AirwatchAPI/
|
||||
- cd build/
|
||||
- python -m build
|
||||
|
||||
@@ -73,6 +73,18 @@ class AirwatchAPI:
|
||||
return devices
|
||||
return None
|
||||
|
||||
def GetTagDevices(self, tagID):
|
||||
cmdURI = f"/api/mdm/tags/{tagID}/devices"
|
||||
airwatchHeaders = self.GetHeaders(cmdURI)
|
||||
uri = f"{self.Server}{cmdURI}"
|
||||
result = requests.get(uri, headers=airwatchHeaders)
|
||||
devices = []
|
||||
if(result.status_code == 200):
|
||||
for dev in result.json()["Device"]:
|
||||
devices += [dev["DeviceId"]]
|
||||
return devices
|
||||
return []
|
||||
|
||||
def GetDeviceApps(self, device):
|
||||
cmdURI = f"/api/mdm/devices/{device.Uuid}/apps/search"
|
||||
airwatchHeaders = self.GetHeaders(cmdURI)
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools >= 77.0.3",
|
||||
"requests >= 2.32.5"
|
||||
"requests >= 2.32.5",
|
||||
"cryptography"
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "AirwatchAPI"
|
||||
version = "1.0.1"
|
||||
version = "1.0.3"
|
||||
description = "A module python to make it easier to use Workspace One API"
|
||||
readme = "README.md"
|
||||
dependencies = [
|
||||
"requests >= 2.32.5",
|
||||
"cryptography"
|
||||
]
|
||||
requires-python = ">=3.7"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3"
|
||||
|
||||
1
build/src/AirwatchAPI/__init__.py
Normal file
1
build/src/AirwatchAPI/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__all__ = ["AirwatchAPI"]
|
||||
@@ -1 +0,0 @@
|
||||
__all__ = ["AirwatchAPI"]
|
||||
Reference in New Issue
Block a user