Skip to content
Snippets Groups Projects
README.md 862 B
Newer Older
# POD client
python3 implementation of a pod client
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
```
pod_client = PodClient(HOST, API_KEY)

response = pod_client.videos.post(data={'title': 'unittest video', 'type': '%s/rest/types/1/' % HOST, 'owner': '%s/rest/users/1/' % HOST}, files={'video': open(VIDEO_PATH, 'rb')})

```

# build
`make build`

# lint
`make lint`

# deadcode
`make deadcode`

# test
`make test`

# Project dependencies

`python3 python3-pip python3-requests make`