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

Use deltatoken for delta snippets in dotnet #1702

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

andrueastman
Copy link
Member

@andrueastman andrueastman commented Aug 9, 2023

Closes #279
This PR is part of #1673.

It updates the snippet generation for C# involving delta queries to use the raw request url in the request builder constructor as the url.

Therefore an example snippet
GET https://graph.microsoft.com/v1.0/users/delta?$deltatoken=oEcOySpF_hWYmTIUZBOIfPzcwisr_rPe8o9M54L45qEXQGmvQC6T2dbL-9O7nSU-njKhFiGlAZqewNAThmCVnNxqPu5gOBegrm1CaVZ-ZtFZ2tPOAO98OD9y0ao460

will result in the snippet below.

var graphClient = new GraphServiceClient(requestAdapter);

var deltaRequestBuilder = new Microsoft.Graph.Users.Delta.DeltaRequestBuilder("https://graph.microsoft.com/v1.0/users/delta?$deltatoken=oEcOySpF_hWYmTIUZBOIfPzcwisr_rPe8o9M54L45qEXQGmvQC6T2dbL-9O7nSU-njKhFiGlAZqewNAThmCVnNxqPu5gOBegrm1CaVZ-ZtFZ2tPOAO98OD9y0ao460", graphClient.RequestAdapter);
var result = await deltaRequestBuilder.GetAsync();

@sonarcloud
Copy link

sonarcloud bot commented Aug 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@andrueastman andrueastman marked this pull request as ready for review August 9, 2023 12:56
@andrueastman andrueastman requested a review from a team as a code owner August 9, 2023 12:56
@andrueastman andrueastman enabled auto-merge (squash) August 9, 2023 12:57
@andrueastman andrueastman merged commit 37cb5f7 into dev Aug 11, 2023
9 checks passed
@andrueastman andrueastman deleted the andrueastman/deltaSnippets branch August 11, 2023 12:20
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.

issues with delta code samples
2 participants