Skip to content

Commit

Permalink
Stream uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Nov 9, 2021
1 parent 22d8c6e commit 5900c77
Show file tree
Hide file tree
Showing 41 changed files with 413 additions and 834 deletions.
2 changes: 1 addition & 1 deletion CoC.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ For answers to common questions about this code of conduct, see the FAQ at
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
[translations]: https://www.contributor-covenant.org/translations
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ Method | HTTP request | Description
### Models

- [AccessToken](docs/Model/AccessToken.md)
- [Account](docs/Model/Account.md)
- [AccountQuota](docs/Model/AccountQuota.md)
- [AuthenticatePayload](docs/Model/AuthenticatePayload.md)
- [BadRequest](docs/Model/BadRequest.md)
- [BytesRange](docs/Model/BytesRange.md)
Expand Down Expand Up @@ -366,4 +364,4 @@ $ BASE_URI="" API_KEY="..." vendor/bin/phpunit

Please take a moment to leave a star on the client ⭐

This helps other users to find the clients and also helps us understand which clients are most popular. Thank you!
This helps other users to find the clients and also helps us understand which clients are most popular. Thank you!
36 changes: 36 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "api-video/php-api-client",
"description": "PHP client for api.video web services.",
"keywords": ["api.video"],
"homepage": "https://api.video/",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "ApiVideo",
"homepage": "https://api.video/"
}
],
"require": {
"php": "^7.3 || ^8.0",
"ext-json": "*",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"php-http/multipart-stream-builder": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^9",
"symfony/http-client": "^5.2",
"nyholm/psr7": "^1.4"
},
"autoload": {
"psr-4": {
"ApiVideo\\Client\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ApiVideo\\Client\\Tests\\": "tests/"
}
}
}
40 changes: 0 additions & 40 deletions docs/Api/CaptionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ Method | HTTP request | Description

Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.

```php
delete(string $videoId, string $language): void
```

### Arguments

Expand All @@ -36,22 +33,14 @@ Name | Type | Description | Example | Notes

void (empty response body)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## list()


Retrieve a list of available captions for the videoId you provide.

```php
list(string $videoId, array $queryParams = []): \ApiVideo\Client\Model\CaptionsListResponse
```

### Arguments

Expand All @@ -77,22 +66,14 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\CaptionsListResponse**](../Model/CaptionsListResponse.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## get()


Display a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a response indicating the caption was not found. Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions).

```php
get(string $videoId, string $language): \ApiVideo\Client\Model\Caption
```

### Arguments

Expand All @@ -110,22 +91,14 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\Caption**](../Model/Caption.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## update()


To have the captions on automatically, use this PATCH to set default: true.

```php
update(string $videoId, string $language, \ApiVideo\Client\Model\CaptionsUpdatePayload $captionsUpdatePayload): \ApiVideo\Client\Model\Caption
```

### Arguments

Expand All @@ -144,22 +117,14 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\Caption**](../Model/Caption.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## upload()


Upload a VTT file to add captions to your video. Read our [captioning tutorial](https://api.video/blog/tutorials/adding-captions) for more details.

```php
upload(string $videoId, string $language, \SplFileObject $file): \ApiVideo\Client\Model\Caption
```

### Arguments

Expand All @@ -178,10 +143,5 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\Caption**](../Model/Caption.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
32 changes: 0 additions & 32 deletions docs/Api/ChaptersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ Method | HTTP request | Description



```php
delete(string $videoId, string $language): void
```

### Arguments

Expand All @@ -34,22 +31,14 @@ Name | Type | Description | Example | Notes

void (empty response body)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## list()


Retrieve a list of all chapters for a specified video.

```php
list(string $videoId, array $queryParams = []): \ApiVideo\Client\Model\ChaptersListResponse
```

### Arguments

Expand All @@ -75,22 +64,14 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\ChaptersListResponse**](../Model/ChaptersListResponse.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## get()


Chapters help your viewers find the sections of the video they are most interested in viewing. Tutorials that use the [chapters endpoint](https://api.video/blog/endpoints/chapters).

```php
get(string $videoId, string $language): \ApiVideo\Client\Model\Chapter
```

### Arguments

Expand All @@ -108,22 +89,14 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\Chapter**](../Model/Chapter.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## upload()


Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos) for more details.

```php
upload(string $videoId, string $language, \SplFileObject $file): \ApiVideo\Client\Model\Chapter
```

### Arguments

Expand All @@ -142,10 +115,5 @@ Name | Type | Description | Example | Notes

[**\ApiVideo\Client\Model\Chapter**](../Model/Chapter.md)

### Authorization

[bearerAuth](../../README.md)

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
Loading

0 comments on commit 5900c77

Please sign in to comment.