search
Search Lyrics for given artist & song title
/search
Usage and SDK Samples
curl -X GET\
-H "Accept: application/json"\
"https://lyrics.lewagon.ai/search?artist=&title="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
String artist = "The Beatles"; // String | Artist of the song
String title = "Come Together"; // String | Title of the song
try {
Response result = apiInstance.search(artist, title);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#search");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String artist = "The Beatles"; // String | Artist of the song
String title = "Come Together"; // String | Title of the song
try {
Response result = apiInstance.search(artist, title);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#search");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *artist = "The Beatles"; // Artist of the song (default to null)
String *title = "Come Together"; // Title of the song (default to null)
// Search Lyrics for given artist & song title
[apiInstance searchWith:artist
title:title
completionHandler: ^(Response output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var LeWagonLyricsApi = require('le_wagon_lyrics_api');
// Create an instance of the API class
var api = new LeWagonLyricsApi.DefaultApi()
var artist = "The Beatles"; // {String} Artist of the song
var title = "Come Together"; // {String} Title of the song
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.search(artist, title, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class searchExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var artist = "The Beatles"; // String | Artist of the song (default to null)
var title = "Come Together"; // String | Title of the song (default to null)
try {
// Search Lyrics for given artist & song title
Response result = apiInstance.search(artist, title);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.search: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$artist = "The Beatles"; // String | Artist of the song
$title = "Come Together"; // String | Title of the song
try {
$result = $api_instance->search($artist, $title);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->search: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $artist = "The Beatles"; # String | Artist of the song
my $title = "Come Together"; # String | Title of the song
eval {
my $result = $api_instance->search(artist => $artist, title => $title);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->search: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
artist = "The Beatles" # String | Artist of the song (default to null)
title = "Come Together" # String | Title of the song (default to null)
try:
# Search Lyrics for given artist & song title
api_response = api_instance.search(artist, title)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->search: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let artist = "The Beatles"; // String
let title = "Come Together"; // String
let mut context = DefaultApi::Context::default();
let result = client.search(artist, title, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Query parameters
Name | Description |
---|---|
artist* |
String
Artist of the song
Required
|
title* |
String
Title of the song
Required
|