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

Convert Dash-Cased Parameters to CamelCase in getFooterCommentVersions #81

Closed
Tracked by #43
MrRefactoring opened this issue Jun 23, 2023 · 1 comment · Fixed by #90
Closed
Tracked by #43

Convert Dash-Cased Parameters to CamelCase in getFooterCommentVersions #81

MrRefactoring opened this issue Jun 23, 2023 · 1 comment · Fixed by #90
Assignees
Labels
enhancement Denotes a suggestion or request aimed at improving or adding new features to the project good first issue Highlights beginner-friendly tasks, ideal for those looking to contribute for the first time help wanted Signals that additional assistance or expertise is needed on a particular issue or feature

Comments

@MrRefactoring
Copy link
Owner

MrRefactoring commented Jun 23, 2023

In the getFooterCommentVersions 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 getFooterCommentVersions<T = Models.Pagination<Models.CommentVersion>>(
  parameters: Parameters.GetFooterCommentVersions,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/footer-comments/${parameters.id}/versions`,
    method: 'GET',
    params: {
      'body-format': parameters['body-format'],
      cursor: parameters.cursor,
      limit: parameters.limit,
      sort: parameters.sort,
    },
  };

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

Expected function look:

async getFooterCommentVersions<T = Models.Pagination<Models.CommentVersion>>(
  parameters: Parameters.GetFooterCommentVersions,
  callback?: Callback<T>,
): Promise<void | T> {
  const config: RequestConfig = {
    url: `/footer-comments/${parameters.id}/versions`,
    method: 'GET',
    params: {
      'body-format': parameters.bodyFormat,
      cursor: parameters.cursor,
      limit: parameters.limit,
      sort: parameters.sort,
    },
  };

  return this.client.sendRequest(config, callback);
}
@MrRefactoring MrRefactoring added this to the Version 2 API support milestone Jun 23, 2023
@MrRefactoring MrRefactoring added enhancement Denotes a suggestion or request aimed at improving or adding new features to the project help wanted Signals that additional assistance or expertise is needed on a particular issue or feature good first issue Highlights beginner-friendly tasks, ideal for those looking to contribute for the first time labels Jun 23, 2023
@MrRefactoring MrRefactoring pinned this issue Jun 28, 2023
@frodri13
Copy link

Hello @MrRefactoring, I just sent a PR for this issue at camelCase getFooterCommentVersions #81

@MrRefactoring MrRefactoring linked a pull request Jun 29, 2023 that will close this issue
MrRefactoring pushed a commit that referenced this issue Jun 30, 2023
* camelCase getFooterCommentVersions

* getFooterCommentVersions interface modified
@MrRefactoring MrRefactoring unpinned this issue Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Denotes a suggestion or request aimed at improving or adding new features to the project good first issue Highlights beginner-friendly tasks, ideal for those looking to contribute for the first time help wanted Signals that additional assistance or expertise is needed on a particular issue or feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants