Class: OneDriveForBusiness::Drive
- Inherits:
-
Object
- Object
- OneDriveForBusiness::Drive
- Includes:
- Util
- Defined in:
- lib/onedrive_for_business/drive.rb
Defined Under Namespace
Classes: Quota
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#id ⇒ Object
String.
-
#initialize(tenant, access_token) ⇒ Object
constructor
Drive.
-
#owner ⇒ Object
Identity.
-
#quota ⇒ Object
Drive::Quota.
Methods included from Util
Constructor Details
#initialize(tenant, access_token) ⇒ Object
Returns Drive.
8 9 10 11 |
# File 'lib/onedrive_for_business/drive.rb', line 8 def initialize(tenant, access_token) @url = "https://#{tenant}-my.sharepoint.com/_api/v1.0/me/drive" @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
13 14 15 |
# File 'lib/onedrive_for_business/drive.rb', line 13 def access_token @access_token end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/onedrive_for_business/drive.rb', line 14 def url @url end |
Instance Method Details
#id ⇒ Object
Returns String.
17 18 19 20 |
# File 'lib/onedrive_for_business/drive.rb', line 17 def id fetch_properties! unless @id @id end |
#owner ⇒ Object
Returns Identity.
23 24 25 26 |
# File 'lib/onedrive_for_business/drive.rb', line 23 def owner fetch_properties! unless @owner @owner end |
#quota ⇒ Object
Returns Drive::Quota.
29 30 31 32 |
# File 'lib/onedrive_for_business/drive.rb', line 29 def quota fetch_properties! unless @quota @quota end |