Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F31673889
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Addshore
Mar 10 2020, 8:41 AM
2020-03-10 08:41:11 (UTC+0)
Size
784 B
Referenced Files
None
Subscribers
None
raw.txt
View Options
<?php
// TODO in namespace namespace Wikibase\Repo\FederatedProperties; ?
namespace Wikibase\Repo\Api;
use Wikibase\Repo\FederatedProperties\GenericActionApiClient;
class ApiEntitySearchHelper implements EntitySearchHelper {
/**
* @var GenericActionApiClient
* @todo inject me
*/
private $api;
/**
* @inheritDoc
*/
public function getRankedSearchResults( $text, $languageCode, $entityType, $limit, $strictLanguage ) {
// https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities
$params = [
'search' => $text,
'language' => $languageCode,
'type' => $entityType,
'limit' => $limit,
'strictlanguage' => $strictLanguage,
];
$result = $this->api->get($params);
// TODO make an array of TermSearchResult objects from $result
}
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8347083
Default Alt Text
raw.txt (784 B)
Attached To
Mode
P10672 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment