Navigator

Developer
Developer's Guide: .NET 
The Weedioh! Data API allows client applications to retrieve and update Weedioh!. Your client application can use the Weedioh! Data API to fetch video feeds, comments, responses, and playlists, as well as query for videos that match particular criteria. You can also use the API to make authenticated requests to modify this information and to upload new video content to the site. In addition to providing some background on the capabilities of the Weedioh! Data API, this document provides examples for interacting with the API using the .NET client library. For help setting up the .NET client library, check out the Getting Started Guide.

About this document

Audience 

This document is intended for programmers who want to write client applications that can interact with Weedioh! using the .NET client library. It provides a series of examples of basic data API interactions.

For Weedioh! Data API reference information, including expected latencies for data updates, please see the reference guide.

This document assumes that you are familiar with the .NET framework and know C#. For reference information about the .NET classes and methods, see the .NET client library API reference.

Document structure 


This document contains the following sections:

• The Authentication section describes the authentication methods available for associating API operations with a specific user account. Throughout this document, the explanations of specific API functions will clearly indicate whether the function requires user authentication. In general, all requests that modify video or feed data need to be authenticated. Read-only requests to retrieve public videos do not require authentication.

• The Understanding video feeds and entries section provides a sample API response and explains how to extract information about a single video from a list of videos or a set of search results. This section also explains how to access metadata about a specific video entry.

• The Retrieving and searching for videos section explains how to fetch a list of videos. The Weedioh! Data API defines several types of standard feeds, such as top-rated or most-viewed videos. This section explains how also to retrieve a list of videos uploaded by a specific user or a list of related videos. Finally, this section explains how to use the API to let users search through Weedioh!'s video library for videos matching specific search terms or categories.

• The Uploading videos section briefly explains ways that you can allow users to upload videos to Weedioh! from your application. This section also explains how to let users delete videos from your application. These solutions are explained in more detail in the Protocol Guide. You may need to let users upload videos to use certain other API functions. For example, the API provides a function for adding a video response to a video.

• The Updating and deleting videos section describes how to use the API to update information about a Weedioh! video. It also describes how a video can be removed using the API.

• The Using community features section describes API functions that allow your users to interact with Weedioh! videos. These functions explain requests for posting a rating, comment, video response or complaint to an existing video. You can also use the API to retrieve lists of video comments or video responses or to delete a video response.

• The Saving and collecting videos section explains how to use the API to access, create and update favorite videos, video playlists and subscriptions to Weedioh! channels. It also explains how to modify video playlists and favorites by adding and removing videos.

• The Enabling user interaction section explains how to use the API to retrieve and update user profiles. This section also explains how to retrieve, add, update and delete user contacts as well as how to retrieve, send and delete messages. 

Getting started

For help setting up the .NET client library, check out the Getting Started Guide. The .NET client library requires the .NET 2.0 runtime. After downloading the DLL that you need to get started in the distribution's bin subdirectory.

To compile the example snippets provided in this document into your own code, you will need to use the following using statements:

using WeediohApi;

To upload/retriev a video , you must construct a new Weedioh!Entry object that contains metadata about the video 

WeediohApi.WeediohApi WeediohVideo = new WeediohApi.WeediohApi();

User Authentication

The .NET client library can be used to retrieve public feeds or to execute authenticated operations. All public feeds are read-only and do not require any authentication. Authenticated operations, on the other hand, include the retrieval of private feeds, such as a user's inbox feed, as well as write, upload, update and delete operations. You will need to sign up .

The sample code below demonstrates how to create new Weedioh! User.

WeediohVideo.CreateNewUser(string ApiKey,string EmailId, string Password)

And For checking valid User

WeediohVideo.CheckValidUser(string ApiKey,string EmailID, string Password)

Retrieving Popular Videos

The following code shows how to retrieve and print information about the Popular Videos

WeediohVideo.GetPopularVideo(string ApiKey, int VideoCategory)

Retrieving Recent Videos

The following code shows how to retrieve and print information about the Recent Videos

WeediohVideo.GetRecentVideo(string ApiKey, int VideoCategory)

Retrieving a specific video

The following code retrieves a Video object, which corresponds to a particular Weedioh! video, and then prints the metadata for the video

WeediohVideo.GetParticulrVideo(string ApiKey,int VideoId)

Retrieving all videos by user

The sample code below demonstrates how to get all videos which uploaded by user.

WeediohVideo.getVideoByUser(string ApiKey,string EmailID, string Password)

Video contents

A Video object, which corresponds to an entry in an Atom feed, contains many different pieces of metadata about a video, ranging from video player URLs to thumbnail images to details like the video's duration and keywords.

The following code demonstrates how to print a variety of details about a video. For a complete list of all of the information that a Weedioh! object contains.

Feed Name Feed Identifier
Video ID VideoId
User Name UserName
User Profile Image UserImage
Video Tag Tag
Video Title Title
Video Description Description
Video Category Category
Video Privacy Privacy
Video Source Src
Thumbnail image Image
Video's duration Time
Total View TotalView
Date CreatedDate

Searching for videos using categories ,keywords and title

The Weedioh! Data API lets you request a set of videos that match a particular search term. The API supports a variety of standard Weedioh! Data query parameters and custom parameters specifically related to video search. For example, you can search for videos uploaded by a particular author or videos associated with a particular Weedioh! category.

To execute a search request, you will create a Weedioh!Query object that specifies your search criteria and pass that object to the Weedioh! GetVideoBySearch() method.

You can restrict search results to show only videos that match a given set of categories,title and/or keywords. Each video can have many keywords but can only be associated with one Weedioh! category.

WeediohVideo.GetSearchVideo(string ApiKey, string Key)

Uploading Video


To upload a video, you must construct a new Weedioh!Entry object that contains metadata about the video. The following example shows how to upload the Quicktime video "file.mov" to Weedioh! with the following properties:

Property Value Title My Test Movie Category Autos Keywords cars, funny Description My description Video privacy? 0(private) or 1(public) Developer tag mydevtag,Filename file.mov File.

WeediohVideo.UploadFile(string ApiKey,string filePath, string EmailID, string Password, string Title, string Tag, string Category, string Description, int Privacy)

You must provide the following fields for all uploaded videos: • Title • Description • Category • Keywords • Privacy(private-0,public-1)

Updating video information

To modify the metadata for a video, update the Video object and then use the EditParticulrVideo method. The following code demonstrates how to update the video's description.

WeediohVideo.EditParticulrVideo(string ApiKey,string EmailId, string Password, int VideoId,string Title, string Tag, string Category, string Description, int Privacy)

Add video Category

The following code creates a Video Category.

WeediohVideo.InsertVideoCategory(string ApiKey, string VideoCategory, string Category)


Get video Category


The sample code below demonstrates how to get all Category of videos.

WeediohVideo.GetVideoCategory(string ApiKey, int VideoCategory)


Add to Favourite


The sample code below demonstrates how to add Favourite for particular user.

WeediohVideo.InsertVideoFavourite(string ApiKey, int VideoID, string EmailId, string Password)

Retrieving all Favourite videos by User

The sample code below demonstrates how to get all Favourite videos which uploaded by user.

WeediohVideo.GetVideoByUserFavourite(string ApiKey, string EmailId, string Password)


Adding video likes/dislies


The sample code below demonstrates how to add like(1) or dislike(0) for particular video by user.

WeediohVideo.InsertVideoLikeDisLike(string ApiKey, int VideoID, string EmailId, string Password, int Like)

Note: Replace like with 1(like) or 0(dislike).


Retrieving  like/dislike videos
 

To get No of likes/dislikes for particular video,use below code.

WeediohVideo.GetVideoLike(string ApiKey, int VideoID, int Like)

Note: Replace like with 1(like) or 0(dislike).


Retrieving a specific video Survey


The following code retrieves a Video Survey, which corresponds to a particular Weedioh! video.

WeediohVideo.GetVideoSurvey(string ApiKey, int QuestionId)


Retrieving a specific video Survey Result

The following code retrieves a Video Survey Result, which corresponds to a particular Weedioh! video.

WeediohVideo.GetVideoSurveyVoteResult(string ApiKey, int QuestionId)


Voting a specific video Survey

The following code adding vote for particular Survey of video.

WeediohVideo.InsertVideoSurveyVote(string ApiKey, int QuestionId, int AnswerId)


Add to Flag(Inappropriate)

The sample code below demonstrates how to Mark as Inappropriate Video.

WeediohVideo.InsertVideoFlag(string ApiKey, int VideoID, string EmailId, string Password, int Flag)

Note: Change Flag by 1;


Deleting a video


To delete a video, invoke the DeleteVideoByUser method. For example, you could retrieve the uploaded videos feed for the authenticated user and then delete a video selected by the user.

WeediohVideo.DeleteVideoByUser(string ApiKey,string EmailId, string Password, int VideoID)

Note: The authenticated user must be the owner of the video that is being deleted.

Comments

A comment is a text response to a video. Logged-in users can add comments to a video but cannot modify or delete those comments. Typically, a user would add a comment to a video after watching that video.

WeediohVideo.AddCommentByUser(string ApiKey,string EmailId, string Password, int VideoID)

Retrieving video comments

The following code demonstrates how to retrieve the comments from a Video object and then print the comments for the video.

WeediohVideo.GetComments(string ApiKey,int VideoID)


Analytics..................................................


Retrieving all videos Summary


The following code demonstrates how to retrieve the Summary(Analytics) of Video.

WeediohVideo.GetAllVideoSummaryAnalytics(string ApiKey, string EmailId, string Password)

example:


 
Retrieving all videos Summary by user

The following code demonstrates how to retrieve the Summary(Analytics) of Video by particular user.

WeediohVideo.GetMyVideoSummaryAnalytics(string ApiKey, string EmailId, string Password)


Retrieving all citys Summary by particular video


The following code demonstrates how to retrieve the Summary(Analytics) of citys by particular video.


WeediohVideo.GetVideoCityAnalytics(string ApiKey, int VideoId)


example:



Retrieving all visitors Summary by particular video


The following code demonstrates how to retrieve the Summary(Analytics) of visitors by particular video.

WeediohVideo.GetVideoVisitorAnalytics(string ApiKey, int VideoId)

example:



Analytics video contents


A Video object, which corresponds to an entry in an Atom feed, contains many different pieces of metadata about a video analytics.

The following code demonstrates how to print a variety of details about a video analytics. For a complete list of all of the information that a Weedioh! object contains.

Feed Name Feed Identifier
Visitor Name Visitor
Visitor EmailAddres EmailAddres
Video ID VideoId
Video Title Title
No of View View
No of Reply Reply
Like (Yes/No - for  particular visitor) Like
No of Like Like
Dislike (Yes/No - for  particular visitor) Dislike
No of Dislike Dislike
Favorites (Yes/No - for  particular visitor) Favorites
No of Favorites Favorites
City Name City
No of City City
No of Unique Visitors Unique
Inappropriate (Yes/No - for  particular visitor) Inappropriate
No of Inappropriate Inappropriate
LastVisit LastVisit


 
 category shortcuts
Travel & Events Style Science & Tech Channels
Comedy Music Automobile Classifieds
Education News Arts Coupons
Gaming People Health Contests
Food Sports Directory Opinions
 
Search Videos
 
Connect with us
Contact Us