Page MenuHomeDatingVIP

Video & Photo
Updated 2,871 Days AgoPublic

Video & Photo API

API command examples for Video API (it's equal to Photos API, only difference is that photos don't have status "waiting for encoder", only other two "approved" and "pending", in Photos we have image_id instead video_id and in function)

After standard OAuth token procedure

Adding new video

Request:

$result = $DVIP->get('/videos/add-video', array('user_id' => 123, 'url' => 'http://example.com/path/to/some/video/file.ext'));

Supported extension: mp4, flv, ogv, webm, avi, mpeg, mp4, ...

Optional query string parameters:

  • gallery_id (default gallery_id = 1)
  • caption (default caption = "")

Photos only:

  • set_avatar (default 0) - If this is 1 avatar will be generated from uploaded image

Return Values

Example of success (returning new video_id):

{
  "success": 1,
  "data":
  {
    "video_id": 4
  }
}

Example of fail (returning some error):

{
  "success": 0,
  "errors":
  {
    0: "URL is required"
  }
}

Updating video caption

Request:

$result = $DVIP->get('/videos/update-video', array('user_id' => 123, 'video_id' => 456, 'caption' => 'New Caption'));

Optional query string parameter:

  • gallery_id (default gallery_id = 1)

Example of success:

 {
	"success" : 1,
 }

Example of failure (returning some error):

{
	"success" : 0,
	"errors" :
	{
		0 : "video_id is required"
	}
}

Deleting video

Request:

$result = $DVIP->get('/videos/delete-video', array('user_id' => 123, 'video_id' => 456));

Optional query string parameter:

  • gallery_id (default gallery_id = 1)

Example of success

{
	"success": 1
}

Example of fail (returning some error):

{
	"success" : 0,
	"errors" :
	{
		"0": "video_id is required"
	}
}

Get video info

Request:

$result = $DVIP->get('/videos/get-video', 'user_id' => 123, 'video_id' => 456));

Optional query string parameters:

  • gallery_id (by default gallery_id = 1)

Example of success (returning video info):

  {
  	"success" : 1,
  	"data" :
  	{
	    "user_id": "6",
	    "gallery_id": "1",
	    "video_id": "30",
	    "comment": "",
	    "version": "0",
	    "adult": "0",
	    "status": "waiting for encoder",
	    "converted": "0"
	}
  }

Example of fail (returning some error):

{
	"success" : 0,
	"errors" :
	{
		"0": "Video not exist"
	}
}

Adding new video gallery

Request:

$result = $DVIP->get('/videos/add-gallery', array('user_id' => 123, 'title' => 'Gallery Title'));

Optional query string parameters:

  • description (default description is "")
  • access (by default is 0)

Example of success (returning new gallery_id):

{
	"success" : 1,
	"data" :
	{
		"gallery_id": 103
	}
}

Example of fail:

{
	"success" : 0,
	"errors" :
	{
		"0": "title is required"
	}
}

Update gallery

Request:

$result = $DVIP->get('/videos/update-gallery', array('user_id' => 123, 'gallery_id' => 456));

+ title, description, access (depending on what you want to update)

Example of success:

{
	"success: 1
}

Example of fail:

{
	"success" : 0,
	"errors" :
	{
		"0": "gallery_id is required"
	}
}

Deleting gallery

Request:

$result = $DVIP->get('/videos/delete-gallery', array('user_id' => 123, 'gallery_id' => 456));

Example of success:

{
	"success: 1
}

Example of fail:

{
	"success" : 0,
	"errors" :
	{
		"0": "gallery_id is required"
	}
}

Get Gallery Info

Request:

$result = $DVIP->get('/videos/get-gallery', array('user_id' => 123, 'gallery_id' => 456));

Example of success:

  {
  	"success" : 1,
  	"data" :
  	{
	    "user_id": "6",
	    "gallery_id": "456",
	    "access": "0",
	    "title": "Awesome",
	    "description": ""
	}
  }

Example of fail:

{
	"success" : 0,
	"errors" :
	{
		"0": "gallery_id is required"
	}
}
Last Author
boris
Last Edited
Jun 15 2016, 15:59

Event Timeline

boris moved this document from Unknown Object (Phriction Wiki Document).Jun 15 2016, 15:42
boris changed the visibility from "All Users" to "Public (No Login Required)".
boris shifted this object from the Restricted Space space to the S6 Everyone space.Aug 8 2018, 08:11