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 dev docs example to use new predefined disposable token scope function #487

Merged
merged 1 commit into from
Sep 13, 2023
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
2 changes: 1 addition & 1 deletion examples/DocExampleApis/DocExampleApis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Momento.Sdk" Version="1.21.1" />
<PackageReference Include="Momento.Sdk" Version="1.21.2" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/DocExampleApis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@

// Generate a disposable token with read-only access to all topics in one cache
var allTopicsOneCacheToken = await authClient.GenerateDisposableTokenAsync(
DisposableTokenScopes.TopicSubscribeOnly(CacheSelector.ByName("squirrel"), TopicSelector.AllTopics),
DisposableTokenScopes.TopicSubscribeOnly("squirrel", TopicSelector.AllTopics),
ExpiresIn.Minutes(30)
);

Expand Down Expand Up @@ -210,7 +210,7 @@

}

public static async Task Example_API_InstantiateTopicClient()

Check warning on line 213 in examples/DocExampleApis/Program.cs

View workflow job for this annotation

GitHub Actions / build_examples

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
new TopicClient(
TopicConfigurations.Laptop.latest(),
Expand Down
Loading