Class: Nextcloud::OcsApi

Inherits:
Api
  • Object
show all
Defined in:
lib/nextcloud/ocs_api.rb

Instance Method Summary collapse

Methods inherited from Api

#initialize, #request

Constructor Details

This class inherits a constructor from Nextcloud::Api

Instance Method Details

#app(appid = nil) ⇒ Object

Initiates App class

Parameters:

  • appid (Ingteger, nil) (defaults to: nil)

    Nextcloud app appid

Returns:

  • (Object)

    Application instance


23
24
25
# File 'lib/nextcloud/ocs_api.rb', line 23

def app(appid = nil)
  Ocs::App.new(self, appid)
end

#file_sharingObject

Initiates File Sharing class

Returns:

  • (Object)

    File Sharing instance


30
31
32
# File 'lib/nextcloud/ocs_api.rb', line 30

def file_sharing
  Ocs::FileSharingApi.new(url: @url, username: @username, password: @password)
end

#group(groupid = nil) ⇒ Object

Initiates Group class

Parameters:

  • groupid (Ingteger, nil) (defaults to: nil)

    Nextcloud group groupid

Returns:

  • (Object)

    Group instance


15
16
17
# File 'lib/nextcloud/ocs_api.rb', line 15

def group(groupid = nil)
  Ocs::Group.new(self, groupid)
end

#user(userid = nil) ⇒ Object

Initiates User class

Parameters:

  • userid (Ingteger, nil) (defaults to: nil)

    Nextcloud user userid

Returns:

  • (Object)

    User instance


7
8
9
# File 'lib/nextcloud/ocs_api.rb', line 7

def user(userid = nil)
  Ocs::User.new(self, userid)
end