Skip to content

Convert Dash-Cased Parameters to CamelCase in getPageInlineComments #60

Closed
@MrRefactoring

Description

@MrRefactoring

In the getPageInlineComments function, parameters with a dash (-) are used. The proposal is to replace these dash-cased parameters with camelCase.

The function currently looks like this:

async getPageInlineComments<T = Models.Pagination<Models.PageInlineComment>>(
  parameters: Parameters.GetPageInlineComments,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/pages/${parameters.id}/inline-comments`,
    method: 'GET',
    params: {
      'body-format': parameters['body-format'],
      sort: parameters.sort,
      cursor: parameters.cursor,
      limit: parameters.limit,
      'serialize-ids-as-strings': true,
    },
  };

  return this.client.sendRequest(config, callback);
}

Expected function look:

async getPageInlineComments<T = Models.Pagination<Models.PageInlineComment>>(
  parameters: Parameters.GetPageInlineComments,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/pages/${parameters.id}/inline-comments`,
    method: 'GET',
    params: {
      'body-format': parameters.bodyFormat,
      sort: parameters.sort,
      cursor: parameters.cursor,
      limit: parameters.limit,
      'serialize-ids-as-strings': true,
    },
  };

  return this.client.sendRequest(config, callback);
}

Metadata

Metadata

Assignees

Labels

enhancementDenotes a suggestion or request aimed at improving or adding new features to the projectgood first issueHighlights beginner-friendly tasks, ideal for those looking to contribute for the first timehelp wantedSignals that additional assistance or expertise is needed on a particular issue or feature

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions