set_account_by_id()

Set Account for API calls

set_account_by_id()

This method will set the account to be used for other API calls.

Parameters

Name
Type
Description

$account_id

string

Cloud Account ID

Return

Name
Type
Description

$account

Account

The Account object corresponding to the set Account ID.

Usage

$account = WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');

// Username
$account->get_name();

// Primary emailaddress
$account->get_email();

// Profile image
$account->get_image();

// Kind of account
$account->get_type();

// Storage available & used.
$account->get_storage_info();

Last updated