Skip to content

Commit

Permalink
Merge pull request #288 from apivideo/Fix-indirect-URLs
Browse files Browse the repository at this point in the history
Fix indirect URLs
  • Loading branch information
szekelyzol authored Oct 5, 2023
2 parents 6e9a756 + 8173307 commit fac3a9b
Show file tree
Hide file tree
Showing 53 changed files with 160 additions and 166 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png)
<h1 align="center">api.video API client generator</h1>

[api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.


# Table of contents
Expand Down
28 changes: 14 additions & 14 deletions oas_apivideo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ paths:
example: '["captions", "dialogue"]'
- name: metadata
in: query
description: 'Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.'
description: 'Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair.'
required: false
style: deepObject
x-is-deep-object: true
Expand Down Expand Up @@ -469,7 +469,7 @@ paths:
- Videos
summary: Create a video object
description: |
Creates a video object. More information on video objects can be found [here](https://docs.api.video/reference/videos-1).
Creates a video object. More information on video objects can be found [here](https://docs.api.video/reference/api/Videos).
operationId: POST-video
requestBody:
description: video to create
Expand Down Expand Up @@ -3286,7 +3286,7 @@ paths:
tags:
- Upload Tokens
summary: Generate an upload token
description: 'Generates an upload token that can be used to replace the API Key. More information can be found [here](https://docs.api.video/reference/upload-tokens)'
description: 'Generates an upload token that can be used to replace the API Key. More information can be found [here](https://docs.api.video/vod/delegated-upload-tokens)'
operationId: POST_upload-tokens
requestBody:
required: true
Expand Down Expand Up @@ -5895,7 +5895,7 @@ paths:
tags:
- Captions
summary: Upload a caption
description: 'Upload a VTT file to add captions to your video. More information can be found [here](https://docs.api.video/reference/captions)'
description: 'Upload a VTT file to add captions to your video. More information can be found [here](https://docs.api.video/vod/add-captions)'
operationId: POST_videos-videoId-captions-language
parameters:
- name: videoId
Expand Down Expand Up @@ -6996,7 +6996,7 @@ paths:
summary: Upload a chapter
description: |-
Upload a VTT file to add chapters to your video.
Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos) for more details.
Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos/) for more details.
operationId: POST_videos-videoId-chapters-language
parameters:
- name: videoId
Expand Down Expand Up @@ -11236,7 +11236,7 @@ components:
metadata:
type: array
description: |
Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.
Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair.
example: '[{"key":"Author", "value":"John Doe"}, {"key":"Format", "value":"Tutorial"}]'
items:
$ref: '#/components/schemas/metadata'
Expand All @@ -11252,7 +11252,7 @@ components:
public:
type: boolean
description: |
Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos).
Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos/).
example: false
panoramic:
type: boolean
Expand Down Expand Up @@ -11610,7 +11610,7 @@ components:
example: dw-dew8-q6w9-k67w-1ws8
public:
type: boolean
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos).'
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).'
example: true
assets:
$ref: '#/components/schemas/live-stream-assets'
Expand Down Expand Up @@ -11916,7 +11916,7 @@ components:
example: 'https://www.myvideo.url.com/video.mp4 OR vi4k0jvEUuaTdRAEjQ4JfOyl'
public:
type: boolean
description: 'Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/docs/private-videos)'
description: 'Default: True. If set to `false` the video will become private. More information on private videos can be found [here](https://docs.api.video/delivery-analytics/video-privacy-access-management)'
example: true
default: true
panoramic:
Expand All @@ -11941,7 +11941,7 @@ components:
type: string
metadata:
type: array
description: 'A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata).'
description: 'A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata/).'
example: '[{"key": "Author", "value": "John Doe"}]'
items:
$ref: '#/components/schemas/metadata'
Expand Down Expand Up @@ -12009,7 +12009,7 @@ components:
example: A film about good books.
public:
type: boolean
description: 'Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos).'
description: 'Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos/).'
example: true
panoramic:
type: boolean
Expand All @@ -12027,7 +12027,7 @@ components:
type: string
metadata:
type: array
description: 'A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.'
description: 'A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows you to define a key that allows any value pair.'
items:
$ref: '#/components/schemas/metadata'
example:
Expand Down Expand Up @@ -12114,7 +12114,7 @@ components:
example: My Live Stream Video
public:
type: boolean
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos).'
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).'
playerId:
type: string
description: The unique identifier for the player.
Expand Down Expand Up @@ -12145,7 +12145,7 @@ components:
example: My Live Stream Video
public:
type: boolean
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/docs/private-videos).'
description: 'Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Learn more about the Private Video feature [here](https://docs.api.video/delivery-analytics/video-privacy-access-management).'
playerId:
type: string
description: The unique ID for the player associated with a live stream that you want to update.
Expand Down
4 changes: 2 additions & 2 deletions templates/documentation/delivery-analytics/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Api.video offers 2 dedicated API endpoints for analytics:

| Endpoint | Use case |
| :--------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| [`/analytics/videos/plays`](https://docs.api.video/reference/get_analytics-videos-plays) | Get play event count for VOD (Video on demand) |
| [`/analytics/live-streams/plays`](https://docs.api.video/reference/get_analytics-live-streams-plays) | Get play event count for live streams |
| [`/analytics/videos/plays`](https://docs.api.video/reference/api/Analytics#get-play-events-for-video) | Get play event count for VOD (Video on demand) |
| [`/analytics/live-streams/plays`](https://docs.api.video/reference/api/Analytics#get-play-events-for-live-stream) | Get play event count for live streams |

{% capture content %}
**Testing**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Knowing that now we can finally start building stuff!

It’s that simple! (if you want the advanced stuff, scroll down to “Time to roll up our sleeves!”)

Let’s try to deliver one video in HTML with our own (amazing!) [api.video](http://api.video) player.
Let’s try to deliver one video in HTML with our own (amazing!) [api.video](https://api.video/) player.

Suppose you already have a cool video uploaded. Go to the dashboard and get make the video private (if it’s not already private)

Expand Down Expand Up @@ -117,7 +117,7 @@ curl --request GET \

## Assets? What assets?

Notice that JSON above has a field called `assets`. We’ll refer to assets later, but it’s important to know what they are. Assets include the URLs for the video thumbnail, iframe with the [api.video](http://api.video) player for embedding directly into the HTML, and several other video formats like `mp4` and `hls`. Now you know!
Notice that JSON above has a field called `assets`. We’ll refer to assets later, but it’s important to know what they are. Assets include the URLs for the video thumbnail, iframe with the [api.video](https://api.video/) player for embedding directly into the HTML, and several other video formats like `mp4` and `hls`. Now you know!

## How to create a sample app with private videos

Expand Down Expand Up @@ -180,9 +180,9 @@ Check out a sample runnable code of the above app in Node.js using [Replit](http
Let’s do a step-by-step review of what we are doing here.

1. We are creating a server that will serve HTML on port 3000 with Node.js
2. To make it easy on ourselves, we create a wrapper that will make an HTTP request to [api.video](http://api.video) with api key already embedded in HTTP header. That’s the `apiVideoReq` function.
2. To make it easy on ourselves, we create a wrapper that will make an HTTP request to [api.video](https://api.video/) with api key already embedded in HTTP header. That’s the `apiVideoReq` function.
3. We will get a raw response from the apiVideoReq, so need to create a parser that will parse the JSON response if the request is successful (200). That’s going to be the `getJsonResponse`
4. Then we need to create a function that will get the list of our videos. That’s pretty simple with the wrapper function we have, so let’s reuse the `apiVideoReq` and make a request to the [`videos`](https://ws.api.video/videos) endpoint. You can find more info about the `/videos` endpoint [here](/reference/api/Videos#list-all-video-objects). The response we'll get is an array of objects of the following format:
4. Then we need to create a function that will get the list of our videos. That’s pretty simple with the wrapper function we have, so let’s reuse the `apiVideoReq` and make a request to the [`videos`](/reference/api/Videos) endpoint. You can find more info about the `/videos` endpoint [here](/reference/api/Videos#list-all-video-objects). The response we'll get is an array of objects of the following format:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion templates/documentation/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ If for example you have created 900 videos, after calling `GET https://ws.api.vi
]
```

In order to retrieve the next 25 videos, you will need to make another request with the page number, and you can pull it from the object `links` with the `rel: "next"` value. A call to GET [https://ws.api.video/videos?currentPage=2&pageSize=25z](https://ws.api.video/videos?currentPage=2&pageSize=25z) will give you the next 25 videos.
In order to retrieve the next 25 videos, you will need to make another request with the page number, and you can pull it from the object `links` with the `rel: "next"` value. A call to `GET https://ws.api.video/videos?currentPage=2&pageSize=25z` will give you the next 25 videos.

## API Clients

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Fetch a new token using the [Authenticate](/reference/api/Advanced-authenticatio

### Tutorials

- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key) \- Use refresh tokens to retrieve a new access token when yours expires.
- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial/) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key/) \- Use refresh tokens to retrieve a new access token when yours expires.

### Tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Fetch a new token using the [Authenticate](/reference/api/Advanced-authenticatio

### Tutorials

- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key) \- Use refresh tokens to retrieve a new access token when yours expires.
- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial/) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key/) \- Use refresh tokens to retrieve a new access token when yours expires.

### Tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ You create upload tokens with the [delegated upload](/reference/api/Upload-Token

### Tutorials

* [Delegated uploads](https://api.video/blog/tutorials/delegated-uploads)
* [Delegated uploads for videos large and small](https://api.video/blog/tutorials/delegated-uploads-for-videos-large-and-small-python)
* [Delegated uploads](https://api.video/blog/tutorials/delegated-uploads/)
* [Delegated uploads for videos large and small](https://api.video/blog/tutorials/delegated-uploads-for-videos-large-and-small-python/)
* [Integrate delegated upload to ingest videos from your users](/reference/api/Videos#upload-with-an-delegated-upload-token)

### Tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ You must authenticate every time you use the api.video API. Depending on what pa

### Tutorials

- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key) \- Use refresh tokens to retrieve a new access token when yours expires.
- [Authentication steps](https://api.video/blog/tutorials/authentication-tutorial/) \- Walk through how to authenticate and retrieve an access token.
- [When your token expires, hit refresh and protect your API key](https://api.video/blog/tutorials/when-your-token-expires-hit-refresh-and-protect-your-api-key/) \- Use refresh tokens to retrieve a new access token when yours expires.

### Tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Add a delegated token for upload. Endpoint:

### Tutorials

- [Delegated uploads](https://api.video/blog/tutorials/delegated-uploads)
- [Delegated uploads for videos large and small](https://api.video/blog/tutorials/delegated-uploads-for-videos-large-and-small-python)
- [Delegated uploads](https://api.video/blog/tutorials/delegated-uploads/)
- [Delegated uploads for videos large and small](https://api.video/blog/tutorials/delegated-uploads-for-videos-large-and-small-python/)
- [Integrate delegated upload to ingest videos from your users](/reference/api/Videos#upload-with-an-delegated-upload-token)

### Tools
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ You can't attach multiple videos to the same upload request. One video or chunk

### Tutorials

* [Private video upload with a public token](https://api.video/blog/tutorials/private-video-upload-with-a-public-token)
* [Video upload](https://api.video/blog/tutorials/video-upload-tutorial)
* [Private video upload with a public token](https://api.video/blog/product-updates/video-access-management-how-to-create-deliver-and-manage-private-videos-and-what//)
* [Video upload](https://api.video/blog/tutorials/video-upload-tutorial/)

### Tools

Expand Down
Loading

0 comments on commit fac3a9b

Please sign in to comment.