KanbanSolutions / jquery-brightcove

Brightcove MAPI wrapper for jQuery that helps you create custom dynamic solutions that work with the Brightcove Video platform.
MIT License
5 stars 3 forks source link

Limited documentation #1

Open iondisc opened 11 years ago

iondisc commented 11 years ago

The first example shows how to pull all videos. It's great, works but doesn't show an example of how to make a query like find_video_by_reference_id(). I would love further details in how this plug-in is mapped to the brightcove API.

djgilcrease commented 11 years ago

You use the data-brightcove-command="..." to specify the brightcove method you wish to use data-brightcove-arg-name="..." is the name of the required brightcove argument for your selected method data-brightcove-arg-value="..." is the value of the brightcove argument you are passing in.

Also it maps to

$.brightcove.<brightcove method name>

eg

$.brightcove.find_video_by_reference_id('1234f'); // returns a jQuery Promise so you can do

$.brightcove.find_video_by_reference_id('1234f').done(function(data) {
    //Do something with the API
}).fail(function(data) {
    //handle the error
});
iondisc commented 11 years ago

I have assumed this and when I run that type of command I get this error: Sys.ParameterCountException: Sys.ParameterCountException: Parameter count mismatch.