Content Type Policies
There are two ways to add your contents to Content-pool
1. Upload content
Use the platform as HLS streaming or just get download link and pass it to your clients.
You can upload content from the dashboard or use api to upload video contents directly from your server.
To get content link for different purposes go to channels section in your dashboard to introduce your share channels and get required urls.
Supported Video formats | Details |
---|---|
Format | mp4, mkv, ts, avi |
Max upload file size | 5 GB |
Platform output formats | Details |
---|---|
Output resolutions | 1080p 720p 480p 360p 240p |
Output extensions | m3u8, mp4 |
2. Use as cdn and traffic counter
mp4 supported
Content urls that is not supported:
- Urls with expiration date
- Referrer or useragent check
- Hls drm
Content pool server Ip
Allow content-pool server ips unlimited access to content urls.
185.128.138.240/28
External Url structure
Because contents has to be approved by irancell content validation team and some technical matters, content urls has to be in the fallowing restrictions. Urls divided in schema, domain or ip, path, file-name and args parts.
Example:
In https://prim.content-pool.ir/video/play/IP806SHeAm-NRoUXDxu-EpnPNveA-qGa1LWbdxOPH/DdcRODRlajSl_9q7lv0MFA/master.m3u8?args=something
- schema:
https
- domain:
prim.content-pool.ir
- path:
https://prim.content-pool.ir/video/play/IP806SHeAm-NRoUXDxu-EpnPNveA-qGa1LWbdxOPH/DdcRODRlajSl_9q7lv0MFA/
- file-name:
master.m3u8
And in https://prim.content-pool.ir/video/download/IP806SHeAm-NRoUXDxu-EpnPNveA-qGa1LWbdxOPH/DdcRODRlajSl_9q7lv0MFA/720p.mp4?args=something
- schema:
https
- domain:
prim.content-pool.ir
- path:
https://prim.content-pool.ir/video/download/IP806SHeAm-NRoUXDxu-EpnPNveA-qGa1LWbdxOPH/DdcRODRlajSl_9q7lv0MFA/
- file-name:
720p.mp4
External url rules
There are some rules in url parts:
- Schema:
- Only http and https are allowed.
- Domain:
- Both domain and Ip is supported.
- Path:
- Path has to be unique for each content.
- Quality of the content has to be specified in file-name part of the url.
- File-name:
- By now only mp4 and m3u8 formats are supported.
- Only shows the format and quality of the content.
- Each quality has its own file-name rule
- For 1080p videos:
file-name= 1080p.mp4
- For 720p videos:
file-name= 720p.mp4
- For 480p videos:
file-name= 480p.mp4
- For 144p videos:
file-name= 144p.mp4
- For Hls videos:
file-name= master.m3u8
- For 1080p videos:
- Args:
- There is no limit in args part.
Content Pool APIs
Here you can find how to connect to Content Pool service using API.
Postman collection
Postman collection is available Here
Upload Video
Requires authentication
To upload a video and set video info set Body parameters and assign video and thumbnail file path.
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/uploadVideo',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'videoFile' => 'test.mp4',
'urls' => '{"HLS":"https://www.domain.com/video", "1920×1080 (FHD)":"https://www.domain.com/video.mkv"}',
'title' => 'sunt',
'description' => 'qui',
'categoryKey' => 'eos',
'tags' => [],
'genres' => [],
'publishedAt' => '2020/2/12',
'producerCountry' => 'us',
'audioLanguage' => 'fa',
'parentalGuide' => 'velit',
'cover' => 'qui',
'banner' => 'et',
'thumbnail' => 'thumbnail.jpg',
'embeddable' => false,
'isFree' => false,
'commentStatus' => 'omnis',
'privacyStatus' => 'ad',
'otherData' => 'harum',
'shareStatus' => 'sit',
'englishDescription' => 'eveniet',
'englishTitle' => 'ut',
'seasonKey' => 'sit',
'episodeIndex' => 20,
'hasSubtitle' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/uploadVideo'
payload = {
"videoFile": "test.mp4",
"urls": "{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}",
"title": "sunt",
"description": "qui",
"categoryKey": "eos",
"tags": [],
"genres": [],
"publishedAt": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "velit",
"cover": "qui",
"banner": "et",
"thumbnail": "thumbnail.jpg",
"embeddable": false,
"isFree": false,
"commentStatus": "omnis",
"privacyStatus": "ad",
"otherData": "harum",
"shareStatus": "sit",
"englishDescription": "eveniet",
"englishTitle": "ut",
"seasonKey": "sit",
"episodeIndex": 20,
"hasSubtitle": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/uploadVideo" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"videoFile":"test.mp4","urls":"{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}","title":"sunt","description":"qui","categoryKey":"eos","tags":[],"genres":[],"publishedAt":"2020\/2\/12","producerCountry":"us","audioLanguage":"fa","parentalGuide":"velit","cover":"qui","banner":"et","thumbnail":"thumbnail.jpg","embeddable":false,"isFree":false,"commentStatus":"omnis","privacyStatus":"ad","otherData":"harum","shareStatus":"sit","englishDescription":"eveniet","englishTitle":"ut","seasonKey":"sit","episodeIndex":20,"hasSubtitle":true}'
const url = new URL(
"https://www.content-pool.ir/api/user/uploadVideo"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"videoFile": "test.mp4",
"urls": "{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}",
"title": "sunt",
"description": "qui",
"categoryKey": "eos",
"tags": [],
"genres": [],
"publishedAt": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "velit",
"cover": "qui",
"banner": "et",
"thumbnail": "thumbnail.jpg",
"embeddable": false,
"isFree": false,
"commentStatus": "omnis",
"privacyStatus": "ad",
"otherData": "harum",
"shareStatus": "sit",
"englishDescription": "eveniet",
"englishTitle": "ut",
"seasonKey": "sit",
"episodeIndex": 20,
"hasSubtitle": true
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "5o680fVAt3",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": null,
"title": "video Title",
"description": "video Description",
"published_at": "2014-03-04T20:30:00.000000Z",
"duration": 0,
"category_title": "فیلم و انیمیشن",
"tags_title": "tagTitle1 ,tagTitle2 ,tagTitle3",
"default_language": "fa",
"audio_language": "ch",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "uploading",
"privacy_status": "private",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_5o680fVAt3\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_default.jpeg",
"type": "cover",
"width": 100,
"height": 150,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_medium.jpeg",
"type": "cover",
"width": 200,
"height": 300,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_high.jpeg",
"type": "cover",
"width": 400,
"height": 600,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_standard.jpeg",
"type": "cover",
"width": 700,
"height": 1400,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
}
],
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"is_completed": true,
"series_key": "4S4D9SdCXD",
"season_key": "wHGz0kWi81Tb",
"episode_index": 1,
"video_type": "series",
"genres_title": "genre1 ,genre2 ,genre3",
"parental_guide": "TV-MA",
"producer_country": "us",
"share_status": "allow",
"webEmbedUrl": "https:\/\/www.content-pool.ir\/embed\/v\/cp\/5o680fVAt3",
"webPreEmbedUrl": "https:\/\/www.content-pool.ir\/pre_embed\/v\/cp\/5o680fVAt3",
"webUrl": "https:\/\/www.content-pool.ir\/v\/cp\/5o680fVAt3\/video-title",
"source_abbr": "cp"
}
}
Example response (401):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
Example response (500):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
HTTP Request
POST api/user/uploadVideo
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
videoFile |
file | required | if urls not provided video file path. |
urls |
json | required | if videoFile not provided json encoded array of urls with video format description as key and url as value. |
title |
string | required | title of the video |
description |
string | required | description of the video |
categoryKey |
string | required | category key of the video |
tags |
array | required | array of tag titles for video minimum: 3, maximum: 40 |
genres |
array | required | array of genres titles for video minimum: 1, maximum: 4 |
publishedAt |
string | required | creation date of video in Year/Month/Day Miladi format |
producerCountry |
string | required | producer country of the video in ISO 3166-2 format ref: [https://en.wikipedia.org/wiki/ISO_3166-2] |
audioLanguage |
string | required | audio language of the video in ISO_639-1 format ref: [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes] |
parentalGuide |
string | required | parental guideline code of the video between: ['TV-Y', 'TV-Y7', 'TV-G', 'TV-PG', 'TV-14', 'TV-MA'] |
cover |
file | required | cover file of the video |
banner |
file | required | banner file of the video |
thumbnail |
file | required | thumbnail file of the video. |
embeddable |
boolean | optional | optional is video embeddable |
isFree |
boolean | optional | optional is video free |
commentStatus |
string | optional | optional comment_status of the video |
privacyStatus |
string | optional | optional privacy_status of the video |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
shareStatus |
string | optional | optional share status of the video in other channels between: ['allow': every one can share this video from their channel, 'disallow': only owner of this video can share] |
englishDescription |
string | optional | optional description of the video in english |
englishTitle |
string | optional | optional title of the video in english |
seasonKey |
string | optional | optional season of the video |
episodeIndex |
integer | optional | optional index of this video it season |
hasSubtitle |
boolean | optional | optional set 1 if uploaded video has hard coded subtitle default: 0 |
Edit Video
Requires authentication
Edit video info
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/video/edit/1/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'videoFile' => 'test.mp4',
'urls' => '{"HLS":"https://www.domain.com/video", "1920×1080 (FHD)":"https://www.domain.com/video.mkv"}',
'title' => 'dolorem',
'description' => 'non',
'categoryKey' => 'quia',
'tags' => [],
'genres' => [],
'publishedAt' => '2020/2/12',
'producerCountry' => 'us',
'audioLanguage' => 'fa',
'parentalGuide' => 'porro',
'cover' => 'aliquid',
'banner' => 'rerum',
'thumbnail' => 'thumbnail.jpg',
'embeddable' => false,
'isFree' => false,
'commentStatus' => 'eum',
'privacyStatus' => 'omnis',
'otherData' => 'ut',
'shareStatus' => 'qui',
'englishDescription' => 'laborum',
'englishTitle' => 'eaque',
'seasonKey' => 'voluptas',
'episodeIndex' => 10,
'hasSubtitle' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/video/edit/1/1'
payload = {
"videoFile": "test.mp4",
"urls": "{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}",
"title": "dolorem",
"description": "non",
"categoryKey": "quia",
"tags": [],
"genres": [],
"publishedAt": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "porro",
"cover": "aliquid",
"banner": "rerum",
"thumbnail": "thumbnail.jpg",
"embeddable": false,
"isFree": false,
"commentStatus": "eum",
"privacyStatus": "omnis",
"otherData": "ut",
"shareStatus": "qui",
"englishDescription": "laborum",
"englishTitle": "eaque",
"seasonKey": "voluptas",
"episodeIndex": 10,
"hasSubtitle": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/video/edit/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"videoFile":"test.mp4","urls":"{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}","title":"dolorem","description":"non","categoryKey":"quia","tags":[],"genres":[],"publishedAt":"2020\/2\/12","producerCountry":"us","audioLanguage":"fa","parentalGuide":"porro","cover":"aliquid","banner":"rerum","thumbnail":"thumbnail.jpg","embeddable":false,"isFree":false,"commentStatus":"eum","privacyStatus":"omnis","otherData":"ut","shareStatus":"qui","englishDescription":"laborum","englishTitle":"eaque","seasonKey":"voluptas","episodeIndex":10,"hasSubtitle":true}'
const url = new URL(
"https://www.content-pool.ir/api/user/video/edit/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"videoFile": "test.mp4",
"urls": "{\"HLS\":\"https:\/\/www.domain.com\/video\", \"1920\u00d71080 (FHD)\":\"https:\/\/www.domain.com\/video.mkv\"}",
"title": "dolorem",
"description": "non",
"categoryKey": "quia",
"tags": [],
"genres": [],
"publishedAt": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "porro",
"cover": "aliquid",
"banner": "rerum",
"thumbnail": "thumbnail.jpg",
"embeddable": false,
"isFree": false,
"commentStatus": "eum",
"privacyStatus": "omnis",
"otherData": "ut",
"shareStatus": "qui",
"englishDescription": "laborum",
"englishTitle": "eaque",
"seasonKey": "voluptas",
"episodeIndex": 10,
"hasSubtitle": true
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "5o680fVAt3",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": null,
"title": "video Title",
"description": "video Description",
"published_at": "2014-03-04T20:30:00.000000Z",
"duration": 0,
"category_title": "فیلم و انیمیشن",
"tags_title": "tagTitle1 ,tagTitle2 ,tagTitle3",
"default_language": "fa",
"audio_language": "ch",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "uploading",
"privacy_status": "private",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_5o680fVAt3\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_default.jpeg",
"type": "cover",
"width": 100,
"height": 150,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_medium.jpeg",
"type": "cover",
"width": 200,
"height": 300,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_high.jpeg",
"type": "cover",
"width": 400,
"height": 600,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/cover_standard.jpeg",
"type": "cover",
"width": 700,
"height": 1400,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "video\/1_5o680fVAt3\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
}
],
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"is_completed": true,
"series_key": "4S4D9SdCXD",
"season_key": "wHGz0kWi81Tb",
"episode_index": 1,
"video_type": "series",
"genres_title": "genre1 ,genre2 ,genre3",
"parental_guide": "TV-MA",
"producer_country": "us",
"share_status": "allow",
"webEmbedUrl": "https:\/\/www.content-pool.ir\/embed\/v\/cp\/5o680fVAt3",
"webPreEmbedUrl": "https:\/\/www.content-pool.ir\/pre_embed\/v\/cp\/5o680fVAt3",
"webUrl": "https:\/\/www.content-pool.ir\/v\/cp\/5o680fVAt3\/video-title",
"source_abbr": "cp"
}
}
Example response (401):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
Example response (500):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
HTTP Request
POST api/user/video/edit/{sourceAbbr}/{sourceKey}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
videoFile |
file | optional | optional if urls not provided video file path. |
urls |
json | optional | optional if videoFile not provided json encoded array of urls with video format description as key and url as value. |
title |
string | optional | optional title of the video |
description |
string | optional | optional description of the video |
categoryKey |
string | optional | optional category key of the video |
tags |
array | optional | optional array of tag titles for video minimum: 3, maximum: 40 |
genres |
array | optional | optional array of genres titles for video minimum: 1, maximum: 4 |
publishedAt |
string | optional | optional creation date of video in Year/Month/Day miladi format |
producerCountry |
string | optional | optional producer country of the video in ISO 3166-2 format ref: [https://en.wikipedia.org/wiki/ISO_3166-2] |
audioLanguage |
string | optional | optional audio language of the video in ISO_639-1 format ref: [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes] |
parentalGuide |
string | optional | optional parental guideline code of the video between: ['TV-Y', 'TV-Y7', 'TV-G', 'TV-PG', 'TV-14', 'TV-MA'] |
cover |
file | optional | optional cover file of the video |
banner |
file | optional | optional banner file of the video |
thumbnail |
file | optional | optional thumbnail file of the video. |
embeddable |
boolean | optional | optional is video embeddable |
isFree |
boolean | optional | optional is video free |
commentStatus |
string | optional | optional comment_status of the video |
privacyStatus |
string | optional | optional privacy_status of the video |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
shareStatus |
string | optional | optional share status of the video in other channels between: ['allow': every one can share this video from their channel, 'disallow': only owner of the video can share] |
englishDescription |
string | optional | optional description of the video in english |
englishTitle |
string | optional | optional title of the video in english |
seasonKey |
string | optional | optional season of the video |
episodeIndex |
integer | optional | optional index of this video it season |
hasSubtitle |
boolean | optional | optional set 1 if uploaded video has hard coded subtitle default: 0 |
Get video info
To get video metadata info alongside share urls.
Requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/video/cp/RlLSmeXjKX',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/video/cp/RlLSmeXjKX'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/video/cp/RlLSmeXjKX" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/video/cp/RlLSmeXjKX"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "OFsxRFaWCe",
"parent_key": null,
"channel_key": "NRoUXDxu",
"channel_title": "admin",
"publisher_channel_key": "qGa1LWbdxOPH",
"season_index": null,
"episode_index": null,
"season_key": null,
"series_key": null,
"video_type": "movie",
"title": "خواب کامپیوترها",
"description": "کامپیوترها هم رویا میبینند؟؟",
"published_at": "2020-06-24 11:28:43",
"duration": 166,
"category_title": "فیلم و انیمیشن",
"tags_title": "دیپ ,دریم ,رویا",
"parental_guide": "NONE",
"genres_title": null,
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"producer_country": null,
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": false,
"embeddable": false,
"status": "active",
"privacy_status": "public",
"broadcast_status": "none",
"cleaner_status": "valid",
"comment_status": "allow",
"share_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_OFsxRFaWCe\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_OFsxRFaWCe\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_OFsxRFaWCe\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_OFsxRFaWCe\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "video\/1_OFsxRFaWCe\/thumbnail_max_res.jpeg",
"type": "thumbnail",
"width": 2560,
"height": 1440,
"quality": "max_res",
"upload_center_id": 2
}
],
"provider_data": null,
"is_completed": true,
"hlsVideoUrls": [
{
"url": "https:\/\/prim.content-pool.ir\/video\/play\/OFsxRFaWCe-EpnPNveA-EpnPNveA-qGa1LWbdxOPH\/rSRo4XkWy0wZlrpmPb_s67iFlnwz0QLmIYHR6dGgrK7BW8HCv8zf_A1dmCZKTc.q\/master.m3u8",
"fileSize": null,
"videoFormat": {
"title": "Auto",
"description": "HLS",
"abbr": "Auto",
"type": 1,
"mime": "application\/x-mpegURL",
"resolution": "Auto",
"extension": null,
"height": 0,
"width": 0,
"auto": true,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 0
},
"is_external": false
}
],
"downloadableVideoUrls": [
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/OFsxRFaWCe-EpnPNveA-EpnPNveA-qGa1LWbdxOPH\/rSRo4XkWy0wZlrpmPb_s67iFlnwz0QLmIYHR6dGgrK7BW8HCv8zf_A1dmCZKTc.q\/144p.mp4",
"fileSize": 5231840,
"videoFormat": {
"title": "256×144 (256)",
"description": "256×144 (256)",
"abbr": "256",
"type": 1,
"mime": "video\/mp4",
"resolution": "256×144",
"extension": null,
"height": 144,
"width": 256,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
"is_external": false
},
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/OFsxRFaWCe-EpnPNveA-EpnPNveA-qGa1LWbdxOPH\/rSRo4XkWy0wZlrpmPb_s67iFlnwz0QLmIYHR6dGgrK7BW8HCv8zf_A1dmCZKTc.q\/360p.mp4",
"fileSize": 16230252,
"videoFormat": {
"title": "640×360 (nHD)",
"description": "640×360 (nHD)",
"abbr": "nHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "640×360",
"extension": null,
"height": 360,
"width": 640,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
"is_external": false
},
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/OFsxRFaWCe-EpnPNveA-EpnPNveA-qGa1LWbdxOPH\/rSRo4XkWy0wZlrpmPb_s67iFlnwz0QLmIYHR6dGgrK7BW8HCv8zf_A1dmCZKTc.q\/240p.mp4",
"fileSize": 9466380,
"videoFormat": {
"title": "432×240 (FWQVGA)",
"description": "432×240 (FWQVGA)",
"abbr": "WQVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "432×240",
"extension": null,
"height": 240,
"width": 432,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
"is_external": false
}
],
"webEmbedUrl": "https:\/\/www.content-pool.ir\/embed\/v\/cp\/OFsxRFaWCe",
"webPreEmbedUrl": "https:\/\/www.content-pool.ir\/pre_embed\/v\/cp\/OFsxRFaWCe",
"webUrl": "https:\/\/www.content-pool.ir\/v\/cp\/OFsxRFaWCe\/%D8%AE%D9%88%D8%A7%D8%A8-%DA%A9%D8%A7%D9%85%D9%BE%DB%8C%D9%88%D8%AA%D8%B1%D9%87%D8%A7",
"source_abbr": "cp"
}
}
Example response (401):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
Example response (500):
{
"error": true,
"error_messages": [
"error message"
],
"http_response_code": 401,
"output": {}
}
HTTP Request
POST api/user/video/{sourceAbbr}/{sourceKey}
URL Parameters
Parameter | Status | Description |
---|---|---|
sourceAbbr |
required | source abbreviation of the video. |
sourceKey |
required | source key of the video. |
PublisherChannel
get a single publisherChannel or list of your own publisherChannels
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/publisherChannel',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'query' => [
'publisherChannelKey'=> 'omnis',
'maxResults'=> '14',
'pageToken'=> '9',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/publisherChannel'
params = {
'publisherChannelKey': 'omnis',
'maxResults': '14',
'pageToken': '9',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/publisherChannel?publisherChannelKey=omnis&maxResults=14&pageToken=9" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/publisherChannel"
);
let params = {
"publisherChannelKey": "omnis",
"maxResults": "14",
"pageToken": "9",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": 1,
"webUrl": null,
"icons": null,
"thumbnails": [],
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"source_key": "bIgTtyWzFvYA",
"channel_key": "NRoUXDxu",
"title": "new channel test",
"description": "",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 1,
"thumbnails": [
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_standard.jpeg",
"type": "banner",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "VOTTHedXEcCC",
"channel_key": "NRoUXDxu",
"title": "برترینها",
"description": "کانال تلگرام\r\nموضوعات زیبا",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 2,
"thumbnails": [
{
"url": "publisherChannel\/1_VOTTHedXEcCC\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_VOTTHedXEcCC\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "aiAqrzaMRXp4",
"channel_key": "NRoUXDxu",
"title": "سایت دیدئو",
"description": "dideo.ir",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 8,
"thumbnails": [
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "qGa1LWbdxOPH",
"channel_key": "NRoUXDxu",
"title": "پیش فرض",
"description": null,
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 92,
"thumbnails": [
{
"url": "publisherChannel\/1_qGa1LWbdxOPH\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "bIgTtyWzFvYA",
"channel_key": "NRoUXDxu",
"title": "new channel test",
"description": "",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 1,
"thumbnails": [
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_standard.jpeg",
"type": "banner",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "VOTTHedXEcCC",
"channel_key": "NRoUXDxu",
"title": "برترینها",
"description": "کانال تلگرام\r\nموضوعات زیبا",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 2,
"thumbnails": [
{
"url": "publisherChannel\/1_VOTTHedXEcCC\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_VOTTHedXEcCC\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "aiAqrzaMRXp4",
"channel_key": "NRoUXDxu",
"title": "سایت دیدئو",
"description": "dideo.ir",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 8,
"thumbnails": [
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_aiAqrzaMRXp4\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
},
{
"source_key": "qGa1LWbdxOPH",
"channel_key": "NRoUXDxu",
"title": "پیش فرض",
"description": null,
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 92,
"thumbnails": [
{
"url": "publisherChannel\/1_qGa1LWbdxOPH\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
}
],
"totalResults": 4,
"resultsPerPage": 10,
"prevPageToken": null,
"nextPageToken": null
}
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "bIgTtyWzFvYA",
"channel_key": "NRoUXDxu",
"title": "new channel test",
"description": "",
"channel_title": "admin",
"privacy_status": "public",
"status": "active",
"view_count": 0,
"video_count": 1,
"thumbnails": [
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_bIgTtyWzFvYA\/banner_standard.jpeg",
"type": "banner",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"default_language": "fa",
"localizations": []
}
}
HTTP Request
POST api/user/publisherChannel
Query Parameters
Parameter | Status | Description |
---|---|---|
publisherChannelKey |
optional | string optional unique publisher channel key |
maxResults |
optional | int optional maximum number of return items |
pageToken |
optional | string optional pageToken |
Create publisher channel
create a new publisher channel inside your channel
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/createPublisherChannel',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'query' => [
'title'=> 'non',
'description'=> 'qui',
'banner'=> 'amet',
'privacyStatus'=> 'eveniet',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/createPublisherChannel'
params = {
'title': 'non',
'description': 'qui',
'banner': 'amet',
'privacyStatus': 'eveniet',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/createPublisherChannel?title=non&description=qui&banner=amet&privacyStatus=eveniet" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/createPublisherChannel"
);
let params = {
"title": "non",
"description": "qui",
"banner": "amet",
"privacyStatus": "eveniet",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"privacy_status": "public",
"status": "active",
"thumbnails": [
{
"url": "publisherChannel\/1_YBWIA8xJfjiC\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_YBWIA8xJfjiC\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_YBWIA8xJfjiC\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
},
{
"url": "publisherChannel\/1_YBWIA8xJfjiC\/banner_standard.jpeg",
"height": 1080,
"width": 1920,
"quality": "standard",
"type": "banner",
"upload_center_id": 2
}
],
"localizations": [],
"default_language": "fa",
"view_count": 0,
"video_count": 0,
"channel_key": "NRoUXDxu",
"channel_title": "admin",
"title": "publisher channel title",
"description": "",
"source_key": "YBWIA8xJfjiC"
}
}
HTTP Request
POST api/user/createPublisherChannel
Query Parameters
Parameter | Status | Description |
---|---|---|
title |
optional | string required title of publisher channel |
description |
optional | string optional description of publisher channel |
banner |
optional | file optional banner of publisher Channel |
privacyStatus |
optional | string optional privacy status of publisher channel among ['public' , 'private', 'unlisted'] |
add video to publisher channel
add a video to a publisher channel
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/addVideoToPublisherChannel',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'query' => [
'publisherChannelKey'=> 'iure',
'videoKey'=> 'eaque',
'videoSourceAbbr'=> 'optio',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/addVideoToPublisherChannel'
params = {
'publisherChannelKey': 'iure',
'videoKey': 'eaque',
'videoSourceAbbr': 'optio',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/addVideoToPublisherChannel?publisherChannelKey=iure&videoKey=eaque&videoSourceAbbr=optio" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/addVideoToPublisherChannel"
);
let params = {
"publisherChannelKey": "iure",
"videoKey": "eaque",
"videoSourceAbbr": "optio",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "CRkRRIXx7K",
"parent_key": null,
"channel_key": "NRoUXDxu",
"channel_title": "admin",
"publisher_channel_key": "bIgTtyWzFvYA",
"title": "video Title",
"description": "video Description",
"published_at": "2020-06-08T11:35:55.000000Z",
"duration": 13,
"category_title": "فیلم و انیمیشن",
"tags_title": " ",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "processingUC",
"privacy_status": "public",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_CRkRRIXx7K\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_CRkRRIXx7K\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_CRkRRIXx7K\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_CRkRRIXx7K\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"is_completed": true,
"hlsVideoUrls": [
{
"url": "https:\/\/prim.content-pool.ir\/video\/play\/CRkRRIXx7K-NRoUXDxu-EpnPNveA-bIgTtyWzFvYA\/kmoogFs9bj9ztBw5zIwqFw\/master.m3u8",
"videoFormat": {
"title": "Auto",
"description": "HLS",
"abbr": "Auto",
"type": 1,
"mime": "application\/x-mpegURL",
"resolution": "Auto",
"extension": null,
"height": 0,
"width": 0,
"auto": true,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 0
}
}
],
"downloadableVideoUrls": [
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/CRkRRIXx7K-NRoUXDxu-EpnPNveA-bIgTtyWzFvYA\/kmoogFs9bj9ztBw5zIwqFw\/144p.mp4",
"videoFormat": {
"title": "256×144 (256)",
"description": "256×144 (256)",
"abbr": "256",
"type": 1,
"mime": "video\/mp4",
"resolution": "256×144",
"extension": null,
"height": 144,
"width": 256,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
}
},
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/CRkRRIXx7K-NRoUXDxu-EpnPNveA-bIgTtyWzFvYA\/kmoogFs9bj9ztBw5zIwqFw\/360p.mp4",
"videoFormat": {
"title": "640×360 (nHD)",
"description": "640×360 (nHD)",
"abbr": "nHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "640×360",
"extension": null,
"height": 360,
"width": 640,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
}
},
{
"url": "https:\/\/prim.content-pool.ir\/video\/download\/CRkRRIXx7K-NRoUXDxu-EpnPNveA-bIgTtyWzFvYA\/kmoogFs9bj9ztBw5zIwqFw\/240p.mp4",
"videoFormat": {
"title": "432×240 (FWQVGA)",
"description": "432×240 (FWQVGA)",
"abbr": "WQVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "432×240",
"extension": null,
"height": 240,
"width": 432,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
}
}
],
"publisherChannelTitle": "new channel test",
"webEmbedUrl": "https:\/\/www.content-pool.ir\/embed\/v\/cp\/CRkRRIXx7K?pc=bIgTtyWzFvYA",
"webPreEmbedUrl": "https:\/\/www.content-pool.ir\/pre_embed\/v\/cp\/CRkRRIXx7K?pc=bIgTtyWzFvYA",
"webUrl": "https:\/\/www.content-pool.ir\/v\/cp\/CRkRRIXx7K\/video-title?pc=bIgTtyWzFvYA",
"source_abbr": "cp"
}
}
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
HTTP Request
POST api/user/addVideoToPublisherChannel
Query Parameters
Parameter | Status | Description |
---|---|---|
publisherChannelKey |
optional | string required unique publisher channel key |
videoKey |
optional | string required unique video key |
videoSourceAbbr |
required | video source abbr |
Irancell ip check
Requires authentication
Check if user IP is from Irancell or not
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/isIrancellUser',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'ip' => '2.144.198.193',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/isIrancellUser'
payload = {
"ip": "2.144.198.193"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/isIrancellUser" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"ip":"2.144.198.193"}'
const url = new URL(
"https://www.content-pool.ir/api/user/isIrancellUser"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"ip": "2.144.198.193"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": true
}
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
HTTP Request
POST api/user/isIrancellUser
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
ip |
required | optional | user Ip address. |
Categories list
Requires authentication
Returns list of categories
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/categoriesList',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/categoriesList'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/categoriesList" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/categoriesList"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": [
{
"title": "فیلم و انیمیشن",
"abbr": "Film & Animation",
"description": null,
"key": "LN0NopE4"
},
{
"title": "ماشین و وسایل نقلیه",
"abbr": "Autos & Vehicles",
"description": null,
"key": "xa28gnMR"
},
{
"title": "موسیقی",
"abbr": "Music",
"description": null,
"key": "1w0P5pYb"
},
{
"title": "حیوانات",
"abbr": "Pets & Animals",
"description": null,
"key": "9G2ZV23x"
},
{
"title": "ورزشی",
"abbr": "Sports",
"description": null,
"key": "vYp3gpar"
},
{
"title": "فیلم کوتاه",
"abbr": "Short Movies",
"description": null,
"key": "eY05onDy"
},
{
"title": "مسافرت و حوادث",
"abbr": "Travel & Events",
"description": null,
"key": "b50XNnDj"
},
{
"title": "بازی",
"abbr": "Gaming",
"description": null,
"key": "o1nyZ2WB"
},
{
"title": "مردم و وبلاگ",
"abbr": "People & Blogs",
"description": null,
"key": "BW2Q126v"
},
{
"title": "کمدی",
"abbr": "Comedy",
"description": null,
"key": "PMngq0g6"
},
{
"title": "سرگرمی",
"abbr": "Entertainments",
"description": null,
"key": "NR27Bnw6"
},
{
"title": "اخبار و سیاست",
"abbr": "News & Politics",
"description": null,
"key": "75nAEnMk"
},
{
"title": "چگونه",
"abbr": "Howto & Style",
"description": null,
"key": "5epOkpYN"
},
{
"title": "آموزشی",
"abbr": "Educations",
"description": null,
"key": "yVpBknKL"
},
{
"title": "علمی و تکنولوژی",
"abbr": "Science & Technology",
"description": null,
"key": "aL04x0mY"
},
{
"title": "غیر انتفایی",
"abbr": "Nonprofits & Activism",
"description": null,
"key": "Kq2vDp4d"
},
{
"title": "نمایش",
"abbr": "Shows",
"description": null,
"key": "GZnLQ2LR"
},
{
"title": "شخصی",
"abbr": "Personal",
"description": null,
"key": "KxnwP2mD"
},
{
"title": "مذهبی",
"abbr": "Religious",
"description": null,
"key": "J4pernAP"
},
{
"title": "سیاسی",
"abbr": "Political",
"description": null,
"key": "N72RB2Xd"
},
{
"title": "حوادث",
"abbr": "Accidents",
"description": null,
"key": "xz2Mdno9"
},
{
"title": "طبیعت",
"abbr": "Nature",
"description": null,
"key": "Go0qon9b"
},
{
"title": "تبلیغات",
"abbr": "Advertisement",
"description": null,
"key": "YApmZnaP"
},
{
"title": "هنری",
"abbr": "Art",
"description": null,
"key": "j42Vo0yk"
},
{
"title": "کارتون",
"abbr": "Cartoon",
"description": null,
"key": "oWpolnlv"
},
{
"title": "بانوان",
"abbr": "Women",
"description": null,
"key": "eWp6P2rQ"
},
{
"title": "سلامت",
"abbr": "Health",
"description": null,
"key": "WJ0xMp4q"
},
{
"title": "متفرقه",
"abbr": "Misc",
"description": null,
"key": "dP0Kg0we"
},
{
"title": "اکشن",
"abbr": "Action",
"description": null,
"key": "kxnlJ015"
},
{
"title": "کلاسیک",
"abbr": "Classics",
"description": null,
"key": "qDpze0Wk"
},
{
"title": "اسناد",
"abbr": "Documentary",
"description": null,
"key": "3MnbRnVQ"
},
{
"title": "درام",
"abbr": "Drama",
"description": null,
"key": "1G0kEnva"
},
{
"title": "خانوادگی",
"abbr": "Family",
"description": null,
"key": "QG2aR0ZO"
},
{
"title": "ترسناک",
"abbr": "Horror",
"description": null,
"key": "oQprRpe9"
},
{
"title": "فانتزی",
"abbr": "Sci-Fi\/Fantasy",
"description": null,
"key": "RX2Gd0DZ"
},
{
"title": "تریلر",
"abbr": "Thriller",
"description": null,
"key": "6qn9B2w8"
},
{
"title": "فیلم",
"abbr": "Film",
"description": null,
"key": "Yw0jz0zO"
},
{
"title": "گردشگری",
"abbr": "Tourism",
"description": null,
"key": "bE01Gnj4"
},
{
"title": "آشپزی",
"abbr": "Food",
"description": null,
"key": "bD2WP01q"
},
{
"title": "کودک",
"abbr": "Children",
"description": null,
"key": "YwpD709a"
}
]
}
HTTP Request
POST api/user/categoriesList
Get analytics data
Retuens the analytics data of video, channel, publisherChannel and publisherChannelVideo.
-
If provide videoSourceAbbr and videoKey analytics of video will return
-
If provide publisherChannelKey analytics of publisherChannel will return
-
If provide videoSourceAbbr, videoKey, publisherChannelKey analytics of video inside publisher channel will return
-
If nothing provide analytics of your channel will return
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/analytics',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'query' => [
'videoSourceAbbr'=> 'suscipit',
'videoKey'=> 'autem',
'publisherChannelKey'=> 'officia',
'fromDate'=> 'maiores',
'toDate'=> 'iste',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/analytics'
params = {
'videoSourceAbbr': 'suscipit',
'videoKey': 'autem',
'publisherChannelKey': 'officia',
'fromDate': 'maiores',
'toDate': 'iste',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/analytics?videoSourceAbbr=suscipit&videoKey=autem&publisherChannelKey=officia&fromDate=maiores&toDate=iste" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/analytics"
);
let params = {
"videoSourceAbbr": "suscipit",
"videoKey": "autem",
"publisherChannelKey": "officia",
"fromDate": "maiores",
"toDate": "iste",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"totalTrafficUsage": 18557326975,
"unit": "B",
"entity": {
"sourceAbbr": "cp",
"sourceKey": "NRoUXDxu"
},
"data": [
{
"date": "2020-05-10 00:00:00",
"trafficUsageString": "1.9 GB",
"trafficUsage": 2030783132
},
{
"date": "2020-05-11 00:00:00",
"trafficUsageString": "282.8 MB",
"trafficUsage": 296560205
},
{
"date": "2020-05-12 00:00:00",
"trafficUsageString": "426.8 MB",
"trafficUsage": 447516559
},
{
"date": "2020-05-13 00:00:00",
"trafficUsageString": "110.5 MB",
"trafficUsage": 115863483
},
{
"date": "2020-05-14 00:00:00",
"trafficUsageString": "3.8 MB",
"trafficUsage": 3958741
},
{
"date": "2020-05-15 00:00:00",
"trafficUsageString": "2.5 GB",
"trafficUsage": 2728346767
},
{
"date": "2020-05-16 00:00:00",
"trafficUsageString": "1.2 GB",
"trafficUsage": 1255835633
},
{
"date": "2020-05-17 00:00:00",
"trafficUsageString": "17.1 MB",
"trafficUsage": 17952676
},
{
"date": "2020-05-18 00:00:00",
"trafficUsageString": "24.6 MB",
"trafficUsage": 25805168
},
{
"date": "2020-05-19 00:00:00",
"trafficUsageString": "1.7 GB",
"trafficUsage": 1805170908
},
{
"date": "2020-05-20 00:00:00",
"trafficUsageString": "687.1 MB",
"trafficUsage": 720468243
},
{
"date": "2020-05-21 00:00:00",
"trafficUsageString": "6.8 MB",
"trafficUsage": 7148702
},
{
"date": "2020-05-22 00:00:00",
"trafficUsageString": "1.1 GB",
"trafficUsage": 1181998232
},
{
"date": "2020-05-23 00:00:00",
"trafficUsageString": "338.8 MB",
"trafficUsage": 355221761
},
{
"date": "2020-05-25 00:00:00",
"trafficUsageString": "297 MB",
"trafficUsage": 311434923
},
{
"date": "2020-05-26 00:00:00",
"trafficUsageString": "685.5 MB",
"trafficUsage": 718840532
},
{
"date": "2020-05-27 00:00:00",
"trafficUsageString": "21 MB",
"trafficUsage": 22017901
},
{
"date": "2020-05-28 00:00:00",
"trafficUsageString": "49.8 MB",
"trafficUsage": 52170995
},
{
"date": "2020-05-29 00:00:00",
"trafficUsageString": "29.6 MB",
"trafficUsage": 31018912
},
{
"date": "2020-05-30 00:00:00",
"trafficUsageString": "461.6 MB",
"trafficUsage": 484009116
},
{
"date": "2020-05-31 00:00:00",
"trafficUsageString": "5.6 MB",
"trafficUsage": 5885612
},
{
"date": "2020-06-01 00:00:00",
"trafficUsageString": "120 MB",
"trafficUsage": 125866214
},
{
"date": "2020-06-02 00:00:00",
"trafficUsageString": "253.9 MB",
"trafficUsage": 266269785
},
{
"date": "2020-06-03 00:00:00",
"trafficUsageString": "28.7 MB",
"trafficUsage": 30102186
},
{
"date": "2020-06-04 00:00:00",
"trafficUsageString": "171.8 KB",
"trafficUsage": 175925
},
{
"date": "2020-06-05 00:00:00",
"trafficUsageString": "111.4 MB",
"trafficUsage": 116801969
},
{
"date": "2020-06-06 00:00:00",
"trafficUsageString": "1.4 GB",
"trafficUsage": 1540288718
},
{
"date": "2020-06-07 00:00:00",
"trafficUsageString": "2.3 GB",
"trafficUsage": 2497196718
},
{
"date": "2020-06-08 00:00:00",
"trafficUsageString": "1.3 GB",
"trafficUsage": 1362617259
}
]
}
}
HTTP Request
POST api/user/analytics
Query Parameters
Parameter | Status | Description |
---|---|---|
videoSourceAbbr |
optional | string optional source abbr of video |
videoKey |
optional | string optional unique key of video |
publisherChannelKey |
optional | string optional unique key of publisher channel |
fromDate |
optional | string optional string representing from date and time in Miladi and +4:30 timestamp with this format YYYY-MM-DD HH:MM:SS |
toDate |
optional | string optional string representing to date and time in Miladi and +4:30 timestamp with this format YYYY-MM-DD HH:MM:SS |
video formats
list of available video formats
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/videoFormats',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/videoFormats'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/videoFormats" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/videoFormats"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": null,
"webUrl": null,
"icons": null,
"thumbnails": [],
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"title": "1920×1080 (FHD)",
"description": "1920×1080 (FHD)",
"abbr": "FHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "1920×1080",
"extension": null,
"height": 1080,
"width": 1920,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "1280×720 (HD)",
"description": "1280×720 (HD)",
"abbr": "HD",
"type": 1,
"mime": "video\/mp4",
"resolution": "1280×720",
"extension": null,
"height": 720,
"width": 1280,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "854×480 (FWVGA)",
"description": "854×480 (FWVGA)",
"abbr": "FWVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "854×480",
"extension": null,
"height": 480,
"width": 854,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "640×360 (nHD)",
"description": "640×360 (nHD)",
"abbr": "nHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "640×360",
"extension": null,
"height": 360,
"width": 640,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "432×240 (FWQVGA)",
"description": "432×240 (FWQVGA)",
"abbr": "WQVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "432×240",
"extension": null,
"height": 240,
"width": 432,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "256×144 (256)",
"description": "256×144 (256)",
"abbr": "256",
"type": 1,
"mime": "video\/mp4",
"resolution": "256×144",
"extension": null,
"height": 144,
"width": 256,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "Auto",
"description": "HLS",
"abbr": "Auto",
"type": 1,
"mime": "application\/x-mpegURL",
"resolution": "Auto",
"extension": null,
"height": 0,
"width": 0,
"auto": true,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 0
},
{
"title": "1920×1080 (FHD)",
"description": "1920×1080 (FHD)",
"abbr": "FHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "1920×1080",
"extension": null,
"height": 1080,
"width": 1920,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "1280×720 (HD)",
"description": "1280×720 (HD)",
"abbr": "HD",
"type": 1,
"mime": "video\/mp4",
"resolution": "1280×720",
"extension": null,
"height": 720,
"width": 1280,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "854×480 (FWVGA)",
"description": "854×480 (FWVGA)",
"abbr": "FWVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "854×480",
"extension": null,
"height": 480,
"width": 854,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "640×360 (nHD)",
"description": "640×360 (nHD)",
"abbr": "nHD",
"type": 1,
"mime": "video\/mp4",
"resolution": "640×360",
"extension": null,
"height": 360,
"width": 640,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "432×240 (FWQVGA)",
"description": "432×240 (FWQVGA)",
"abbr": "WQVGA",
"type": 1,
"mime": "video\/mp4",
"resolution": "432×240",
"extension": null,
"height": 240,
"width": 432,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "256×144 (256)",
"description": "256×144 (256)",
"abbr": "256",
"type": 1,
"mime": "video\/mp4",
"resolution": "256×144",
"extension": null,
"height": 144,
"width": 256,
"auto": false,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 1
},
{
"title": "Auto",
"description": "HLS",
"abbr": "Auto",
"type": 1,
"mime": "application\/x-mpegURL",
"resolution": "Auto",
"extension": null,
"height": 0,
"width": 0,
"auto": true,
"playable": true,
"app_playable": true,
"mobile_playable": true,
"tv_playable": true,
"downloadable": 0
}
],
"totalResults": null,
"resultsPerPage": 7,
"prevPageToken": null,
"nextPageToken": null
}
}
HTTP Request
POST api/user/videoFormats
Search
Search for video
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/search',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'query' => [
'query'=> 'ipsum',
'maxResults'=> '5',
'pageToken'=> '12',
'channelKey'=> 'fugit',
'publisherChannelKey'=> 'pariatur',
'categoryTitle'=> 'minima',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/search'
params = {
'query': 'ipsum',
'maxResults': '5',
'pageToken': '12',
'channelKey': 'fugit',
'publisherChannelKey': 'pariatur',
'categoryTitle': 'minima',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/search?query=ipsum&maxResults=5&pageToken=12&channelKey=fugit&publisherChannelKey=pariatur&categoryTitle=minima" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/search"
);
let params = {
"query": "ipsum",
"maxResults": "5",
"pageToken": "12",
"channelKey": "fugit",
"publisherChannelKey": "pariatur",
"categoryTitle": "minima",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": null,
"webUrl": null,
"icons": null,
"thumbnails": [],
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"type": "video",
"uuid": "Jellyfish\\Models\\Video_1_raOjG7pLfK",
"title": "نابودگر",
"description": "یک کاراگاه پلیس به نام ارین بل ، افرادی را که از یک ماموریت مخفیانهی قدیمی با آنها آشنایی دارد ، دوباره ملاقات میکند تا صلح را برقرار سازد. اما…",
"source_id": 1,
"source_video_key": "raOjG7pLfK",
"source_channel_id": "iGAt2GkR",
"playlist_id": null,
"cleaner_result": null,
"source_key": "raOjG7pLfK",
"publisher_channel_key": "6QB8TpfsUrrb",
"upload_center_id": 1,
"user_key": "6K7xibXn",
"category": "فیلم و انیمیشن",
"tags": "[\" \"]",
"view_count": 0,
"published_at": "2020-06-07T15:55:19.000000Z",
"thumbnails": [
{
"url": "video\/1_raOjG7pLfK\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"channel_key": "iGAt2GkR",
"duration": 6507,
"channel_title": "لنز ایرانسل",
"video_count": null,
"subscriber_count": null,
"dislike_count": 0,
"like_count": 0,
"broadcast_status": "none",
"privacy_status": "public",
"comment_count": 0,
"has_caption": false,
"is_3d": false,
"is_hd": false,
"is_free": true,
"embeddable": true
},
{
"type": "video",
"uuid": "Jellyfish\\Models\\Video_1_UvasgE2N6O",
"title": "خون آبی فصل 1 قسمت 12",
"description": "سریال درباره یک خانواده می باشد که همگی پلیس هستند و هر کدوم در زمانی که پلیس بودند وقتشون رو صرف اجرای قانون کردند . فرانک ریگان که نقش پدر خانواده رو بازی می کنه رئیس پلیس شهر نیویورک بوده که در دوران خدمتش فردی باسیاست و با شهامت بوده . پسر بزرگش دینه قبلا سرباز در عراق بوده و الان کاراگاه خصوصی هست . دختر خانواده ارینه که بازپرش بخش قضایی در نیوروک , الان از پدرش جدا شده و تنها زندگی می کنه . جیمی هم که کوچیکترین فردخانواده ست در رشته حقوق از دانشگاه هاروارد تازه فارغ التحصیل شده و بهخاطر اینکه کل خانواده پلیس هستند اونم به شغل خانوادگیش برگشت .",
"source_id": 1,
"source_video_key": "UvasgE2N6O",
"source_channel_id": "iGAt2GkR",
"playlist_id": null,
"cleaner_result": null,
"source_key": "UvasgE2N6O",
"publisher_channel_key": "6QB8TpfsUrrb",
"upload_center_id": 1,
"user_key": "6K7xibXn",
"category": "فیلم و انیمیشن",
"tags": "[\"\\u062f\\u0631\\u0627\\u0645 \",\"\\u062c\\u0646\\u0627\\u06cc\\u06cc \",\"\\u0631\\u0627\\u06cc\\u06af\\u0627\\u0646\"]",
"view_count": 0,
"published_at": "2020-06-04T23:04:04.000000Z",
"thumbnails": [
{
"url": "video\/1_UvasgE2N6O\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"channel_key": "iGAt2GkR",
"duration": 2385,
"channel_title": null,
"video_count": null,
"subscriber_count": null,
"dislike_count": 0,
"like_count": 0,
"broadcast_status": "none",
"privacy_status": null,
"comment_count": 0,
"has_caption": false,
"is_3d": false,
"is_hd": false,
"is_free": true,
"embeddable": true
},
{
"source_id": 1,
"source_key": "raOjG7pLfK",
"channel_key": "iGAt2GkR",
"type": "video",
"publisher_channel_key": "6QB8TpfsUrrb",
"user_key": "6K7xibXn",
"upload_center_id": 1,
"title": "نابودگر",
"description": "یک کاراگاه پلیس به نام ارین بل ، افرادی را که از یک ماموریت مخفیانهی قدیمی با آنها آشنایی دارد ، دوباره ملاقات میکند تا صلح را برقرار سازد. اما…",
"channel_title": "لنز ایرانسل",
"category": "فیلم و انیمیشن",
"tags": "[\" \"]",
"published_at": "2020-06-07 20:25:19",
"duration": 6507,
"is_hd": false,
"is_3d": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"broadcast_status": "none",
"thumbnails": [
{
"url": "video\/1_raOjG7pLfK\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"video_count": null,
"subscriber_count": null,
"privacy_status": "public"
},
{
"source_id": 1,
"source_key": "UvasgE2N6O",
"channel_key": "iGAt2GkR",
"type": "video",
"publisher_channel_key": "6QB8TpfsUrrb",
"user_key": "6K7xibXn",
"upload_center_id": 1,
"title": "خون آبی فصل 1 قسمت 12",
"description": "سریال درباره یک خانواده می باشد که همگی پلیس هستند و هر کدوم در زمانی که پلیس بودند وقتشون رو صرف اجرای قانون کردند . فرانک ریگان که نقش پدر خانواده رو بازی می کنه رئیس پلیس شهر نیویورک بوده که در دوران خدمتش فردی باسیاست و با شهامت بوده . پسر بزرگش دینه قبلا سرباز در عراق بوده و الان کاراگاه خصوصی هست . دختر خانواده ارینه که بازپرش بخش قضایی در نیوروک , الان از پدرش جدا شده و تنها زندگی می کنه . جیمی هم که کوچیکترین فردخانواده ست در رشته حقوق از دانشگاه هاروارد تازه فارغ التحصیل شده و بهخاطر اینکه کل خانواده پلیس هستند اونم به شغل خانوادگیش برگشت .",
"channel_title": null,
"category": "فیلم و انیمیشن",
"tags": "[\"\\u062f\\u0631\\u0627\\u0645 \",\"\\u062c\\u0646\\u0627\\u06cc\\u06cc \",\"\\u0631\\u0627\\u06cc\\u06af\\u0627\\u0646\"]",
"published_at": "2020-06-05 03:34:04",
"duration": 2385,
"is_hd": false,
"is_3d": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"broadcast_status": "none",
"thumbnails": [
{
"url": "video\/1_UvasgE2N6O\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
}
],
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"video_count": null,
"subscriber_count": null
}
],
"totalResults": 46,
"resultsPerPage": 2,
"prevPageToken": null,
"nextPageToken": "JD"
}
}
HTTP Request
POST api/user/search
Query Parameters
Parameter | Status | Description |
---|---|---|
query |
optional | string required query to search |
maxResults |
optional | int optional maximum number of return items |
pageToken |
optional | string optional pageToken |
channelKey |
optional | string optional unique channel key to search inside that channel |
publisherChannelKey |
optional | string optional unique publisher channel key to search inside that channel |
categoryTitle |
optional | string optional this category videos |
Genres
list of available Genres
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/genres',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/genres'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/genres" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1"
const url = new URL(
"https://www.content-pool.ir/api/user/genres"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": null,
"webUrl": null,
"icons": null,
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"title": "درام",
"default_language": "fa",
"localizations": {
"en": {
"title": "Drama"
}
}
},
{
"title": "انیمیشن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Animation"
}
}
},
{
"title": "کمدی",
"default_language": "fa",
"localizations": {
"en": {
"title": "Comedy"
}
}
},
{
"title": "اکشن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Action"
}
}
},
{
"title": "بیوگرافی",
"default_language": "fa",
"localizations": {
"en": {
"title": "Biography"
}
}
},
{
"title": "جنگی",
"default_language": "fa",
"localizations": {
"en": {
"title": "War"
}
}
},
{
"title": "وسترن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Western"
}
}
},
{
"title": "موزیکال",
"default_language": "fa",
"localizations": {
"en": {
"title": "Musical"
}
}
},
{
"title": "درام",
"default_language": "fa",
"localizations": {
"en": {
"title": "Drama"
}
}
},
{
"title": "انیمیشن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Animation"
}
}
},
{
"title": "کمدی",
"default_language": "fa",
"localizations": {
"en": {
"title": "Comedy"
}
}
},
{
"title": "اکشن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Action"
}
}
},
{
"title": "بیوگرافی",
"default_language": "fa",
"localizations": {
"en": {
"title": "Biography"
}
}
},
{
"title": "جنگی",
"default_language": "fa",
"localizations": {
"en": {
"title": "War"
}
}
},
{
"title": "وسترن",
"default_language": "fa",
"localizations": {
"en": {
"title": "Western"
}
}
},
{
"title": "موزیکال",
"default_language": "fa",
"localizations": {
"en": {
"title": "Musical"
}
}
}
],
"totalResults": null,
"resultsPerPage": 8,
"prevPageToken": null,
"nextPageToken": null
}
}
HTTP Request
POST api/user/genres
Create season
create a season
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/createSeason',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'seriesKey' => 'delectus',
'index' => 14,
'title' => 'quia',
'description' => 'possimus',
'firstEpisodeDate' => '2020/2/12',
'lastEpisodeDate' => '2020/2/12',
'cover' => 'sed',
'banner' => 'voluptatem',
'otherData' => 'autem',
'trailerVideoKey' => 'molestiae',
'englishDescription' => 'repudiandae',
'englishTitle' => 'at',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/createSeason'
payload = {
"seriesKey": "delectus",
"index": 14,
"title": "quia",
"description": "possimus",
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"cover": "sed",
"banner": "voluptatem",
"otherData": "autem",
"trailerVideoKey": "molestiae",
"englishDescription": "repudiandae",
"englishTitle": "at"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/createSeason" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"seriesKey":"delectus","index":14,"title":"quia","description":"possimus","firstEpisodeDate":"2020\/2\/12","lastEpisodeDate":"2020\/2\/12","cover":"sed","banner":"voluptatem","otherData":"autem","trailerVideoKey":"molestiae","englishDescription":"repudiandae","englishTitle":"at"}'
const url = new URL(
"https://www.content-pool.ir/api/user/createSeason"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"seriesKey": "delectus",
"index": 14,
"title": "quia",
"description": "possimus",
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"cover": "sed",
"banner": "voluptatem",
"otherData": "autem",
"trailerVideoKey": "molestiae",
"englishDescription": "repudiandae",
"englishTitle": "at"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"like_count": 0,
"dislike_count": 0,
"thumbnails": [
{
"url": "season\/1_wHGz0kWi81Tb\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_standard.jpeg",
"height": 1080,
"width": 1920,
"quality": "standard",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_default.jpeg",
"height": 150,
"width": 100,
"quality": "default",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_medium.jpeg",
"height": 300,
"width": 200,
"quality": "medium",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_high.jpeg",
"height": 600,
"width": 400,
"quality": "high",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_standard.jpeg",
"height": 1400,
"width": 700,
"quality": "standard",
"type": "cover",
"upload_center_id": 2
}
],
"localizations": {
"en": {
"title": "season api english title",
"description": "season api english description"
}
},
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"no_episodes": 0,
"index": 1,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"series_key": "4S4D9SdCXD",
"title": "season Api Title",
"description": "season Api Description",
"first_episode_date": "2020-12-02 00:00:00",
"last_episode_date": "2020-11-03 00:00:00",
"trailer_video_key": "VyN80QVATl",
"source_key": "wHGz0kWi81Tb",
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/createSeason
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
seriesKey |
string | required | series source key of this season |
index |
integer | required | index of this season in series |
title |
string | required | title of the season |
description |
string | required | description of the season |
firstEpisodeDate |
string | required | first episode date of this series in Year/Month/Day miladi format |
lastEpisodeDate |
string | optional | optional last episode date of this series if has been finished in Year/Month/Day miladi format |
cover |
file | required | cover file of the season |
banner |
file | required | banner file of the season |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
trailerVideoKey |
string | optional | optional trailer video source key of this season |
englishDescription |
string | optional | optional description of the season in english |
englishTitle |
string | optional | optional title of the season in english |
Create series
create a series
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/createSeries',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'title' => 'accusamus',
'description' => 'aut',
'genres' => [],
'firstEpisodeDate' => '2020/2/12',
'lastEpisodeDate' => '2020/2/12',
'producerCountry' => 'us',
'audioLanguage' => 'fa',
'parentalGuide' => 'non',
'cover' => 'sit',
'banner' => 'officiis',
'privacyStatus' => 'unde',
'otherData' => 'qui',
'trailerVideoKey' => 'maxime',
'englishDescription' => 'libero',
'englishTitle' => 'ab',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/createSeries'
payload = {
"title": "accusamus",
"description": "aut",
"genres": [],
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "non",
"cover": "sit",
"banner": "officiis",
"privacyStatus": "unde",
"otherData": "qui",
"trailerVideoKey": "maxime",
"englishDescription": "libero",
"englishTitle": "ab"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/createSeries" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"title":"accusamus","description":"aut","genres":[],"firstEpisodeDate":"2020\/2\/12","lastEpisodeDate":"2020\/2\/12","producerCountry":"us","audioLanguage":"fa","parentalGuide":"non","cover":"sit","banner":"officiis","privacyStatus":"unde","otherData":"qui","trailerVideoKey":"maxime","englishDescription":"libero","englishTitle":"ab"}'
const url = new URL(
"https://www.content-pool.ir/api/user/createSeries"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"title": "accusamus",
"description": "aut",
"genres": [],
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "non",
"cover": "sit",
"banner": "officiis",
"privacyStatus": "unde",
"otherData": "qui",
"trailerVideoKey": "maxime",
"englishDescription": "libero",
"englishTitle": "ab"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"like_count": 0,
"dislike_count": 0,
"thumbnails": [
{
"url": "series\/1_4S4D9SdCXD\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_standard.jpeg",
"height": 1080,
"width": 1920,
"quality": "standard",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_default.jpeg",
"height": 150,
"width": 100,
"quality": "default",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_medium.jpeg",
"height": 300,
"width": 200,
"quality": "medium",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_high.jpeg",
"height": 600,
"width": 400,
"quality": "high",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_standard.jpeg",
"height": 1400,
"width": 700,
"quality": "standard",
"type": "cover",
"upload_center_id": 2
}
],
"localizations": {
"en": {
"title": "series api english title",
"description": "seris api english description"
}
},
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"no_seasons": 0,
"no_episodes": 0,
"default_language": "fa",
"audio_language": "fa",
"producer_country": "ir",
"share_status": "allow",
"status": "active",
"privacy_status": "private",
"parental_guide": "TV-MA",
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"title": "seriesApiTitle",
"description": "seriesApiDescription",
"genres_title": "genres0 ,genres1 ,genres2",
"first_episode_date": "2020-12-02 00:00:00",
"last_episode_date": "2020-11-03 00:00:00",
"trailer_video_key": "VyN80QVATl",
"source_key": "4S4D9SdCXD",
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/createSeries
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
title |
string | required | title of the video |
description |
string | required | description of the video |
genres |
array | required | array of genres titles for video minimum: 1, maximum: 4 |
firstEpisodeDate |
string | required | first episode date of this series in Year/Month/Day miladi format |
lastEpisodeDate |
string | optional | optional last episode date of this series if has been finished in Year/Month/Day miladi format |
producerCountry |
string | required | producer country of the series in ISO 3166-2 format ref: [https://en.wikipedia.org/wiki/ISO_3166-2] |
audioLanguage |
string | required | audio language of the series in ISO_639-1 format ref: [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes] |
parentalGuide |
string | required | parental guideline code of the series between: ['TV-Y', 'TV-Y7', 'TV-G', 'TV-PG', 'TV-14', 'TV-MA'] |
cover |
file | required | cover file of the series |
banner |
file | required | banner file of the series |
privacyStatus |
string | optional | optional privacy_status of the series |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
trailerVideoKey |
string | optional | optional trailer video source key of this series |
englishDescription |
string | optional | optional description of the series in english |
englishTitle |
string | optional | optional title of the series in english |
Edit series
Edit a series
Requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/series/edit/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'title' => 'quam',
'description' => 'explicabo',
'genres' => [],
'firstEpisodeDate' => '2020/2/12',
'lastEpisodeDate' => '2020/2/12',
'producerCountry' => 'us',
'audioLanguage' => 'fa',
'parentalGuide' => 'est',
'cover' => 'asperiores',
'banner' => 'et',
'privacyStatus' => 'laborum',
'otherData' => 'accusantium',
'trailerVideoKey' => 'incidunt',
'englishDescription' => 'explicabo',
'englishTitle' => 'id',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/series/edit/1'
payload = {
"title": "quam",
"description": "explicabo",
"genres": [],
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "est",
"cover": "asperiores",
"banner": "et",
"privacyStatus": "laborum",
"otherData": "accusantium",
"trailerVideoKey": "incidunt",
"englishDescription": "explicabo",
"englishTitle": "id"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/series/edit/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"title":"quam","description":"explicabo","genres":[],"firstEpisodeDate":"2020\/2\/12","lastEpisodeDate":"2020\/2\/12","producerCountry":"us","audioLanguage":"fa","parentalGuide":"est","cover":"asperiores","banner":"et","privacyStatus":"laborum","otherData":"accusantium","trailerVideoKey":"incidunt","englishDescription":"explicabo","englishTitle":"id"}'
const url = new URL(
"https://www.content-pool.ir/api/user/series/edit/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"title": "quam",
"description": "explicabo",
"genres": [],
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"producerCountry": "us",
"audioLanguage": "fa",
"parentalGuide": "est",
"cover": "asperiores",
"banner": "et",
"privacyStatus": "laborum",
"otherData": "accusantium",
"trailerVideoKey": "incidunt",
"englishDescription": "explicabo",
"englishTitle": "id"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"like_count": 0,
"dislike_count": 0,
"thumbnails": [
{
"url": "series\/1_4S4D9SdCXD\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_standard.jpeg",
"height": 1080,
"width": 1920,
"quality": "standard",
"type": "banner",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_default.jpeg",
"height": 150,
"width": 100,
"quality": "default",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_medium.jpeg",
"height": 300,
"width": 200,
"quality": "medium",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_high.jpeg",
"height": 600,
"width": 400,
"quality": "high",
"type": "cover",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_standard.jpeg",
"height": 1400,
"width": 700,
"quality": "standard",
"type": "cover",
"upload_center_id": 2
}
],
"localizations": {
"en": {
"title": "series api english title",
"description": "seris api english description"
}
},
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"no_seasons": 0,
"no_episodes": 0,
"default_language": "fa",
"audio_language": "fa",
"producer_country": "ir",
"share_status": "allow",
"status": "active",
"privacy_status": "private",
"parental_guide": "TV-MA",
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"title": "seriesApiTitle",
"description": "seriesApiDescription",
"genres_title": "genres0 ,genres1 ,genres2",
"first_episode_date": "2020-12-02 00:00:00",
"last_episode_date": "2020-11-03 00:00:00",
"trailer_video_key": "VyN80QVATl",
"source_key": "4S4D9SdCXD",
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/series/edit/{sourceKey}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
title |
string | optional | optional title of the video |
description |
string | optional | optional description of the video |
genres |
array | optional | optional array of genres titles for video minimum: 1, maximum: 4 |
firstEpisodeDate |
string | optional | optional first episode date of this series in Year/Month/Day miladi format |
lastEpisodeDate |
string | optional | optional last episode date of this series if has been finished in Year/Month/Day miladi format |
producerCountry |
string | optional | optional producer country of the series in ISO 3166-2 format ref: [https://en.wikipedia.org/wiki/ISO_3166-2] |
audioLanguage |
string | optional | optional audio language of the series in ISO_639-1 format ref: [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes] |
parentalGuide |
string | optional | optional parental guideline code of the series between: ['TV-Y', 'TV-Y7', 'TV-G', 'TV-PG', 'TV-14', 'TV-MA'] |
cover |
file | optional | optional cover file of the series |
banner |
file | optional | optional banner file of the series |
privacyStatus |
string | optional | optional privacy_status of the series |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
trailerVideoKey |
string | optional | optional trailer video source key of this series |
englishDescription |
string | optional | optional description of the series in english |
englishTitle |
string | optional | optional title of the series in english |
Edit season
Edit a season
Requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/season/edit/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'seriesKey' => 'exercitationem',
'index' => 6,
'title' => 'necessitatibus',
'description' => 'et',
'firstEpisodeDate' => '2020/2/12',
'lastEpisodeDate' => '2020/2/12',
'cover' => 'ex',
'banner' => 'earum',
'otherData' => 'mollitia',
'trailerVideoKey' => 'ducimus',
'englishDescription' => 'laborum',
'englishTitle' => 'iste',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/season/edit/1'
payload = {
"seriesKey": "exercitationem",
"index": 6,
"title": "necessitatibus",
"description": "et",
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"cover": "ex",
"banner": "earum",
"otherData": "mollitia",
"trailerVideoKey": "ducimus",
"englishDescription": "laborum",
"englishTitle": "iste"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/season/edit/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"seriesKey":"exercitationem","index":6,"title":"necessitatibus","description":"et","firstEpisodeDate":"2020\/2\/12","lastEpisodeDate":"2020\/2\/12","cover":"ex","banner":"earum","otherData":"mollitia","trailerVideoKey":"ducimus","englishDescription":"laborum","englishTitle":"iste"}'
const url = new URL(
"https://www.content-pool.ir/api/user/season/edit/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"seriesKey": "exercitationem",
"index": 6,
"title": "necessitatibus",
"description": "et",
"firstEpisodeDate": "2020\/2\/12",
"lastEpisodeDate": "2020\/2\/12",
"cover": "ex",
"banner": "earum",
"otherData": "mollitia",
"trailerVideoKey": "ducimus",
"englishDescription": "laborum",
"englishTitle": "iste"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"like_count": 0,
"dislike_count": 0,
"thumbnails": [
{
"url": "season\/1_wHGz0kWi81Tb\/banner_default.jpeg",
"height": 360,
"width": 640,
"quality": "default",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_medium.jpeg",
"height": 480,
"width": 854,
"quality": "medium",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_high.jpeg",
"height": 720,
"width": 1280,
"quality": "high",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/banner_standard.jpeg",
"height": 1080,
"width": 1920,
"quality": "standard",
"type": "banner",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_default.jpeg",
"height": 150,
"width": 100,
"quality": "default",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_medium.jpeg",
"height": 300,
"width": 200,
"quality": "medium",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_high.jpeg",
"height": 600,
"width": 400,
"quality": "high",
"type": "cover",
"upload_center_id": 2
},
{
"url": "season\/1_wHGz0kWi81Tb\/cover_standard.jpeg",
"height": 1400,
"width": 700,
"quality": "standard",
"type": "cover",
"upload_center_id": 2
}
],
"localizations": {
"en": {
"title": "season api english title",
"description": "season api english description"
}
},
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"no_episodes": 0,
"index": 1,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"series_key": "4S4D9SdCXD",
"title": "season Api Title",
"description": "season Api Description",
"first_episode_date": "2020-12-02 00:00:00",
"last_episode_date": "2020-11-03 00:00:00",
"trailer_video_key": "VyN80QVATl",
"source_key": "wHGz0kWi81Tb",
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/season/edit/{sourceKey}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
seriesKey |
string | required | series source key of this season |
index |
integer | optional | optional index of this season in series |
title |
string | optional | optional title of the season |
description |
string | optional | optional description of the season |
firstEpisodeDate |
string | optional | optional first episode date of this series in Year/Month/Day miladi format |
lastEpisodeDate |
string | optional | optional last episode date of this series if has been finished in Year/Month/Day miladi format |
cover |
file | optional | optional cover file of the season |
banner |
file | optional | optional banner file of the season |
otherData |
json | optional | optional json array of other data any provider may want to sent to us for latter use |
trailerVideoKey |
string | optional | optional trailer video source key of this season |
englishDescription |
string | optional | optional description of the season in english |
englishTitle |
string | optional | optional title of the season in english |
Series list
get list of all your series
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/seriesList',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'pageToken' => 'maxime',
'maxResults' => 11,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/seriesList'
payload = {
"pageToken": "maxime",
"maxResults": 11
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/seriesList" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"pageToken":"maxime","maxResults":11}'
const url = new URL(
"https://www.content-pool.ir/api/user/seriesList"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"pageToken": "maxime",
"maxResults": 11
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": 1,
"webUrl": null,
"icons": null,
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"source_key": "OqWWUNKo6A",
"channel_key": "HC9hRd1b",
"channel_title": null,
"trailer_video_key": null,
"title": "first series",
"description": null,
"genres_title": "comedy, drama, horor",
"parental_guide": "NONE",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"producer_country": "ir",
"status": "active",
"privacy_status": "public",
"share_status": "allow",
"like_count": 0,
"dislike_count": 0,
"no_seasons": 2,
"no_episodes": 6,
"thumbnails": [],
"provider_data": [],
"first_episode_date": null,
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
},
{
"source_key": "6wxnANuYw1",
"channel_key": "HC9hRd1b",
"channel_title": null,
"trailer_video_key": null,
"title": "first Series",
"description": "first series description",
"genres_title": "comedy, drama, horor",
"parental_guide": "TV-MA",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"producer_country": "us",
"status": "active",
"privacy_status": "public",
"share_status": "allow",
"like_count": 0,
"dislike_count": 0,
"no_seasons": 2,
"no_episodes": 6,
"thumbnails": [],
"provider_data": [],
"first_episode_date": "2019-06-24 22:54:52",
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
},
{
"source_key": "lPZj6D0esa",
"channel_key": "HC9hRd1b",
"channel_title": null,
"trailer_video_key": null,
"title": "first Series",
"description": "first series description",
"genres_title": "comedy, drama, horor",
"parental_guide": "TV-MA",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"producer_country": "us",
"status": "active",
"privacy_status": "public",
"share_status": "allow",
"like_count": 0,
"dislike_count": 0,
"no_seasons": 2,
"no_episodes": 6,
"thumbnails": [],
"provider_data": [],
"first_episode_date": "2019-06-24 22:54:54",
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
},
{
"source_key": "4S4D9SdCXD",
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"trailer_video_key": "VyN80QVATl",
"title": "seriesApiTitle",
"description": "seriesApiDescription",
"genres_title": "genres0 ,genres1 ,genres2",
"parental_guide": "TV-MA",
"default_language": "fa",
"audio_language": "fa",
"localizations": {
"en": {
"title": "series api english title",
"description": "seris api english description"
}
},
"producer_country": "ir",
"status": "active",
"privacy_status": "private",
"share_status": "allow",
"like_count": 0,
"dislike_count": 0,
"no_seasons": 4,
"no_episodes": 1,
"thumbnails": [
{
"url": "series\/1_4S4D9SdCXD\/banner_default.jpeg",
"type": "banner",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_medium.jpeg",
"type": "banner",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_high.jpeg",
"type": "banner",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/banner_standard.jpeg",
"type": "banner",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_default.jpeg",
"type": "cover",
"width": 100,
"height": 150,
"quality": "default",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_medium.jpeg",
"type": "cover",
"width": 200,
"height": 300,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_high.jpeg",
"type": "cover",
"width": 400,
"height": 600,
"quality": "high",
"upload_center_id": 2
},
{
"url": "series\/1_4S4D9SdCXD\/cover_standard.jpeg",
"type": "cover",
"width": 700,
"height": 1400,
"quality": "standard",
"upload_center_id": 2
}
],
"provider_data": {
"series": "series",
"generes": [
"reading",
"cinema",
{
"sports": [
"volley-ball",
"snowboard"
]
}
]
},
"first_episode_date": "2020-12-02 00:00:00",
"last_episode_date": "2020-11-03 00:00:00",
"webUrl": "",
"source_abbr": "cp"
}
],
"totalResults": 4,
"resultsPerPage": 20,
"prevPageToken": null,
"nextPageToken": null
}
}
HTTP Request
POST api/user/seriesList
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
pageToken |
string | optional | optional page token |
maxResults |
integer | optional | optional maximum number of returned results |
seasons list
get list of seasons inside a series
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/seasonsList',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'sourceAbbr' => 'ut',
'sourceKey' => 'non',
'pageToken' => 'est',
'maxResults' => 15,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/seasonsList'
payload = {
"sourceAbbr": "ut",
"sourceKey": "non",
"pageToken": "est",
"maxResults": 15
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/seasonsList" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"sourceAbbr":"ut","sourceKey":"non","pageToken":"est","maxResults":15}'
const url = new URL(
"https://www.content-pool.ir/api/user/seasonsList"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"sourceAbbr": "ut",
"sourceKey": "non",
"pageToken": "est",
"maxResults": 15
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": 1,
"webUrl": null,
"icons": null,
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"source_key": "7X6HTfdq1Ja9",
"series_key": "lPZj6D0esa",
"channel_key": "HC9hRd1b",
"channel_title": "",
"trailer_video_key": null,
"title": "first season",
"description": null,
"index": 1,
"localizations": [],
"like_count": 0,
"dislike_count": 0,
"no_episodes": 4,
"thumbnails": [],
"provider_data": [],
"first_episode_date": null,
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
},
{
"source_key": "ASpH6Y04XG8u",
"series_key": "lPZj6D0esa",
"channel_key": "HC9hRd1b",
"channel_title": "",
"trailer_video_key": null,
"title": "second season",
"description": null,
"index": 2,
"localizations": [],
"like_count": 0,
"dislike_count": 0,
"no_episodes": 2,
"thumbnails": [],
"provider_data": [],
"first_episode_date": null,
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
}
],
"totalResults": 2,
"resultsPerPage": 20,
"prevPageToken": null,
"nextPageToken": null
}
}
HTTP Request
POST api/user/seasonsList
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sourceAbbr |
string | required | source abbreviation of the series |
sourceKey |
string | required | source key of the series |
pageToken |
string | optional | optional page token |
maxResults |
integer | optional | optional maximum number of returned results |
season videos
get list of videos in a season
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/seasonVideos',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'sourceAbbr' => 'fuga',
'sourceKey' => 'eveniet',
'pageToken' => 'natus',
'maxResults' => 15,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/seasonVideos'
payload = {
"sourceAbbr": "fuga",
"sourceKey": "eveniet",
"pageToken": "natus",
"maxResults": 15
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/seasonVideos" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"sourceAbbr":"fuga","sourceKey":"eveniet","pageToken":"natus","maxResults":15}'
const url = new URL(
"https://www.content-pool.ir/api/user/seasonVideos"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"sourceAbbr": "fuga",
"sourceKey": "eveniet",
"pageToken": "natus",
"maxResults": 15
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"currentPage": 1,
"webUrl": null,
"icons": null,
"title": null,
"type": "list",
"nextPageRoute": null,
"items": [
{
"source_key": "VyN80QVATl",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": 1,
"title": "boz",
"description": "description",
"published_at": "2020-05-30T09:07:34.000000Z",
"duration": 0,
"category_title": "فیلم و انیمیشن",
"tags_title": "tag2 ,tag3 ,tag1",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "uploadingToUC",
"privacy_status": "public",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_VyN80QVATl\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_VyN80QVATl\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_VyN80QVATl\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_VyN80QVATl\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"provider_data": [],
"is_completed": true,
"series_key": "lPZj6D0esa",
"season_key": "7X6HTfdq1Ja9",
"episode_index": 1,
"video_type": "series",
"genres_title": null,
"parental_guide": "NONE",
"producer_country": null,
"share_status": "allow",
"webEmbedUrl": "http:\/\/jellyfish.ddv\/embed\/v\/cp\/VyN80QVATl",
"webPreEmbedUrl": "http:\/\/jellyfish.ddv\/pre_embed\/v\/cp\/VyN80QVATl",
"webUrl": "http:\/\/jellyfish.ddv\/v\/cp\/VyN80QVATl\/boz",
"source_abbr": "cp"
},
{
"source_key": "0PEGVldIXl",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": 1,
"title": null,
"description": null,
"published_at": "2020-06-27T08:24:48.266961Z",
"duration": 0,
"category_title": null,
"tags_title": null,
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "uploading",
"privacy_status": "public",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [],
"provider_data": [],
"is_completed": true,
"series_key": "lPZj6D0esa",
"season_key": "7X6HTfdq1Ja9",
"episode_index": 2,
"video_type": "series",
"genres_title": null,
"parental_guide": "NONE",
"producer_country": null,
"share_status": "allow",
"webEmbedUrl": "http:\/\/jellyfish.ddv\/embed\/v\/cp\/0PEGVldIXl",
"webPreEmbedUrl": "http:\/\/jellyfish.ddv\/pre_embed\/v\/cp\/0PEGVldIXl",
"webUrl": "http:\/\/jellyfish.ddv\/v\/cp\/0PEGVldIXl\/%D8%AA%D9%85%D8%A7%D8%B4%D8%A7%DB%8C-%D9%88%DB%8C%D8%AF%D8%A6%D9%88-%D8%A7%D8%B2-%DB%B3%DB%B2%DB%B1",
"source_abbr": "cp"
},
{
"source_key": "mw8ffaHSxt",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": 1,
"title": "adsf",
"description": "adsf",
"published_at": "2020-06-02T13:19:00.000000Z",
"duration": 0,
"category_title": "فیلم و انیمیشن",
"tags_title": "f ,e ,rt",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": false,
"embeddable": false,
"status": "uploadingToUC",
"privacy_status": "public",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [
{
"url": "video\/1_mw8ffaHSxt\/thumbnail_default.jpeg",
"type": "thumbnail",
"width": 640,
"height": 360,
"quality": "default",
"upload_center_id": 2
},
{
"url": "video\/1_mw8ffaHSxt\/thumbnail_medium.jpeg",
"type": "thumbnail",
"width": 854,
"height": 480,
"quality": "medium",
"upload_center_id": 2
},
{
"url": "video\/1_mw8ffaHSxt\/thumbnail_high.jpeg",
"type": "thumbnail",
"width": 1280,
"height": 720,
"quality": "high",
"upload_center_id": 2
},
{
"url": "video\/1_mw8ffaHSxt\/thumbnail_standard.jpeg",
"type": "thumbnail",
"width": 1920,
"height": 1080,
"quality": "standard",
"upload_center_id": 2
}
],
"provider_data": null,
"is_completed": true,
"series_key": "lPZj6D0esa",
"season_key": "7X6HTfdq1Ja9",
"episode_index": 3,
"video_type": "series",
"genres_title": null,
"parental_guide": "NONE",
"producer_country": null,
"share_status": "allow",
"webEmbedUrl": "http:\/\/jellyfish.ddv\/embed\/v\/cp\/mw8ffaHSxt",
"webPreEmbedUrl": "http:\/\/jellyfish.ddv\/pre_embed\/v\/cp\/mw8ffaHSxt",
"webUrl": "http:\/\/jellyfish.ddv\/v\/cp\/mw8ffaHSxt\/adsf",
"source_abbr": "cp"
},
{
"source_key": "TGTb6t7BrC",
"parent_key": null,
"channel_key": "HC9hRd1b",
"channel_title": "admin",
"publisher_channel_key": "NzC7XFOeMYLZ",
"season_index": 1,
"title": null,
"description": null,
"published_at": "2020-06-27T08:24:48.272406Z",
"duration": 0,
"category_title": null,
"tags_title": " ",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"is_3d": false,
"is_hd": false,
"has_caption": false,
"is_free": true,
"embeddable": true,
"status": "uploadingToUC",
"privacy_status": "public",
"broadcast_status": "none",
"comment_status": "allow",
"view_count": 0,
"like_count": 0,
"dislike_count": 0,
"comment_count": 0,
"thumbnails": [],
"provider_data": [],
"is_completed": true,
"series_key": "lPZj6D0esa",
"season_key": "7X6HTfdq1Ja9",
"episode_index": 4,
"video_type": "series",
"genres_title": null,
"parental_guide": "NONE",
"producer_country": null,
"share_status": "allow",
"webEmbedUrl": "http:\/\/jellyfish.ddv\/embed\/v\/cp\/TGTb6t7BrC",
"webPreEmbedUrl": "http:\/\/jellyfish.ddv\/pre_embed\/v\/cp\/TGTb6t7BrC",
"webUrl": "http:\/\/jellyfish.ddv\/v\/cp\/TGTb6t7BrC\/%D8%AA%D9%85%D8%A7%D8%B4%D8%A7%DB%8C-%D9%88%DB%8C%D8%AF%D8%A6%D9%88-%D8%A7%D8%B2-%DB%B3%DB%B2%DB%B1",
"source_abbr": "cp"
}
],
"totalResults": 4,
"resultsPerPage": 20,
"prevPageToken": null,
"nextPageToken": null
}
}
HTTP Request
POST api/user/seasonVideos
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sourceAbbr |
string | required | source abbreviation of the season |
sourceKey |
string | required | source key of the season |
pageToken |
string | optional | optional page token |
maxResults |
integer | optional | optional maximum number of returned results |
series
get a series info
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/series',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'sourceAbbr' => 'neque',
'sourceKey' => 'nihil',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/series'
payload = {
"sourceAbbr": "neque",
"sourceKey": "nihil"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/series" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"sourceAbbr":"neque","sourceKey":"nihil"}'
const url = new URL(
"https://www.content-pool.ir/api/user/series"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"sourceAbbr": "neque",
"sourceKey": "nihil"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "lPZj6D0esa",
"channel_key": "HC9hRd1b",
"channel_title": null,
"trailer_video_key": null,
"title": "first Series",
"description": "first series description",
"genres_title": "comedy, drama, horor",
"parental_guide": "TV-MA",
"default_language": "fa",
"audio_language": "fa",
"localizations": [],
"producer_country": "us",
"status": "active",
"privacy_status": "public",
"share_status": "allow",
"like_count": 0,
"dislike_count": 0,
"no_seasons": 2,
"no_episodes": 6,
"thumbnails": [],
"provider_data": [],
"first_episode_date": "2019-06-24 22:54:54",
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/series
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sourceAbbr |
string | required | source abbreviation of the series |
sourceKey |
string | required | source key of the series |
season
get a season info
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://www.content-pool.ir/api/user/season',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'token' => '{token}',
'Api-Version' => 'v1',
],
'json' => [
'sourceAbbr' => 'eum',
'sourceKey' => 'ut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://www.content-pool.ir/api/user/season'
payload = {
"sourceAbbr": "eum",
"sourceKey": "ut"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'token': '{token}',
'Api-Version': 'v1'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl -X POST \
"https://www.content-pool.ir/api/user/season" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "token: {token}" \
-H "Api-Version: v1" \
-d '{"sourceAbbr":"eum","sourceKey":"ut"}'
const url = new URL(
"https://www.content-pool.ir/api/user/season"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"token": "{token}",
"Api-Version": "v1",
};
let body = {
"sourceAbbr": "eum",
"sourceKey": "ut"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"error": true,
"error_messages": [
"api unauthorized 2510"
],
"http_response_code": 401,
"output": null
}
Example response (200):
{
"error": false,
"error_messages": [],
"http_response_code": 200,
"output": {
"source_key": "7X6HTfdq1Ja9",
"series_key": "lPZj6D0esa",
"channel_key": "HC9hRd1b",
"channel_title": "",
"trailer_video_key": null,
"title": "first season",
"description": null,
"index": 1,
"localizations": [],
"like_count": 0,
"dislike_count": 0,
"no_episodes": 4,
"thumbnails": [],
"provider_data": [],
"first_episode_date": null,
"last_episode_date": null,
"webUrl": "",
"source_abbr": "cp"
}
}
HTTP Request
POST api/user/season
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sourceAbbr |
string | required | source abbreviation of the season |
sourceKey |
string | required | source key of the season |