This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
CLI
Quentin Rousseau edited this page Sep 26, 2017
·
3 revisions
$ quip --help
Usage: quip [options]
Quip Rest API Command Line
Options:
-h, --help output usage information
-V, --version output the version number
-c, --config <path> Quip Configuration file. Default to ~/.quip-cli/config.yaml
-t, --accessToken <token> Quip Access Token
-d, --debug Enabling Debugging Output
Commands:
threads|th [options] <method> Quip Threads API
messages|msg [options] <method> Quip Messages API
folders|fdr [options] <method> Quip Folders API
users|usr [options] <method> Quip Users API
Examples:
$ quip threads|th getRecentThreads
$ quip messages|msg getMessages --payload '{"thread_id": "threadId"}' --pretty
$ quip folders|fdr newFolder --payload '{"title": "My New Folder"}' --pretty
$ quip users|usr getAuthenticatedUser
$ syno th --help
Usage: threads|th [options] <method>
Quip Threads API
Options:
-h, --help output usage information
-c, --config <path> Quip configuration file. Default to ~/.quip-cli/config.yaml
-t, --accessToken <token> Quip Access Token
-p, --payload <payload> JSON Payload
-P, --pretty Prettyprint JSON Output
-d, --debug Enabling Debugging Output
Examples:
$ quip threads|th getRecentThreads
$ quip threads|th createDocument --payload '{"title": "Title", "content": "<h1>Title</h1><p>First Paragraph</p>"}' --pretty
$ quip threads|th editDocument --payload '{"content": "<h1>Prepend content</h1>", "location": 1}' --pretty
$ quip threads|th addThreadMembers --payload '{"thread_id": "threadId", "members_ids": ["userId1", "userId2"] }' --pretty
$ quip msg --help
Usage: messages|msg [options] <method>
Quip Messages API
Options:
-h, --help output usage information
-c, --config <path> Quip configuration file. Default to ~/.quip-cli/config.yaml
-t, --accessToken <token> Quip Access Token
-p, --payload <payload> JSON Payload
-P, --pretty Prettyprint JSON Output
-d, --debug Enabling Debugging Output
Examples:
$ quip messages|msg getMessages --payload '{"thread_id": "threadId"}' --pretty
$ quip messages|msg newMessage --payload '{"thread_id": "threadId", "content": "My New Message"}' --pretty
$ quip fdr --help
Usage: folders|fdr [options] <method>
Quip Folders API
Options:
-h, --help output usage information
-c, --config <path> Quip configuration file. Default to ~/.quip-cli/config.yaml
-t, --accessToken <token> Quip Access Token
-p, --payload <payload> JSON Payload
-P, --pretty Prettyprint JSON Output
-d, --debug Enabling Debugging Output
Examples:
$ quip folders|fdr newFolder --payload '{"title": "My New Folder"}' --pretty
$ quip folders|fdr getFolder --payload '{"folder_id": "folderId"}' --pretty
$ quip folders|fdr updateFolder --payload '{"folder_id": "folderId", "color": 1}' --pretty
$ quip folders|fdr addFolderMembers --payload '{"folder_id": "threadId", "members_ids": ["userId1", "userId2"] }' --pretty
$ quip usr --help
Usage: users|usr [options] <method>
Quip Users API
Options:
-h, --help output usage information
-c, --config <path> Quip configuration file. Default to ~/.quip-cli/config.yaml
-t, --accessToken <token> Quip Access Token
-p, --payload <payload> JSON Payload
-P, --pretty Prettyprint JSON Output
-d, --debug Enabling Debugging Output
Examples:
$ quip users|usr getAuthenticatedUser
$ quip users|usr getUser --payload '{"id": "userId"}' --pretty
$ quip users|usr getContacts --pretty
# Example config file, by default it should be located at:
# ~/.quip-cli/config.yaml
auth:
accessToken: 'accessToken'
Notes: Override --accessToken
and configuration file.
$ QUIP_ACCESS_TOKEN=accessToken quip th getRecentThreads --pretty