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

General refactoring and consolidation #5

Merged
merged 18 commits into from
Dec 14, 2020
Merged

Conversation

waldyrious
Copy link
Contributor

This PR implements various cleanup changes to consolidate and clean up the repository contents and structure after the initial seeding in #1, #2, #3 and #4. Namely, the following changes have been performed:

  • Clean up git tracking of package lock files;
  • Refactor and standardize syntax and code formatting across all files, including harmonization of the syntax of Axios requests, and simplification of the transaction sample code;
  • Trim down samples' dependencies (removing over a hundred dependent packages);
  • Add main README file;
  • Improve documentation in sample projects' names, descriptions, and READMEs;
  • Reorganize and rename directories to provide a clearer and more self-consistent naming scheme for the samples, and facilitate navigation.

- Remove `yarn.lock` files and keep `package-lock.json` in all samples
- Remove ignore rule for `package-lock.json` files
Copy link
Contributor

@inginheiiro inginheiiro left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@inginheiiro inginheiiro left a comment

Choose a reason for hiding this comment

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

fixed issues with bearer and names

waldyrious and others added 17 commits December 10, 2020 18:38
- client credentials sample:  11 packages removed
- PAT sample:                  3 packages removed
- authorization code sample: 119 packages removed (!)
- transaction sample:          4 packages removed
- Add main README file
- Improve project names and descriptions
- Improve sample projects' READMEs
Also rename the sample directories to a clear and more self-consistent naming scheme
…de sample

This standardizes the code so that all the non-index files
contain only methods that wrap calls to the Uphold API
This allows for cleaner failure when one of the API calls fails
The access token type in the authorization header must be "Bearer",
with a capital B.
This change also makes the code of the OAuth examples
more consistent with that of the PAT example.
The /assets endpoint is accessible without authentication,
so a call to it succeeds even with incorrect credentials,
which defeats the purpose of using it to test the authentication flows.

This commit switches it to a request to /me,
which does require authentication (and as a bonus, is less verbose).
@nunojsferreira nunojsferreira merged commit 59d91b8 into master Dec 14, 2020
@nunojsferreira nunojsferreira deleted the support/cleanup branch December 14, 2020 14:59
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