IndianOpenSourceFoundation / dynamic-cli

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI
https://pypi.org/project/dynamic-cli/
GNU General Public License v3.0
167 stars 119 forks source link

Add Playbook to Notion #93

Open GouravSardana opened 3 years ago

GouravSardana commented 3 years ago

In this feature, we need these things -

  1. Create a notion account and generate the token. The flow would be like this -

    • dynamic --notion -> Open up notion login to the browser and ask them to log in.

    • After this -> The terminal will show. 'Notion Logged in' or 'Notion logged in failed'

  2. Now it's time to upload. Use dynamic --notionupload or nu. Then it will automatically fill up the question to the notion. We have to implement a similar thing like this. We have to make this from scratch.

NamamiShanker commented 3 years ago

When you mean to implement it from the scratch, you mean we can't use the notion library you linked? We have to build the authentication and uploading system on our own?

GouravSardana commented 3 years ago

Nops. Authentication - we can used from notion but from the product prospective, we have to reduce the 3rd party package. Because if someday our 1 thing will upgrade then it might effect other packages.

NamamiShanker commented 3 years ago

I agree. I was wondering if we can implement browser login for the notion login. A browser window will open upon typing dynamic -notion. The user will log in to the notion. The program will receive an authentication token that can then be used to sync playbook data.

GouravSardana commented 3 years ago

Yup, that we have to made it from scratch or need to find some other way

NamamiShanker commented 3 years ago

Should we store the token locally in some file so that the user doesn't have to log in again until the cookie expires?

Souvikns commented 3 years ago

Hey, I have used the notion API before, build this for fun. I would like to work on this, would be nice to have some insight.

GouravSardana commented 3 years ago

@Souvikns So basically we implemented the login using notion. If you download dynamic and explore --notion then you can able to login. That way you will get auth token. @NamamiShanker implemented that features. We have playbook as well --playbook. We need to upload that playbook data to notion. So that in future if we change our computer/Laptop our playbook still remain in sync.

Souvikns commented 3 years ago

Hey, so I am using windows and as it does not run on windows I am running on GitHub codespaces, so when I am using the command dynamic --notion it shows login unsuccessful as there is no chrome. Is there any other way to set it up.

GouravSardana commented 3 years ago

Ahh got it. One way is to use VMware and install linux and use the dynamic.

Another simple way is to comment all the dependencies of terminos. That was causing incompatibility. I'm looking for another way but will take some time. You can try second way