Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the v1 vanity API #31

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Use the v1 vanity API #31

merged 2 commits into from
Jun 21, 2024

Conversation

aronatkins
Copy link
Contributor

Builds upon #30 (for passing CI)

The v1 vanity API is available in all supported Connect versions. No need to fall-back to the unversioned API path.

Fixes #29

@aronatkins aronatkins linked an issue Jun 21, 2024 that may be closed by this pull request
Comment on lines +114 to +117
public async setContentVanityURL (contentGUID: string, vanityURL: string): Promise<VanityRecordResponse> {
return await this.client.put(
`v1/content/${contentGUID}/vanity`,
{ path: vanityURL }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nit, but it should be... based on convention

Suggested change
public async setContentVanityURL (contentGUID: string, vanityURL: string): Promise<VanityRecordResponse> {
return await this.client.put(
`v1/content/${contentGUID}/vanity`,
{ path: vanityURL }
public async setContentVanityURL (contentGuid: string, vanityUrl: string): Promise<VanityRecordResponse> {
return await this.client.put(
`v1/content/${contentGuid}/vanity`,
{ path: vanityUrl }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local convention uses names like baseURL and already used vanityURL. There are a couple "GUID" references and they're appGuid, but many appID. I did not notice the appGuid and thought I was following convention by uppercasing initialisms (URL, GUID).

@meatballhat - do you have a preference on naming convention?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no worries then. Should keep it as is if the rest of the project is using that by convention.

Base automatically changed from aron-passes-for-me to main June 21, 2024 15:31
@aronatkins aronatkins merged commit efa94f0 into main Jun 21, 2024
2 checks passed
@aronatkins aronatkins deleted the aron-v1-vanity branch June 21, 2024 16:28
aronatkins added a commit that referenced this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use public vanity API
2 participants