PHP Library to access the Pagely atomic APIs
Note that PHP 8.1+ is required
Installation assumes you already have git, PHP 8.1+, and composer installed.
git clone [email protected]:pagely/atomic-client.git
cd atomic-client/
composer installOptionally, enable tab-completion and add the atomic client to your $PATH:
./bin/atomic _completion --generate-hook --program atomic >> ~/.bashrc
echo "PATH=$PWD/bin:\$PATH" >> ~/.bashrcYou can authenticate either as your Atomic user or with an API client key.
atomic auth:login [email protected]This saves an auth token to ~/.atomiclogin.
atomic auth:client-login <clientId> <clientSecret>This saves a token to ~/.atomicclientlogin.
Regardless of how you authenticate, when you are done you can use the auth:logout command or simply remove the ~/.atomiclogin/~/.atomicclientlogin file.
NOTE: If both are present, Atomic user tokens take precedence over API client tokens. If you have a user token you need to run auth:logout or manually remove the ~/.atomiclogin file before you can run commands with your API client credentials.
Executing the atomic command by itself will show the commands available.
atomicTo get usage help for any command, simply prefix the command name with help
atomic help auth:login-
You can get your account ID by logging into https://atomic.pagely.com and looking at the address in your browser. Your account ID will be the number directly following
/account/in the address. -
If you are a collaborator and need the ID for another account, log in to Atomic (link above) and use the account switcher (click your name in the upper right) and switch to the account in question. The address in your browser will change to reflect the account ID you are now looking at.