-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
CLI API Tool #273
CLI API Tool #273
Conversation
Add new readme on EELLAK GSoC repo
Seperate CLI tool dependencies Add new readme for CLI tool
Add file list route
def login(): | ||
"""Login to your account.""" | ||
|
||
email = input('Enter your email address: ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
email or username is valid, so this could ask for any of the two enter email or username
type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if we want to keep both username or email, we will have to pass two different params in the request. And then two different variables/inputs would be needed from user
else: | ||
global AUTH_KEY, USERNAME, EMAIL | ||
AUTH_KEY = config('AUTH_KEY') | ||
USERNAME = config('USERNAME') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've logged in, and see that .env creates the entry USERNAME
However here when I print USERNAME it is set to 'user' - AUTH_KEY and EMAIl are correct from .env
So my-media gives error results (queries https://demo.mediacms.io/api/v1/media?author=user
instead of https://demo.mediacms.io/api/v1/media?author=markos
in my case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not able to replicate this error. I am getting correct media and username :(
Adding this as a baseline for the CMD client, thanks! |
Description
This PR will create a CLI tool to interact with API