Skip to content

Commit

Permalink
README to documentation synchro
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-lando committed Nov 21, 2023
1 parent 35aa78c commit 012f73f
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 38 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/create-documentation-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create documentation PR
on:
# Trigger the workflow on pull requests targeting the main branch
pull_request:
types: [assigned, unassigned, opened, reopened, synchronize, edited, labeled, unlabeled, edited, closed]
branches:
- main

jobs:
create_documentation_pr:
if: github.event.action != 'closed'

runs-on: ubuntu-latest

steps:
- name: Check out current repository code
uses: actions/checkout@v2

- name: Create the documentation pull request
uses: apivideo/api.video-create-readme-file-pull-request-action@main
with:
source-file-path: "README.md"
destination-repository: apivideo/api.video-documentation
destination-path: sdks/vod
destination-filename: apivideo-swift-uploader.md
pat: "${{ secrets.PAT }}"

93 changes: 55 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
<!--<documentation_excluded>-->
[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) &nbsp; [![badge](https://img.shields.io/github/stars/apivideo/api.video-swift-uploader?style=social)]() &nbsp; [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)
![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png)
<h1 align="center">api.video Swift uploader</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.

# Table of contents
## Table of contents

- [Table of contents](#table-of-contents)
- [Project description](#project-description)
- [Getting started](#getting-started)
- [Installation](#installation)
- [Carthage](#carthage)
- [CocoaPods](#cocoaPods)
- [CocoaPods](#cocoapods)
- [Code sample](#code-sample)
- [Documentation](#documentation)
- [API Endpoints](#api-endpoints)
- [VideosAPI](#VideosAPI)
- [VideosAPI](#videosapi)
- [Retrieve an instance of VideosAPI:](#retrieve-an-instance-of-videosapi)
- [Endpoints](#endpoints)
- [Models](#models)
- [Authorization](#documentation-for-authorization)
- [Documentation for Authorization](#documentation-for-authorization)
- [API key](#api-key)
- [Public endpoints](#public-endpoints)
- [Have you gotten use from this API client?](#have-you-gotten-use-from-this-api-client)
- [Have you gotten use from this API client?](#have-you-gotten-use-from-this-api-client)
- [Contribution](#contribution)

# Project description
<!--</documentation_excluded>-->
<!--<documentation_only>
---
title: api.video Swift video uploader
meta:
description: The official api.video Swift video uploader for api.video. [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's Swift for iOS, macOS and tvOS uploads videos to api.video using delegated upload token or API Key.
# api.video Swift video uploader
[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.
</documentation_only>-->
## Project description

api.video's Swift uploader for iOS, macOS and tvOS uploads videos to api.video using delegated upload token or API Key.

It allows you to upload videos in two ways:
- standard upload: to send a whole video file in one go
- progressive upload: to send a video file by chunks, without needing to know the final size of the video file

# Getting started
## Getting started

## Installation
### Installation

### Carthage
#### Carthage

Specify it in your `Cartfile`:

Expand All @@ -44,13 +61,13 @@ github "apivideo/api.video-swift-uploader" ~> 1.2.2

Run `carthage update`

### CocoaPods
#### CocoaPods

Add `pod 'ApiVideoUploader', '1.2.2'` in your `Podfile`

Run `pod install`

## Code sample
### Code sample

Please follow the [installation](#installation) instruction and execute the following Swift code:
```swift
Expand All @@ -69,66 +86,66 @@ try VideosAPI.uploadWithUploadToken(token: "MY_VIDEO_TOKEN", file: url) { video,
}
```

# Documentation
## Documentation

## API Endpoints
### API Endpoints

All URIs are relative to *https://ws.api.video*


### VideosAPI
#### VideosAPI

#### Retrieve an instance of VideosAPI:
##### Retrieve an instance of VideosAPI:

```swift
VideosAPI
```

#### Endpoints
##### Endpoints

Method | HTTP request | Description
------------- | ------------- | -------------
[**upload**](docs/VideosAPI.md#upload) | **POST** /videos/{videoId}/source | Upload a video
[**uploadWithUploadToken**](docs/VideosAPI.md#uploadWithUploadToken) | **POST** /upload | Upload with an delegated upload token
[**upload**](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideosAPI.md#upload) | **POST** /videos/{videoId}/source | Upload a video
[**uploadWithUploadToken**](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideosAPI.md#uploadWithUploadToken) | **POST** /upload | Upload with an delegated upload token



## Models
### Models

- [AccessToken](docs/AccessToken.md)
- [AdditionalBadRequestErrors](docs/AdditionalBadRequestErrors.md)
- [AuthenticatePayload](docs/AuthenticatePayload.md)
- [BadRequest](docs/BadRequest.md)
- [Metadata](docs/Metadata.md)
- [NotFound](docs/NotFound.md)
- [RefreshTokenPayload](docs/RefreshTokenPayload.md)
- [Video](docs/Video.md)
- [VideoAssets](docs/VideoAssets.md)
- [VideoSource](docs/VideoSource.md)
- [VideoSourceLiveStream](docs/VideoSourceLiveStream.md)
- [VideoSourceLiveStreamLink](docs/VideoSourceLiveStreamLink.md)
- [AccessToken](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/AccessToken.md)
- [AdditionalBadRequestErrors](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/AdditionalBadRequestErrors.md)
- [AuthenticatePayload](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/AuthenticatePayload.md)
- [BadRequest](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/BadRequest.md)
- [Metadata](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/Metadata.md)
- [NotFound](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/NotFound.md)
- [RefreshTokenPayload](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/RefreshTokenPayload.md)
- [Video](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/Video.md)
- [VideoAssets](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoAssets.md)
- [VideoSource](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoSource.md)
- [VideoSourceLiveStream](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoSourceLiveStream.md)
- [VideoSourceLiveStreamLink](https://github.com/apivideo/api.video-swift-uploader/blob/main/docs/VideoSourceLiveStreamLink.md)


## Documentation for Authorization
### Documentation for Authorization

### API key
#### API key

Most endpoints required to be authenticated using the API key mechanism described in our [documentation](https://docs.api.video/reference#authentication).

You must NOT store your API key in your application code to prevent your API key from being exposed in your source code.
Only the [Public endpoints](#public-endpoints) can be called without authentication.
In the case, you want to call an endpoint that requires authentication, you will have to use a backend server. See [Security best practices](https://docs.api.video/sdks/security) for more details.

### Public endpoints
#### Public endpoints

Some endpoints don't require authentication. These one can be called without setting `ApiVideoUploader.apiKey`.

## Have you gotten use from this API client?
### Have you gotten use from this API client?

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!

# Contribution
## Contribution

Since this API client is generated from an OpenAPI description, we cannot accept pull requests made directly to the repository. If you want to contribute, you can open a pull request on the repository of our [client generator](https://github.com/apivideo/api-client-generator). Otherwise, you can also simply open an issue detailing your need on this repository.
Since this API client is generated from an OpenAPI description, we cannot accept pull requests made directly to the repository. If you want to contribute, you can open a pull request on the repository of our [client generator](https://github.com/apivideo/api-client-generator). Otherwise, you can also simply open an issue detailing your need on this repository.

0 comments on commit 012f73f

Please sign in to comment.