-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from apivideo/feat/live-restreaming
Feat/live restreaming
- Loading branch information
Showing
30 changed files
with
324 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
aae56c93a2e3a6a1d04f6bd5a6ec47ba503646799e98307d3139e8ceb92a730c | ||
3eb2afd3380a2e1194d21245be70de774173595baf3a06fefd0c9c8d1c7f7f58 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ApiVideo.Model.RestreamsRequestObject | ||
Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination. | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**Name** | **string** | Use this parameter to define a name for the restream destination. | | ||
**ServerUrl** | **string** | Use this parameter to set the RTMP URL of the restream destination. | | ||
**StreamKey** | **string** | Use this parameter to provide the unique key of the live stream that you want to restream. | | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ApiVideo.Model.RestreamsResponseObject | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**Name** | **string** | Returns the name of a restream destination. | [optional] | ||
**ServerUrl** | **string** | Returns the RTMP URL of a restream destination. | [optional] | ||
**StreamKey** | **string** | Returns the unique key of the live stream that is set up for restreaming. | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using System.Text; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
|
||
namespace ApiVideo.Model { | ||
|
||
/// <summary> | ||
/// Adding restream destinations is optional. However, if you set a restream destination, you must provide all attributes for each destination. | ||
/// </summary> | ||
[DataContract] | ||
public class RestreamsRequestObject { | ||
/// <summary> | ||
/// Use this parameter to define a name for the restream destination. | ||
/// </summary> | ||
/// <value>Use this parameter to define a name for the restream destination.</value> | ||
[DataMember(Name="name", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "name")] | ||
public string name { get; set; } | ||
/// <summary> | ||
/// Use this parameter to set the RTMP URL of the restream destination. | ||
/// </summary> | ||
/// <value>Use this parameter to set the RTMP URL of the restream destination.</value> | ||
[DataMember(Name="serverUrl", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "serverUrl")] | ||
public string serverurl { get; set; } | ||
/// <summary> | ||
/// Use this parameter to provide the unique key of the live stream that you want to restream. | ||
/// </summary> | ||
/// <value>Use this parameter to provide the unique key of the live stream that you want to restream.</value> | ||
[DataMember(Name="streamKey", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "streamKey")] | ||
public string streamkey { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Get the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() { | ||
var sb = new StringBuilder(); | ||
sb.Append("class RestreamsRequestObject {\n"); | ||
sb.Append(" Name: ").Append(name).Append("\n"); | ||
sb.Append(" ServerUrl: ").Append(serverurl).Append("\n"); | ||
sb.Append(" StreamKey: ").Append(streamkey).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Get the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() { | ||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using System.Text; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
|
||
namespace ApiVideo.Model { | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[DataContract] | ||
public class RestreamsResponseObject { | ||
/// <summary> | ||
/// Returns the name of a restream destination. | ||
/// </summary> | ||
/// <value>Returns the name of a restream destination.</value> | ||
[DataMember(Name="name", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "name")] | ||
public string name { get; set; } | ||
/// <summary> | ||
/// Returns the RTMP URL of a restream destination. | ||
/// </summary> | ||
/// <value>Returns the RTMP URL of a restream destination.</value> | ||
[DataMember(Name="serverUrl", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "serverUrl")] | ||
public string serverurl { get; set; } | ||
/// <summary> | ||
/// Returns the unique key of the live stream that is set up for restreaming. | ||
/// </summary> | ||
/// <value>Returns the unique key of the live stream that is set up for restreaming.</value> | ||
[DataMember(Name="streamKey", EmitDefaultValue=false)] | ||
[JsonProperty(PropertyName = "streamKey")] | ||
public string streamkey { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// Get the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() { | ||
var sb = new StringBuilder(); | ||
sb.Append("class RestreamsResponseObject {\n"); | ||
sb.Append(" Name: ").Append(name).Append("\n"); | ||
sb.Append(" ServerUrl: ").Append(serverurl).Append("\n"); | ||
sb.Append(" StreamKey: ").Append(streamkey).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Get the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public string ToJson() { | ||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
tests/resources/payloads/livestreams/create/responses/400-0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type" : "https://docs.api.video/reference/invalid-attribute", | ||
"title" : "An attribute is invalid.", | ||
"status" : 400, | ||
"detail" : "This value should not be blank.", | ||
"name" : "restreams[0][name]" | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/resources/payloads/livestreams/create/responses/400-1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type" : "https://docs.api.video/reference/invalid-attribute", | ||
"title" : "An attribute is invalid.", | ||
"status" : 400, | ||
"detail" : "Missing app name: rtmp://[host]/[app name].", | ||
"name" : "restreams[0][serverUrl]" | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/resources/payloads/livestreams/create/responses/400-2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type" : "https://docs.api.video/reference/invalid-attribute", | ||
"title" : "An attribute is invalid.", | ||
"status" : 400, | ||
"detail" : "RTMP URL should have the following format: rtmp://[host]/[app name].", | ||
"name" : "restreams[0][serverUrl]" | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/resources/payloads/livestreams/create/responses/400-3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type" : "https://docs.api.video/reference/invalid-attribute", | ||
"title" : "An attribute is invalid.", | ||
"status" : 400, | ||
"detail" : "This collection should contain 5 elements or less.", | ||
"name" : "restreams" | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/resources/payloads/livestreams/create/responses/400-4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type" : "https://docs.api.video/reference/invalid-attribute", | ||
"title" : "An attribute is invalid.", | ||
"status" : 400, | ||
"detail" : "This value should not be null.", | ||
"name" : "restreams[0][name]" | ||
} |
Oops, something went wrong.