PermanentOrg / node-sdk

Node.js SDK for Permanent.org
GNU Affero General Public License v3.0
4 stars 2 forks source link

Set up APIService and expose first public methods #3

Closed andrewatwood closed 4 years ago

andrewatwood commented 4 years ago
  1. Grab the permSession and permMFA cookies, and the API key from the request body on any permanent.org/api
  2. Using the credentials you grabbed from the browser, const perm = new Permanent() and test that perm.auth.isSessionValid() resolves to true
andrewatwood commented 4 years ago

Also open to general structure and organization feedback from @slifty and @jasonaowen as well!

xmunoz commented 4 years ago

I don't see any new tests for this new public method. Can you add some?

Edit: JK, wasn't looking hard enough. I'm going to pass this review along to someone else. LGTM.

xmunoz commented 4 years ago

I'd also like to see the functionality added here documented in the README before merging.

andrewatwood commented 4 years ago

Great point! Can definitely update the README.

jasonaowen commented 4 years ago

@andrewatwood some of the commits in this PR were made without a committer email address, which we should fix. The rest use your personal email address; is that what you intended? Make sure to set your email address in git, and then I'd be happy to pair on rebasing to fix these commits!

andrewatwood commented 4 years ago

@jasonaowen hmm was confused for a minute trying to figure that out, but realized those email-less were edits from the GitHub UI I made on 'main' to set up some Actions and other repo housekeeping stuff, and synced back in to this branch for the PR. Didn't realize it didn't have an email on the commits, seems bizarre for a default behavior...Still open to fixing that if you'd like!

jasonaowen commented 4 years ago

Thanks for pairing with me on rebasing, @andrewatwood! I'll work on testing this now.