Skip to content

Commit

Permalink
Adding configurations, availability, sessions, bookings endpoint unde…
Browse files Browse the repository at this point in the history
…r Scheduler to match with other SDKs architecture
  • Loading branch information
Subash Pradhan committed Oct 24, 2024
1 parent 6f7e6be commit 23618ba
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 27 deletions.
32 changes: 5 additions & 27 deletions lib/nylas/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require_relative "resources/webhooks"
require_relative "resources/applications"
require_relative "resources/folders"
require_relative "resources/scheduling"
require_relative "resources/configurations"
require_relative "resources/sessions"
require_relative "resources/availability"
Expand Down Expand Up @@ -122,33 +123,10 @@ def webhooks
Webhooks.new(self)
end

# The configuration resources for your Nylas application.
#
# @return [Nylas::Scheduling::Confiugrations] Scheduling configuration resources
# for your Nylas application.
def configurations
Configurations.new(self)
end

# The Booking resources for your Nylas application.
#
# @return [Nylas::Scheduling::Bookings] Scheduling booking resources for your Nylas application.
def bookings
Bookings.new(self)
end

# The Session resources for your Nylas application.
#
# @return [Nylas::Scheduling::Sessions] Scheduling session resources for your Nylas application.
def sessions
Sessions.new(self)
end

# The availability resources for your Nylas application.
#
# @return [Nylas::Scheduling::Availability] Scheduling availability resources for your Nylas application.
def availability
Availability.new(self)
# The Scheduler resources for your Nylas application.
# @return [Nylas::Scheduler] Scheduler resources for your Nylas application.
def scheduler
Scheduler.new(self)
end
end
end
41 changes: 41 additions & 0 deletions lib/nylas/resources/scheduling.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
require_relative './configurations'
require_relative './sessions'
require_relative './bookings'
require_relative './availability'

module Nylas
class Scheduler
def initialize(api_client)
@api_client = api_client
@configurations = Configurations.new(@api_client)
@bookings = Bookings.new(@api_client)
@sessions = Sessions.new(@api_client)
@availability = Availability.new(@api_client)
end

# The configuration resources for your Nylas application.
# @return [Nylas::Scheduler::Confiugrations] Scheduler configuration resources
# for your Nylas application.
def configurations
@configurations
end

# The Session resources for your Nylas application.
# @return [Nylas::Scheduler::Sessions] Scheduler session resources for your Nylas application.
def sessions
@sessions
end

# The Booking resources for your Nylas application.
# @return [Nylas::Scheduler::Bookings] Scheduler booking resources for your Nylas application.
def bookings
@bookings
end

# The availability resources for your Nylas application.
# @return [Nylas::Scheduler::Availability] Scheduling availability resources for your Nylas application.
def availability
@availability
end
end
end

0 comments on commit 23618ba

Please sign in to comment.