pagely / atomic-client
CLI for accessing public-facing Pagely APIs
Installs: 257
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 15
Forks: 3
Open Issues: 18
Requires
- php: ^8.1
- duncan3dc/console: ^2.3
- guzzlehttp/guzzle: ^7.8
- monolog/monolog: ^1.21
- octoper/cuzzle: ^3.0
- ramsey/uuid: ^3.5
- rdlowrey/auryn: ^1.4
- symfony/console: ^5.3.16 || ^6.0.19
- vlucas/phpdotenv: ^5.0
- dev-master
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.0.0-beta
- dev-renovate/ramsey-uuid-3.x-lockfile
- dev-renovate/ramsey-uuid-4.x
- dev-renovate/php-8.x
- dev-renovate/guzzlehttp-guzzle-7.x
- dev-renovate/monolog-monolog-3.x
- dev-renovate/actions-checkout-3.x
- dev-php-deps
- dev-renovate/php-actions-phpstan-3.x
- dev-renovate/php-actions-composer-6.x
- dev-renovate/vlucas-phpdotenv-5.x
- dev-jgaffney/ares-redirects
This package is auto-updated.
Last update: 2025-03-13 22:24:14 UTC
README
PHP Library to access the Pagely atomic APIs
Note that PHP 8.1+ is required
Installation
Installation assumes you already have git, PHP 8.1+, and composer installed.
git clone git@github.com:pagely/atomic-client.git
cd atomic-client/
composer install
Optionally, enable tab-completion and add the atomic
client to your $PATH
:
./bin/atomic _completion --generate-hook --program atomic >> ~/.bashrc echo "PATH=$PWD/bin:\$PATH" >> ~/.bashrc
Using the client
Authentication
You can authenticate either as your Atomic user or with an API client key.
Authenticating as your Atomic user
atomic auth:login my@atomic-username.com
This saves an auth token to ~/.atomiclogin
.
Authenticating with an API key
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.
Commands
Executing the atomic
command by itself will show the commands available.
atomic
To get usage help for any command, simply prefix the command name with help
atomic help auth:login
Help!
What is my Account ID?
-
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.