Page MenuHomePhabricator

Expose conduit API methods for Phurl URLs
ClosedPublic

Authored by jcox on Sep 27 2016, 2:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 10:36 AM
Unknown Object (File)
Thu, Dec 12, 2:29 AM
Unknown Object (File)
Wed, Dec 11, 10:42 PM
Unknown Object (File)
Wed, Dec 11, 11:34 AM
Unknown Object (File)
Mon, Dec 9, 8:57 AM
Unknown Object (File)
Sun, Dec 8, 10:52 PM
Unknown Object (File)
Sun, Dec 8, 1:39 PM
Unknown Object (File)
Fri, Dec 6, 6:02 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 13855
Build 17923: Run Core Tests
Build 17922: 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.