Skip to content

Convert Dash-Cased Parameters to CamelCase in getPagesInSpace #75

@MrRefactoring

Description

@MrRefactoring

In the getPagesInSpace 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 getPagesInSpace<T = Models.Pagination<Models.Page>>(
  parameters: Parameters.GetPagesInSpace,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/spaces/${parameters.id}/pages`,
    method: 'GET',
    params: {
      status: parameters.status,
      'body-format': parameters['body-format'],
      cursor: parameters.cursor,
      limit: parameters.limit,
      'serialize-ids-as-strings': true,
    },
  };

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

Expected function look:

async getPagesInSpace<T = Models.Pagination<Models.Page>>(
  parameters: Parameters.GetPagesInSpace,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/spaces/${parameters.id}/pages`,
    method: 'GET',
    params: {
      status: parameters.status,
      'body-format': parameters.bodyFormat,
      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