codr-1.1.1 is not a library.
codr
Client for OneDrive in Rust or (codr) - A Rust Command line tool for interacting with OneDrive.
Usage
codr is a simple client that requires your own Microsoft OAuth2 credentials (see here for official instructions.) in order to function properly.
Once the credentials have been obtained, they can then be supplied to codr through a variety of means (see the Example Commands).
Installing
# Via Cargo
How to obtain Microsoft OAuth2 Credentials
The following steps outline how these credentials can be obtained.
- Register a
Webapplication with:- A
Redirect URIofhttp://localhost:<REDIRECT_PORT><REDIRECT_ENDPOINT>- <REDIRECT_PORT> defaults to
8080 - <REDIRECT_ENDPOINT> defaults to
/redirect
- <REDIRECT_PORT> defaults to
- The supported account type: Accounts in any organizational directory and personal Microsoft accounts
- A
- In the left menu select
Overview. Copy theApplication (client) IDas the MSGRAPH_CLIENT_ID. - In the left menu select
Certificates & secretsand add a new client secret. Copy the secret value as MSGRAPH_CLIENT_SECRET. - In the left menu select
API permissionsand add a permission then selectMicrosoft GraphandDelegated permissions. Now add theFiles.Readpermission (and other permissions as necessary).
Example Commands
# Help commands
# Example commands (using command options)
# Example commands (using config.yaml file)
# Example commands (using environment variable)
MSGRAPH_CLIENT_ID=my-msgraph-client-id
MSGRAPH_CLIENT_SECRET=my-msgraph-client-secret
Example Config File Contents
msgraph_client_id: insert-client-id-here
msgraph_client_secret: insert-client-secret-here
Notes
[!WARNING] This is my first Rust project so use with caution...