microslop_one_drive 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf99630f0f09cb4d635d7881c2db5b0d53af498f33b32724b1522d10cd464985
4
- data.tar.gz: a5111efbd38ae81fe7d06524461bade0fe49761a82dccad1747f09c8ae0c751b
3
+ metadata.gz: 906a333b5d1d209772825b3788a154ad92bba28c22cf2d0d2a593bdcdaf21221
4
+ data.tar.gz: 711effa7f493b9eb2c21a2d7bc8397e2cbec592ad102d52f4b0195f9ac388881
5
5
  SHA512:
6
- metadata.gz: 2d683dcebe786a18941e751f0e8f9fa5962d266e9eb69e1ceadcafa1c710a563de06b3ee7153ef4cf0350658c0b735bb55e1ea45a5f6071212c66339696514c5
7
- data.tar.gz: a2141155fc90fdc9c07bb7b725ee43d130d0e8e4e320193840a013621b0c1d0b6b901d5cd1d9df72e2635aab33514760473a39ab246630c52654ee56a5f82c97
6
+ metadata.gz: 1d07ee564bb649d80ac86741132be2babdf535c55e97daae586df0da803870242c3fb9f9228648b30cfd2fa695787cc36adc6ac2ef9cf5b7655237b815dccb02
7
+ data.tar.gz: bcdac643fc87905c507c7cc9b537a0af4779ab84b5e48aa77928e3ba39eb8bb37459b64141f00a7c95569e1e6621e5317174d1b9c8d84a0edd43c86d990eb28b
data/README.md CHANGED
@@ -8,8 +8,10 @@ Graph explorer (API sandbox): <https://developer.microsoft.com/en-us/graph/graph
8
8
 
9
9
  ## Installation
10
10
 
11
+ Add this to your Gemfile:
12
+
11
13
  ```rb
12
- TODO: DOCUMENT
14
+ gem "microslop_one_drive"
13
15
  ```
14
16
 
15
17
  ## Usage
@@ -42,10 +44,12 @@ drive_list.drives # => [MicroslopOneDrive::Drive, ...]
42
44
 
43
45
  drive = drive_list.drives.first
44
46
  drive.class # => MicroslopOneDrive::Drive
45
- drive.id # => "0f0**********42"
47
+ drive.identifier # => "0f0**********42"
46
48
  drive.name # => "OneDrive"
47
49
  drive.url # => "https://my.microsoftpersonalcontent.com/..."
48
50
  drive.drive_type # => "personal"
51
+ drive.created_at
52
+ drive.updated_at
49
53
  ```
50
54
 
51
55
  ### Get a single Drive
@@ -54,7 +58,7 @@ drive.drive_type # => "personal"
54
58
  drive = client.drive(drive_id: "0f097********a42")
55
59
 
56
60
  drive.class # => MicroslopOneDrive::Drive
57
- drive.id # => "0f097********a42"
61
+ drive.identifier # => "0f097********a42"
58
62
  drive.name # => "OneDrive"
59
63
  drive.url # => "https://my.microsoftpersonalcontent.com/personal/..."
60
64
  drive.drive_type # => "personal"
@@ -154,7 +158,7 @@ gem signin
154
158
 
155
159
  # Then build:
156
160
  gem build microslop_drive.gemspec
161
+ # You will get a *.gem file like microslop_one_drive-X.Y.Z.gem
157
162
 
158
-
159
- gem push microslop_one_drive-0.1.0.gem
163
+ gem push microslop_one_drive-X.Y.Z.gem
160
164
  ```
@@ -1,14 +1,17 @@
1
1
  module MicroslopOneDrive
2
2
  class Drive
3
- attr_reader :id, :name, :url, :drive_type
3
+ attr_reader :identifier, :name, :url, :drive_type, :created_at, :updated_at
4
4
 
5
5
  def initialize(drive_hash)
6
6
  @drive_hash = drive_hash
7
7
 
8
- @id = drive_hash.fetch("id", nil)
8
+ @identifier = drive_hash.fetch("id", nil)
9
9
  @name = drive_hash.fetch("name", nil)
10
10
  @url = drive_hash.fetch("webUrl", nil)
11
11
  @drive_type = drive_hash.fetch("driveType", nil)
12
+
13
+ @created_at = Utils.safe_parse_time(drive_hash.fetch("createdDateTime", nil))
14
+ @updated_at = Utils.safe_parse_time(drive_hash.fetch("lastModifiedDateTime", nil))
12
15
  end
13
16
  end
14
17
  end
@@ -1,3 +1,3 @@
1
1
  module MicroslopOneDrive
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microslop_one_drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Marques