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

chore: update readmes to use api key from console instead of auth token from cli #544

Merged
merged 1 commit into from
Mar 6, 2024
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Momento Cache is a fast, simple, pay-as-you-go caching solution without any of the operational overhead
required by traditional caching solutions. This repo contains the source code for the Momento .NET client library.

To get started with Momento you will need a Momento Auth Token. You can get one from the [Momento Console](https://console.gomomento.com).
To get started with Momento you will need a Momento API key. You can get one from the [Momento Console](https://console.gomomento.com/api-keys).

* Website: [https://www.gomomento.com/](https://www.gomomento.com/)
* Momento Documentation: [https://docs.momentohq.com/](https://docs.momentohq.com/)
Expand Down Expand Up @@ -73,8 +73,8 @@ using (ICacheClient client = new CacheClient(Configurations.Laptop.V1(), authPro

```

Note that the above code requires an environment variable named MOMENTO_AUTH_TOKEN which must
be set to a valid [Momento authentication token](https://docs.momentohq.com/docs/getting-started#obtain-an-auth-token).
Note that the above code requires an environment variable named MOMENTO_API_KEY which must
be set to a valid [Momento authentication token](https://docs.momentohq.com/cache/develop/authentication/api-keys).

## Getting Started and Documentation

Expand Down
4 changes: 2 additions & 2 deletions examples/DictionaryExample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ This example program demonstrates usage of the dictionary data type.

# Usage

The program assumes the auth token and cache names are available in environment variables. The auth token is assumed to be in the variable `TEST_AUTH_TOKEN` and the cache name in `TEST_CACHE_NAME`. If either of these is missing, you will be prompted to enter the values on the terminal.
The program assumes the auth token and cache names are available in environment variables. The auth token is assumed to be in the variable `MOMENTO_API_KEY` and the cache name in `MOMENTO_CACHE_NAME`. If either of these is missing, you will be prompted to enter the values on the terminal.

To run the program, run either:

```bash
TEST_AUTH_TOKEN=<YOUR_TOKEN_HERE> TEST_CACHE_NAME=<YOUR_CACHE_NAME_HERE> dotnet run
MOMENTO_API_KEY=<YOUR_API_KEY_HERE> MOMENTO_CACHE_NAME=<YOUR_CACHE_NAME_HERE> dotnet run
```

or
Expand Down
2 changes: 1 addition & 1 deletion examples/DisposableTokens/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This example program demonstrates how to generate disposable Momento auth tokens
The program assumes that your Momento auth token is available in the `MOMENTO_API_KEY` environment variable:

```bash
MOMENTO_API_KEY=<YOUR_AUTH_TOKEN> dotnet run
MOMENTO_API_KEY=<YOUR_API_KEY> dotnet run
```

The example generates a disposable expiring auth token using the enumerated permissions and expiry defined in the program and prints its attributes to the console.
6 changes: 3 additions & 3 deletions examples/MomentoApplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ functionality, including:
## Prerequisites

* [`dotnet`](https://dotnet.microsoft.com/en-us/download) 6.0 or higher is required
* A Momento auth token is required. You can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli).
* A Momento API key is required. You can generate one using the [Momento Console](https://console.gomomento.com/api-keys).

## Running the application example

Run the following from within the `examples` directory:

```bash
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run --project MomentoApplication
MOMENTO_API_KEY=<YOUR API KEY> dotnet run --project MomentoApplication
```

Within the `MomentoAppication` directory you can run:

```bash
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run
MOMENTO_API_KEY=<YOUR API KEY> dotnet run
```

## Error Handling
Expand Down
8 changes: 4 additions & 4 deletions examples/MomentoLoadGen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ If you have questions or need help experimenting further, please reach out to us
## Prerequisites

* [`dotnet`](https://dotnet.microsoft.com/en-us/download) 6.0 or higher is required
* A Momento auth token is required. You can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli).
* A Momento API key is required. You can generate one using the [Momento Console](https://console.gomomento.com/api-keys).

## Running the load generator

To run the load generator (from the `examples` directory):

```bash
# Run example load generator
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run --project MomentoLoadGen
MOMENTO_API_KEY=<YOUR API KEY> dotnet run --project MomentoLoadGen
```

Within the `MomentoLoadGen` directory you can run:

```bash
# Run example load generator
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run
MOMENTO_API_KEY=<YOUR API KEY> dotnet run
```

If you make modifications to the code, remember to do a clean otherwise
the program might not run.

```bash
dotnet clean
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run
MOMENTO_API_KEY=<YOUR API KEY> dotnet run
```
6 changes: 3 additions & 3 deletions examples/MomentoUsage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ the client's full capabilities, take a look at the more advanced [MomentoApplic
## Prerequisites

* [`dotnet`](https://dotnet.microsoft.com/en-us/download) 6.0 or higher is required
* A Momento auth token is required. You can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli).
* A Momento API key is required. You can generate one using the [Momento Console](https://console.gomomento.com/api-keys).

## Running the application example

Run the following from within the `examples` directory:

```bash
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run --project MomentoUsage
MOMENTO_API_KEY=<YOUR API KEY> dotnet run --project MomentoUsage
```

Within the `MomentoUsage` directory you can run:

```bash
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run
MOMENTO_API_KEY=<YOUR API KEY> dotnet run
```

## Error Handling
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
## Prerequisites

* [`dotnet`](https://dotnet.microsoft.com/en-us/download) 6.0 or higher is required
* A Momento auth token is required. You can generate one using the [Momento CLI](https://github.com/momentohq/momento-cli).
* A Momento API key is required. You can generate one using the [Momento Console](https://console.gomomento.com/api-keys).

## Running the advanced example

To run the advanced example code defined in [`MomentoApplication/Program.cs`](./MomentoApplication/Program.cs),
run the following from within the `examples` directory:

```bash
MOMENTO_AUTH_TOKEN=<YOUR AUTH TOKEN> dotnet run --project MomentoApplication
MOMENTO_API_KEY=<YOUR API KEY> dotnet run --project MomentoApplication
```

## Error Handling
Expand Down Expand Up @@ -82,5 +82,5 @@ To run the load generator (from the `examples` directory):

```bash
# Run example load generator
MOMENTO_AUTH_TOKEN=<YOUR AUTH TOKEN> dotnet run --project MomentoLoadGen
MOMENTO_API_KEY=<YOUR AUTH TOKEN> dotnet run --project MomentoLoadGen
```
4 changes: 2 additions & 2 deletions examples/TopicExample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ This example program demonstrates usage of Momento Topics.

# Usage

The program assumes the auth token and cache names are available in environment variables. The auth token is assumed to be in the variable `TEST_AUTH_TOKEN` and the cache name in `TEST_CACHE_NAME`. If either of these is missing, you will be prompted to enter the values on the terminal.
The program assumes the auth token and cache names are available in environment variables. The auth token is assumed to be in the variable `MOMENTO_API_KEY` and the cache name in `MOMENTO_CACHE_NAME`. If either of these is missing, you will be prompted to enter the values on the terminal.

To run the program, run either:

```bash
TEST_AUTH_TOKEN=<YOUR_TOKEN_HERE> TEST_CACHE_NAME=<YOUR_CACHE_NAME_HERE> dotnet run
MOMENTO_API_KEY=<YOUR_API_KEY_HERE> MOMENTO_CACHE_NAME=<YOUR_CACHE_NAME_HERE> dotnet run
```

or
Expand Down
Loading