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

feat: refactor dictionary cache page to new style #1144

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rishtigupta
Copy link
Contributor

@rishtigupta rishtigupta commented Aug 12, 2024

PR Description:

This commit refactors the dictionary page in cache api references to new style of documentation matching the one in leaderboards.

Issue

Addresses a part of https://github.com/momentohq/dev-eco-issue-tracker/issues/957

@rishtigupta rishtigupta requested review from anitarua and a team August 12, 2024 16:52
@rishtigupta rishtigupta marked this pull request as ready for review August 12, 2024 16:54
Comment on lines +52 to +53
- **Cache error**:
- See [response objects](./response-objects.md) for specific information.
Copy link
Collaborator

Choose a reason for hiding this comment

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

For the errors, maybe you can link directly to the error response object section directly instead of "see _ for specific information"?

Suggested change
- **Cache error**:
- See [response objects](./response-objects.md) for specific information.
- **Cache error**:
- [Error response object](./response-objects#error) for specific information.

#### Returns
----------------
One of the following:
- **Success**:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think responses with no corresponding methods don't need the extra : at the end

Suggested change
- **Success**:
- **Success**


#### Returns
----------------
The response object for DictionaryFetch returns three possible options, a cache hit, miss, or an error.:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: some weird punctuation

Suggested change
The response object for DictionaryFetch returns three possible options, a cache hit, miss, or an error.:
The response object for DictionaryFetch returns three possible options, a cache hit, miss, or an error:

Get one or more fields from a dictionary in the cache.
#### Returns
----------------
The response object for DictionaryFetch returns three possible options, a cache hit, miss, or an error.:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I like "One of the following:" better for the short description under the "Returns" headers.
Currently seeing some mixed usage of that and "the response object for _ returns _"

Comment on lines +91 to +93
- **Cache miss**:
- `fieldString()`: String
- `fieldBytes()`: Bytes
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think a miss returns anything?

Comment on lines +84 to +89
- **Cache hit**:
These return the field and its value from the dictionary.
- `fieldString()`: String
- `fieldBytes()`: Bytes
- `valueString()`: String
- `valueBytes()`: Bytes
Copy link
Collaborator

Choose a reason for hiding this comment

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

might be nice to have short descriptions for each possible accessor in addition to return type


<div class='col col--8'>

<SdkExampleTabs snippetId={'API_DictionaryLength'} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

side note: apparently JS sdk is missing a DictionaryLength example

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

Successfully merging this pull request may close these issues.

2 participants