Skip to content
Snippets Groups Projects
README.md 1016 B
Newer Older
python3 implementation of a pod client
the pod client version follow the pod server version for compatibility
pod is a video cms for educational https://github.com/EsupPortail/Esup-Pod

all rest resources will be create on PodClient object and usable like that (HOST and API_KEY are vars that contains the base pod url and an authentication token):

```
pod_client = PodClient(HOST, API_KEY)
# fetch all videos
pod_client.videos.get()
# fetch video id 1
pod_client.videos.get(resource_id=1)
```
Example to send a video (VIDEO_PATH is the path of the video to upload):
```
pod_client = PodClient(HOST, API_KEY)
data = {
    'title': 'unittest video',
    'type': pod_client.types.url(1),
    'owner': pod_client.users.url(1)
}
files = {'video': open(VIDEO_PATH, 'rb')}
response = pod_client.videos.post(data=data, files=files)
# build
`make build`

# lint
`make lint`

# deadcode
`make deadcode`

# test
`make test`

# Project dependencies

`python3 python3-pip python3-requests make`