Page MenuHomePhabricator

Expose conduit API methods for Phurl URLs
ClosedPublic

Authored by jcox on Sep 27 2016, 2:34 PM.
Tags
None
Referenced Files
F14033710: D16600.id39962.diff
Sat, Nov 9, 7:36 PM
F14031978: D16600.diff
Sat, Nov 9, 12:27 PM
F14010704: D16600.diff
Thu, Oct 31, 11:53 AM
F13993704: D16600.id39961.diff
Wed, Oct 23, 12:49 AM
F13966940: D16600.id39967.diff
Oct 16 2024, 10:36 AM
F13966354: D16600.id39967.diff
Oct 16 2024, 7:43 AM
F13963101: D16600.id39962.diff
Oct 15 2024, 2:00 PM
F13962912: D16600.id39963.diff
Oct 15 2024, 12:56 PM

Details

Summary

Fixes T10681. Adds a search API endpoint and an edit API endpoint for Phurl URLs. I still need to add the ability to search by name, alias, URL, and maybe description.

Test Plan

Test the methods through /conduit/method/phurls.search/ and /conduit/method/phurls.edit/

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jcox retitled this revision from to Expose conduit API methods for Phurl URLs.
jcox updated this object.
jcox edited the test plan for this revision. (Show Details)
jcox edited edge metadata.
epriestley added a reviewer: epriestley.
epriestley added inline comments.
src/applications/phurl/conduit/PhabricatorPhurlURLEditConduitAPIMethod.php
17

By convention, prefer capitalizing application names ("Phurl").

src/applications/phurl/storage/PhabricatorPhurlURL.php
236

We don't actually return the short URL anywhere, but it seems possibly useful? Maybe:

'urls' => array(
  'long' => $this->getLongURL(),
  'short' => $this->getRedirectURI(),
),

Although you'll need to fiddle with getRedirectURI() to make sure it always has a protocol/domain, since it currently won't if phurl.short-uri is unconfigured.

This revision is now accepted and ready to land.Sep 27 2016, 3:45 PM
jcox edited edge metadata.

Added ability to search by URL name substring

(That ngrams stuff looks right to me, too.)

Added short URL to results

Make getRedirectURI always have a domain

This revision was automatically updated to reflect the committed changes.