Page MenuHomePhabricator

Expose conduit API methods for Phurl URLs
ClosedPublic

Authored by jcox on Sep 27 2016, 2:34 PM.
Tags
None
Referenced Files
F13135893: D16600.diff
Thu, May 2, 11:16 AM
Unknown Object (File)
Mon, Apr 29, 2:48 PM
Unknown Object (File)
Sun, Apr 28, 12:38 PM
Unknown Object (File)
Thu, Apr 25, 7:07 PM
Unknown Object (File)
Thu, Apr 25, 7:06 PM
Unknown Object (File)
Thu, Apr 25, 7:06 PM
Unknown Object (File)
Thu, Apr 25, 7:06 PM
Unknown Object (File)
Thu, Apr 25, 7:06 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
Branch
PhurlConduitAPI
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13851
Build 17916: Run Core Tests
Build 17915: arc lint + arc unit

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.