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

Tweak collections docs to make CLI usage clearer #602

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions adaptors/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ You'll need to set configuration on the state.json:
{
"configuration": {
"collections_endpoint": "http://localhost:4000/collections",
"collections_token": "...paste the token from the app..."
"collections_token": "...paste your Personal Access Token..."
}
}
```
Expand All @@ -311,7 +311,7 @@ If you're using `workflow.json`, set the token and endpoint on
"steps": [ ... ],
"credentials": {
"collections_endpoint": "http://localhost:4000/collections",
"collections_token": "...paste the token from the app..."
"collections_token": "...paste your Personal Access Token..."
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion docs/build/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ collections.each(
);
```

New values are uploaded to a collection through `collections.set`:
Values are uploaded to a collection through `collections.set`. All sets are "upserts" - meaning that new keys will be created for values that don't exist, and values will be updated for keys that _do_ exist.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a second tweak after speaking with Benson today


The example below sets a single item:

```js
collections.set('openfn-demo', 'commcare-fhir-value-mappings', {
Expand Down
Loading