Music
Video
Soft
6
You can add site with direct links to mp3, just click on "Add Site" on the bottom of the page.
Next tip Hide tips
{"6":"You can add site with direct links to mp3, just click on \"Add Site\" on the bottom of the page.","7":"Tagoo can search audio books as well. For example <a href=\"\/en\/search.php?search=killford+saymak\">\"my life\"<\/a>.","8":"Tagoo can search podcasts and conferences: For example: <a href=\"\/en\/search.php?search=open+source\">\"open source\"<\/a>","9":"Found required performer or album in search results? Click on it and you will get the results that are connected to him or her.","12":"If you do not know what to listen, visit our widget <a href=\"\/en\/play_moody.php\">TagooMoody - radio on the mood<\/a>.","13":"You can create your own playlists by clicking on \u201cMy playlists\u201d. While using playlists you can add songs to them, change order of the songs and upload covers to your playlists","14":"Once you have created your playlist at home, you always can listen to it at work or at your friend\u2019s party. From now on you have your mp3 collection with you.","2":"Use advanced search in order to make your search results more precise.","3":"If you do not know precise name of the performer, try to type only first letters and you will see all the possible variants."}

Tagoo AJAX API

In order to use our parners' search you have to sign in.

Conditions of use API


Attention, Tagoo AJAX API usage is possible under the following terms:

  1. Partner should have Tagoo account and partner key.
  2. Partner should register their domains, from which AJAX queries would be sent.
  3. Queries to API should be only in AJAX (for server queries use XML API).
  4. The presence of link to and logo of Tagoo near the search bar is a must (see widgets) If API is used without search bar, link and logo should be at the bottom of the page.
  5. Caching of search results is not recommended (in cases of clear abuse is prohibited and will be imposed by ban), as media search results are really dynamic.
  6. The number of queries per day should not exceed 3000. If you need greater number of queries, please contact us and we will discuss your special terms of service.

Sending queries to media search engine Tagoo in some other ways is prohibited without the prior consent of Tagoo.

Ready code


Audio widget Video widget

Widget example Widget example

Documentation


Search API

// Audio search
object tagoo_audio_search
// Video search
object tagoo_video_search
	// Both classes have the same methods to search
	// Arguments: key, query, on_page - number of elements on page, onload - downloading callback, page
	// 	on_page, onload, page - optional
	this.search = function(key, query[, on_page, onload, page])
	// Downloading of data
	// Arguments: arguments - named array of arguments (object), onload - callback(data)
	this.load_json = function(arguments[, onload]) 


Example of JSON structure of search results

In response you can get something like this:

{ "data" : [ {
        "album" : "",
        "artist" : "V/Vm Test Records",
        "bitrate" : "128000",
        "file_link_text" : "Vvm_Chicken_Test-001..>",
        "file_link_title" : "",
        "file_name" : "Vvm_Chicken_Test-001",
        "file_url" : "http://noneinc.com/sound/Test/Test/Vvm_Chicken_Test-001.mp3",
        "fileformat" : "mp3",
        "filesize" : "4068270",
        "genre" : "Easy Listenin",
        "page_description" : "",
        "page_keywords" : "",
        "page_title" : "Index of /sound/Test/Test",
        "page_url" : "http://noneinc.com/sound/Test/Test/",
        "playtime" : "00:04:14",
        "playtime_sec" : "254",
        "title" : "V/Vm Chicken Test 001",
        "year" : "0"
      } ],
  "last_sid" : 145454,
  "on_page" : 1,
  "page" : 2,
  "page_count" : 100,
  "query" : "test",
  "total" : 100
}

Initialization

function tagoo_init(funcs)
funcs — function which is summoned after the complete upload of the page
funcs — this is array of functions which are summoned by turns
funcs — [[func_name, [args]], ...]

tagoo_init — Used for addition of the event after upload of the pages finishes (where partners' block is situated).

Examples
tagoo_init(audio_widget);
tagoo_init([audio_widget, video_widget]);
tagoo_init([
	[audio_widget, some_var], 
	video_widget]);
tagoo_init([
	[audio_widget, [some_var1, some_var2]], 
	video_widget]);

Other objects

// uploader
object ajax_loader
	// upload using ajax
	this.load = function(url, success, error)
	// upload in tag <script> and run 
	this.load_script = function(url[, onload, charset]) 

// functions-helpers object tagoo_helpers // turns bytes to megabytes mbytes: function(bytes) // cuts string and adds add at the end cut_string: function(str[, number=30, add = '...']) // tagfilter: function(str) // cuts space symbols on the edge of the string trim: function(str) // adds an event to the element add_event: function(elem, type, handle) // gets element of the form get_by_name: function(form, name) // get tag from the object (first ensnared) get_by_tag_name: function(root, tag) // get object with class class get_by_class: function(root, class) // create css rules. arr = [[selector, declaration], …] create_css: function(arr[, add_sel]) // the following functions speak for themselves create_div, create_span, create_ordered_list, create_list_item, create_form, create_table, create_table_row, create_table_cell, create_input, create_link, create_div_link, create_image // removes the element child remove_child: function(parent, child) // set the class of the element set_class: function(el, className)
// basic widget class object tagoo_search_control(root, key, type[, options]) // widget generation with the ability to set query render: function([query]) // set query (but do not send it) set_query: function([query]) // returns current query get_query: function() // send query to the server submit: function([query]) // set options set_options: function(options)

Options

function set_options(options) — class function tagoo_search_control and its heirs (tagoo_audio_search_control, tagoo_video_search_control), where options — object of required values for redefining.

Language

lang — possible values: ru, en, de

Load/reload

function onload — summoned once only during first uploadвызывается единожды при первой загрузке

function onload_args — arguments transfered to function onload

function onreload — summoned during every upload, but first

function onreload_args — arguments transfered to function onreload

Maximum page

int max_page — the ability to prohibit showing too many pages If max_page = 1, then paginal navigation will not be shown

The number of elements per page (audio)

int on_page — the number of elements in search results per page ( 1<on_page<21 )

The number of rows and columns (video)

int rows — rows
int cols — columns

Substitution of random query

boolean auto_result — substitution of random query when one tries to send a blank request. Default — true

Styles

Property object styles containing object

Example
<script>
var audio = new tagoo_audio_search_control('tagoo_audio_block', '<key>');
var options = {
	on_page: 17, 
	onload: fir_load, 
	onreload: myonload, 
	auto_result: false
	};
audio.set_options(options);
audio.render('Prodigy');
var video = new tagoo_video_search_control('tagoo_video_block', '<key>');
var options = {
	cells: 1, 
	rows: 7, 
	max_page: 1,  
	onreload: myonload,
	lang: 'en',
	styles: {'link_color': '#00f'}
	};
video.set_options(options);
video.render('Ubuntu');
var myonload = function(){/*...*/}
</script>
<div id="tagoo_audio_block"></div>
<div id="tagoo_video_block"></div>

Styles settings

Default colours:

	// text colour
	text_color: '#6C6C6C',
	// mp3 links colour
	link_color: '#FD7C11',
	// links to suorce pages colour
	page_found_link_color: '#008800',
	// paginal navigation colour
	pages_link_color: '#c1c1c1',
	// current page colour
	pages_sel_link_color: '#FF9E00',
	// paginal navigation link colour, mouse on
	pages_hover_link_color: '#fff',
	// paginal navigation background colour, mouse on
	pages_hover_bg_link_color: '#FF9E00'

You can reset enay of them, to do that call method of the widget object set_options and transfer to it options parameter

var options = {
	styles: {
		text_color: '#000',
		link_color: '#900'
		/*...etc.*/
	}
};

Additional features

You can set styles via assignment of tags <style> or involvement of inner styles with the help of <link>. However you have to be careful, as styles which were set by us in our widgets are considered to be "more important" than yours, and you will have to add "!important" to some properties after setting its value. We advise you to always do it .


Code style

The following rules of code writing are complied

  • coding style — C: lower case, underscore — divider in the names of variables, functions, etc.
  • all the objects, methods and variables have the prefix "tagoo_"