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

Request: Files/Folders API doSearch, consolidate params in single param of type Search options #374

Open
jeff00seattle opened this issue May 29, 2023 · 0 comments

Comments

@jeff00seattle
Copy link

jeff00seattle commented May 29, 2023

REQUEST

Files/Folders API doSearch, consolidate params in single param of type Search options.

It is ludicrous to provide undefined value for almost every param if your goal is to search by param name, path, or parentFolderId.

Create a new type SearchOptions, and declare a single param of that type.

EXAMPLE UNNECESSARILY VERBOSE PARAM REQUIREMENT

Node code Search Folders example taken from this endpoint documentation:
https://developers.hubspot.com/docs/api/files/files#tab-2

const properties = undefined;
const after = undefined;
const before = undefined;
const limit = undefined;
const sort = undefined;
const id = undefined;
const createdAt = undefined;
const createdAtLte = undefined;
const createdAtGte = undefined;
const updatedAt = undefined;
const updatedAtLte = undefined;
const updatedAtGte = undefined;
const name = undefined;
const path = undefined;
const parentFolderId = undefined;

try {
  const apiResponse = await hubspotClient.files.foldersApi.doSearch(properties, after, before, limit, sort, id, createdAt, createdAtLte, createdAtGte, updatedAt, updatedAtLte, updatedAtGte, name, path, parentFolderId);
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

No branches or pull requests

1 participant