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

add userAgentDetail field to oauth sample apps and fix various README… #353

Merged
merged 6 commits into from
Oct 5, 2022

Conversation

emmac3
Copy link
Contributor

@emmac3 emmac3 commented Oct 3, 2022

Add userAgentDetail field to oauth sample apps and fix various formatting issues (via prettier autofix on save)

Copy link
Contributor

@mglombicki-square mglombicki-square left a comment

Choose a reason for hiding this comment

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

There are some readme code blocks and spacing things that might be worth taking a look at.

Also, in the future, I recommend separating out formatting changes into their own PR to make the diffs easier to understand for the main change (userAgentDetail)

.environment(ENVIRONMENT)
.build();
.environment(ENVIRONMENT)
.userAgentDetail("sample_app_oauth_java")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a comment explaining that this should be replaced or removed when building on top of this sample?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for all other instances of user agent details

```
1. install [**Chalice**](https://github.com/aws/chalice) and all the project dependencies, **Chalice** is a
microframework for writing serverless apps in Python. We use this microframework to manage all the elasticsearch management tasks.
`bash pip install -r requirements.txt `
Copy link
Contributor

Choose a reason for hiding this comment

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

bash is a syntax highlighter hint (so the markdown parser knows what language this is in) but it should not appear in the actual text that the user copies. You may have to revert this to the previous triple tick format to use it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's so odd, a lot of these changes got in unintentionally when I opened to read the file :-/ thanks for catching it!

@@ -1,4 +1,4 @@
chalice==1.12.0
boto3==1.11.11
squareup===5.1.0.20200325
squareup == 22.0.0.20220921
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to have spaces?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same goes for other requirements.txt files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it matters (i.e. sample requirement file) but I'll change it for consistency.


PLATFORMS
ruby
x86_64-darwin-20
Copy link
Contributor

Choose a reason for hiding this comment

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

Why no longer ruby?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually no idea, this was a generated file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since v2.2* bundler no longer includes the ruby platform by default (see conversation here), so we'll have to add it ourselves.

Comment on lines 135 to 137
```

```
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like it's blank?

@@ -21,7 +21,8 @@ function obtainOAuthToken($authorizationCode) {
// Initialize Square PHP SDK OAuth API client.
$environment = getenv('SQ_ENVIRONMENT') == "sandbox" ? Environment::SANDBOX : Environment::PRODUCTION;
$apiClient = new SquareClient([
'environment' => $environment
'environment' => $environment,
'useqrAgentDetail' => "sample_app_oauth_php" // Remove or replace this detail when building your own app

Choose a reason for hiding this comment

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

The field name has a typo here.

@emmac3 emmac3 requested a review from ian-hutchinson October 4, 2022 21:53
@emmac3 emmac3 merged commit b483f19 into master Oct 5, 2022
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.

3 participants