dev-master
9999999-dev
MIT
The Requires
- wp-cli/php-cli-tools 0.10.4
- gedex/janrain-api 0.1.0
- symfony/console 2.7.2
- symfony/dependency-injection 2.7.2
by Akeda Bagus
Wallogit.com
2017 © Pedro Peláez
CLI ools for interacting with Janrain., (*1)
git clone git@github.com:xwp/janrain-cli-tools.git jcli cd jcli composer install
You can run via ./bin/jcli from current directory., (*3)
If you want to build the phar file:, (*4)
box build
and you can move the file to your OS PATH:, (*5)
mv jcli.phar /usr/local/bin/jcli
Now you can run jcli from anywhere., (*6)
The first time you need to do is configure your jcli. By default client_id,
client_secret, and base_url are empty:, (*8)
jcli config -l
These are required config keys that need to be set. Set it with:, (*9)
jcli config client_id YOUR_CLIENT_ID jcli config client_secret YOUR_CLIENT_SECRET jcli config base_url YOUR_BASE_URL
Additionally you can set default_type to set default entity type. Now, every time
you run command you can ignore -t option., (*10)
jcli config default_type user
$ ./bin/jcli
jcli version @package_version@
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
config Janrain config
help Displays help for a command
list Lists commands
entity
entity:count Retrieve number of records of entity type
entity:fill-unsub-key Fill empty unsubscribe key on records
entity:find Find entity
entity:update Update an entity
entity:view Retrieve a single entity
type
type:list Retrieve all entity types
jcli entity:find "gender != 'male'"
Limit the output to 10 records:, (*13)
jcli entity:find "gender != 'male'" -m 10
Specifying offset (start from 5th record):, (*14)
jcli entity:find "gender != 'male'" -m 10 -f 5
jcli entity:count "gender != 'male' AND birthday is not null"
jcli entity:view id=999 jcli entity:view uuid=c0613105-f632-41ce-80eb-56668df7fc83
jcli entity:update id=999 givenName=Akeda displayName="Akeda Bagus"
jcli entity:fill-unsub-key
You may get API rate limit from Janrain. If so, the jcli will output the
message. When that happens, you can re-run jcli
entity:fill-unsub-key again for the remaining records., (*19)
MIT