ruby-office365 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -23
- data/Gemfile.lock +1 -1
- data/README.md +11 -3
- data/lib/office365/rest/event.rb +15 -1
- data/lib/office365/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac3b26253e6a59472941c7cb2a1cbedf4903e04ecd0a6b3e1408411379baa7d8
|
4
|
+
data.tar.gz: aae5b8d7c74d3dd4e2bc79bcdc1b031eb7c2acbec3ca0c87e88df72225cf1fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c305b0ba9f23a42028cbcbbf4b00f9fd359ae6bd0a8e020b49a3ad0a31116c096910fbad48907f51b2273ab935e7a43f46f3c26dd9891516179c65cfd04aff01
|
7
|
+
data.tar.gz: a581cbcc394e4c92dcc8c9c4b8fae51531f94fb267dda5813091d4b4108d77819f20b430e336055e2ba72edfc2faac5e19171834106cef8a4f8229e6a6b3b85d
|
data/CHANGELOG.md
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
# Office365 Library Changelog
|
2
2
|
|
3
|
-
## [0.1
|
3
|
+
## [0.2.1] - (2024-12-11)
|
4
4
|
|
5
|
-
-
|
5
|
+
- FIX events: Manage correctly next_link
|
6
6
|
|
7
|
-
## [0.
|
7
|
+
## [0.2.0] - (2024-11-14)
|
8
8
|
|
9
|
-
-
|
10
|
-
- get
|
11
|
-
- get mailbox `client.messages`
|
12
|
-
- get calenders `client.calenders`
|
9
|
+
- New feature on events: Allows users to get events by expected dates
|
10
|
+
- get events for the next week `client.events({ startdatetime: "2024-11-14T00:00:00.000Z", enddatetime: "2024-11-21T00:00:00.000Z" })`
|
13
11
|
|
14
|
-
## [0.1.
|
12
|
+
## [0.1.9] - (2024-08-08)
|
15
13
|
|
16
|
-
-
|
17
|
-
- get mailbox data with next link `client.messages({next_link: 'xxx'})`
|
18
|
-
- get calenders data with next link `client.calenders({next_link: 'xxx'})`
|
14
|
+
- able to get event by identifier `client.event('xxxxxxxx')`
|
19
15
|
|
20
|
-
## [0.1.
|
16
|
+
## [0.1.7] - (2022-11-11)
|
21
17
|
|
22
|
-
-
|
23
|
-
- get
|
24
|
-
- get
|
18
|
+
- Improve performance: supports select and sort in REST APIs
|
19
|
+
- get messages by select fields `client.messages({ select: %[id] })`
|
20
|
+
- get messages by custom order `client.messages({ order: 'id asc' })`
|
21
|
+
|
22
|
+
## [0.1.6] - (2022-11-01)
|
23
|
+
|
24
|
+
- Integrate REST API to get events
|
25
|
+
- get events `client.events`
|
26
|
+
- get events data with next link `client.events({next_link: 'xxx'})`
|
25
27
|
|
26
28
|
## [0.1.5] - (2022-10-27)
|
27
29
|
|
@@ -30,14 +32,25 @@
|
|
30
32
|
- get token URL `client.token_url`
|
31
33
|
- be able to refresh token `client.refresh_token!`
|
32
34
|
|
33
|
-
## [0.1.
|
35
|
+
## [0.1.3] - (2022-10-26)
|
34
36
|
|
35
|
-
- Integrate REST API to get
|
36
|
-
- get
|
37
|
-
- get
|
37
|
+
- Integrate REST API to get contacts
|
38
|
+
- get contacts `client.contacts`
|
39
|
+
- get contacts data with next link `client.contacts({next_link: 'xxx'})`
|
38
40
|
|
39
|
-
## [0.1.
|
41
|
+
## [0.1.2] - (2022-10-21)
|
40
42
|
|
41
|
-
-
|
42
|
-
- get
|
43
|
-
- get
|
43
|
+
- Integrate REST API to get mailbox with pagination
|
44
|
+
- get mailbox data with next link `client.messages({next_link: 'xxx'})`
|
45
|
+
- get calenders data with next link `client.calenders({next_link: 'xxx'})`
|
46
|
+
|
47
|
+
## [0.1.1] - (2022-10-21)
|
48
|
+
|
49
|
+
- Integrate REST API to get data from Graph API
|
50
|
+
- get profile `client.me`
|
51
|
+
- get mailbox `client.messages`
|
52
|
+
- get calenders `client.calenders`
|
53
|
+
|
54
|
+
## [0.1.0] - (2022-10-19)
|
55
|
+
|
56
|
+
- Project setup and push to rubugems
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# Office 365 (
|
1
|
+
# Office 365 (2024) <img src="https://i.ibb.co/g3mpswn/microsoft-office-365-logo-2016-100727915-large.webp" align="right" width="250" height="150">
|
2
|
+
|
2
3
|
A simple ruby library to interact with Microsoft Graph **[Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer)** and Office 365 API
|
3
4
|
|
4
5
|
## Installation
|
@@ -100,6 +101,14 @@ irb(main):005:0> client.events[:results]
|
|
100
101
|
irb(main):005:0> client.events[:next_link]
|
101
102
|
```
|
102
103
|
|
104
|
+
**Get my events for the next week**
|
105
|
+
|
106
|
+
```ruby
|
107
|
+
irb(main):005:0> client.events({ startdatetime: "2024-11-14T00:00:00.000Z", enddatetime: "2024-11-21T00:00:00.000Z" })
|
108
|
+
irb(main):005:0> client.events[:results]
|
109
|
+
irb(main):005:0> client.events[:next_link]
|
110
|
+
```
|
111
|
+
|
103
112
|
**Get my event by id**
|
104
113
|
|
105
114
|
```ruby
|
@@ -107,7 +116,7 @@ irb(main):005:0> client.event('identifier')
|
|
107
116
|
irb(main):005:0> client.event('identifier')[:results]
|
108
117
|
```
|
109
118
|
|
110
|
-
Results will return an array even if it is a single result.
|
119
|
+
Results will return an array even if it is a single result.
|
111
120
|
|
112
121
|
**Get my mails by access token**
|
113
122
|
|
@@ -210,7 +219,6 @@ irb(main):005:0> subscription = client.renew_subscription(args)
|
|
210
219
|
|
211
220
|
will return the subscription object `Office365::Models::Subscription`
|
212
221
|
|
213
|
-
|
214
222
|
## Development
|
215
223
|
|
216
224
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/office365/rest/event.rb
CHANGED
@@ -7,11 +7,25 @@ module Office365
|
|
7
7
|
module Event
|
8
8
|
include Concerns::Base
|
9
9
|
BASE_URI = "/me/events"
|
10
|
+
CALENDARVIEW_URL = "/me/calendarview"
|
10
11
|
|
11
12
|
# params: args => { next_link: (nil / next_page_url) }
|
13
|
+
# startdatetime: 2024-11-14T07:59:41.313Z
|
14
|
+
# enddatetime: 2024-11-21T07:59:41.313Z
|
12
15
|
# response { results: [], next_link: '...' }
|
13
16
|
def events(args = {})
|
14
|
-
|
17
|
+
if args[:startdatetime] && args[:enddatetime]
|
18
|
+
wrap_results(
|
19
|
+
args.merge(
|
20
|
+
kclass: Models::Event,
|
21
|
+
base_uri: CALENDARVIEW_URL,
|
22
|
+
startdatetime: args[:startdatetime],
|
23
|
+
enddatetime: args[:enddatetime]
|
24
|
+
)
|
25
|
+
)
|
26
|
+
else
|
27
|
+
wrap_results(args.merge(kclass: Models::Event, base_uri: BASE_URI))
|
28
|
+
end
|
15
29
|
end
|
16
30
|
|
17
31
|
def event(identifier)
|
data/lib/office365/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-office365
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|