Differential D25018 Diff 57 src/applications/legalpad/conduit/LegalpadDocumentSearchConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/conduit/LegalpadDocumentSearchConduitAPIMethod.php
- This file was added.
<?php | |||||
final class LegalpadDocumentSearchConduitAPIMethod | |||||
extends PhabricatorSearchEngineAPIMethod { | |||||
speck: I believe there's a `getApplication()` function that should be overridden to associate these… | |||||
Done Inline ActionsgetApplication is implemented by PhabricatorSearchEngineAPIMethod: rP src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php:29-33 getMethodDocumentation and getMethodDescription are also implemented automatically in PhabricatorSearchEngineAPIMethod. It doesn't look to me like they're overridden by any of the other subclasses of PhabricatorSearchEngineAPIMethod? roguelazer: `getApplication` is implemented by `PhabricatorSearchEngineAPIMethod`: {src rP… | |||||
Not Done Inline ActionsThanks for checking. Does the conduit page for these new apis identify the search criteria (constraints?) that can be used? If so then this is probably all connected via some reflection. speck: Thanks for checking. Does the conduit page for these new apis identify the search criteria… | |||||
Done Inline Actionsroguelazer: It does:
{F14208} | |||||
Not Done Inline ActionsAh thanks! speck: Ah thanks! | |||||
public function getAPIMethodName() { | |||||
return 'legalpad.document.search'; | |||||
} | |||||
public function newSearchEngine() { | |||||
return new LegalpadDocumentSearchEngine(); | |||||
} | |||||
public function getMethodSummary() { | |||||
return pht('Read information about legalpad documents.'); | |||||
} | |||||
} |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
I believe there's a getApplication() function that should be overridden to associate these APIs with the Legalpad application. Doing so will cause the APIs to require access to the Legalpad application by the accessor/viewer.
Additionally is there a way to provide more information about search constraints for these apis, a la getMethodDocumentation()?