outlook_calendar 0.1.8 → 0.1.9

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
  SHA1:
3
- metadata.gz: 1a5af0e3aaa4b1867446e4194c8e869b8b453f27
4
- data.tar.gz: 69c4815306a380986a3a9043a468cda2780fd824
3
+ metadata.gz: a537cd742ff33b29714eb9a39f0fc10d6cba0be9
4
+ data.tar.gz: a6fdee91ff89c8762ed207ca5236b7ca80833a6e
5
5
  SHA512:
6
- metadata.gz: a79572d186959ca207bfab9df24a770f7a44dc9763e55f66100ca9c5f140b8d463f7b286d3ef5fff632c111efb711d056c5215d00989ae1d91542b3d01b2b997
7
- data.tar.gz: d02f800d3ee34a27b3aab8c8b36449d0ba2a6f3a09c6d2e774a4c15dc5845498560cd95c02bb5d615f68faae9f42f46c6beccb3efe28918518faed1c7b3acdf2
6
+ metadata.gz: db2af7eff088eb7bad2b159ed8e27360ae101141edc424ed96bec9f4765d74a7d2bb5cf616a57f24b23c7cc336cc0a1ca99194d99b54ccf7931340aac93c77aa
7
+ data.tar.gz: 0b5c8c71c9a52dca7505caa036fdef85ce321e7d6afe68b7c9c17eb8ad6b4444445ffa1b64845617c591b32cf7eaa9632164d91e9cee1ea755895a3a68d85374
data/README.md CHANGED
@@ -30,10 +30,18 @@ Or install it yourself as:
30
30
  OutlookCalendar::RefreshToken.new(token, refresh_token, client_id, client_secret, redirect_uri).call
31
31
 
32
32
  For getting a user calendar
33
- OutlookCalendar::RefreshToken.new(token).call
33
+ OutlookCalendar::Calenders.new(token).call
34
34
 
35
35
  For getting calendar based event
36
- OutlookCalendar::RefreshToken.new(token, start_time, end_time, select, calendar_id).call
36
+ OutlookCalendar::UserEvents.new(
37
+ token, outlook_params, selected_calendar
38
+ )
39
+ params = {
40
+ 'startDateTime'=> from_date,
41
+ 'endDateTime'=> to_date,
42
+ '$select'=> 'Subject,Start,End',
43
+ '$top'=> 1000
44
+ }
37
45
 
38
46
  default value of select = 'Subject' but you can also pass your values.
39
47
 
@@ -67,4 +75,6 @@ Everyone interacting in the OutlookCalendar project’s codebases, issue tracker
67
75
  ## Bug fixes
68
76
  version 0.1.6 Remove issue of double creation of event.
69
77
 
70
- version 0.1.7, fixing the response for event deletion.
78
+ version 0.1.7, fixing the response for event deletion.
79
+
80
+ version 0.1.9, Adding more params for getting events.
@@ -1,12 +1,10 @@
1
1
  module OutlookCalendar
2
2
  class UserEvents
3
- attr_reader :token, :start_time, :end_time, :select, :calendar_id
3
+ attr_reader :token, :params, :calendar_id
4
4
 
5
- def initialize(token, start_time, end_time, calendar_id = nil, select = 'Subject')
5
+ def initialize(token, params, calendar_id = nil)
6
6
  @token = token
7
- @start_time = start_time
8
- @end_time = end_time
9
- @select = select
7
+ @params = params
10
8
  @calendar_id = calendar_id
11
9
  end
12
10
 
@@ -33,12 +31,8 @@ module OutlookCalendar
33
31
  end
34
32
 
35
33
  def url
36
- return "https://outlook.office.com/api/v2.0/me/calendars/#{calendar_id}/calendarview#{params}" if calendar_id.present?
37
- "https://outlook.office.com/api/v2.0/me/calendarview#{params}"
38
- end
39
-
40
- def params
41
- "?startDateTime=#{start_time}&endDateTime=#{end_time}&$select=#{select}"
34
+ return "https://outlook.office.com/api/v2.0/me/calendars/#{calendar_id}/calendarview?#{params}" if calendar_id.present?
35
+ "https://outlook.office.com/api/v2.0/me/calendarview?#{params}"
42
36
  end
43
37
  end
44
38
  end
@@ -1,3 +1,3 @@
1
1
  module OutlookCalendar
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outlook_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - hitendra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-11 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2