Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Latest commit

 

History

History
77 lines (48 loc) · 1.62 KB

api.md

File metadata and controls

77 lines (48 loc) · 1.62 KB

G-Suite API Doc

This is a basic outline of the package, its architecture, etc.

Commands

Accounts

  • CreateAccount: gsuite:create-account
  • DeleteAccount: gsuite:delete-account
  • SuspendAccount: gsuite:suspend-account
  • UnsuspendAccount: gsuite:unsuspend-account

Groups

  • CreateGroup: gsuite:create-group

Actions

Actions are queueable classes that encapsulate logic and tasks. After applicable actions, the cache will be flushed.

Accounts

  • CreateAccountAction
  • DeleteAccountAction
  • SuspendAccountAction
  • UnsuspendAccountAction

Groups

  • CreateGroupAction
  • DeleteGroupAction

GSuite class

The base class, primary means of interacting with package. Provides access to accounts and groups.

GSuite::accounts(); // GSuiteAccounts::class

GSuite::groups(); // GSuiteGroups::class

GSuiteAccounts class

The primary G-Suite accounts class, provides a wrapper around the accounts repository. Presents a way to retrieve, create, delete accounts. When applicable returns instances of GSuiteAccount.

GSuiteAccounts::all() // Collection of GSuiteAccount::class

GSuiteAccounts::find($email) // GSuiteAccount::class

GSuiteAccounts::delete(array $emails) // ?

GSuiteAccounts::create(array $name, $email, $password); // GSuiteAccount::class

GSuiteAccount class

Primary representation of a G-Suite account.

// One way to get single account
$account = GSuiteAccounts::find('[email protected]');

// Another way
$account = GSuiteAccounts::all()->first();

$account->delete(); // Returns bool

$account->suspend() // Returns bool