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

Update category-exporter.md #1888

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/cli/category-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const options = {
apiConfig: {
apiUrl: 'https://api.europe-west1.gcp.commercetools.com'
host: 'https://auth.europe-west1.gcp.commercetools.com'
project_key: 'PROJECT_KEY',
project_key: '<ProjectKey>',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion is based on the code in the support ticket.

Suggested change
project_key: '<ProjectKey>',
projectKey: '<ProjectKey>',

Copy link
Contributor

@industrian industrian Dec 1, 2023

Choose a reason for hiding this comment

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

If projectKey: '<ProjectKey>' is correct, then we should probably check and update the code examples in other Exporter documents. I think they all use project_key: '<ProjectKey>'

credentials: {
clientId: '*********',
clientSecret: '*********'
clientId: '<clientId>',
clientSecret: '<clientSecret>'
}
},
accessToken: '123456yuhgfdwegh675412wefb4rgb',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion for consistency:

Suggested change
accessToken: '123456yuhgfdwegh675412wefb4rgb',
accessToken: '<accessToken>',

Expand All @@ -78,10 +78,12 @@ const logger = {
debug: console.debug,
}

const categoryExporter = new CategoryExporter(options, logger)
const categoryExporter = new CategoryExporter.default(options, logger)

const outputStream = fs.createWriteStream('output.txt');

// Register error listener
outputStream.on('error', errorHandler)
outputStream.on('error', (e) => console.log(e))

outputStream.on('finish', () => console.log('done with export'))

Expand Down
Loading