56 development platform SDKV3beta1
1. File Structure Description
| ~ Demo /// some practical examples for storing this folder
| ~ Example of plugin // plugin Upload plug-in
|-Custom. php
|-CustomEasy. php
| '-Upload. php
|-Example. php // A simple Example
| '-Open. php // This file encapsulates the usage of all interfaces.
| + User // stores interfaces of the User class
| + Video // an interface for storing videos
|-ApiAbstract. php // interface base class
| '-Conf. php // configuration file, modify appkey and other information
2. configure your personal configuration
Return array (
'Is _ developer' => true, // required. whether to enable the php error prompt. in the official environment, remember to change this to false.
'Appkey' => '', // it must be changed. you have applied the corresponding appkey on the 56 development platform.
'Secret' => '', // it must be changed. you have applied the corresponding secret on the 56 development platform.
'Domain '=> 'http: // oapi.56.com', // default, no need to change
'Token' => '', // optional, in some interfaces need to use token is written, token acquisition method http://dev.56.com/wiki/doc-view-7.html 'test _ user_id '=> '', // Optional. the personal user id must be input for testing.
);
3. a simple interface example
// Introduce the usage class file that encapsulates all interfaces
Require_once dirname (_ FILE _). '/Open. php ';
$ Params = array (
'CID' => 2,
'Page' => 1,
'Num' => 10,
);
// If the parameter is not input, use the data in the demo.
Open: Video_Hot ($ params );
4. Interface overview
4.1. data type:
User_UserVideos // get the user's uploaded video
User_UserProfile // obtain the user's personal information
User_UserComment // get the user's comment or video comment
User_AppVideos // get the video uploaded by the app
Video_GetVideoInfo // get the video information
Video_Search // obtain the search result based on the keyword
Video_Update // interface for obtaining updated video information
Video_Channel // obtain the video from the Channel
Video_Recommend // the video that gets the recommendation Channel
Video_Hot // get popular videos on the 56 homepage
Video_RecAlbum // Obtain the recommended album video from the 56 network yesterday or one day
4.2. Upload class:
SDK/demo/plugin/
├ ── CustomEasy. php // simple Upload class. you only need to submit the video.
── Custom. php // custom Upload class. you can customize the upload frame style. you must enter the title, description, and label when uploading a video.
── Upload. php // simple upload class. you must enter the title, description, and tag when uploading a video.
1.
[Code][PHP] code
2, 'page' => 1, 'num' => 10,); Open: Video_Hot ($ params);?>