Class: LayerVault::Client
- Inherits:
-
Object
- Object
- LayerVault::Client
- Includes:
- Authentication, Files, Folders, Organizations, Projects, Revisions, Users, Configurable, Connection
- Defined in:
- lib/layervault/client.rb,
lib/layervault/client/files.rb,
lib/layervault/client/users.rb,
lib/layervault/client/folders.rb,
lib/layervault/client/projects.rb,
lib/layervault/client/revisions.rb,
lib/layervault/client/organizations.rb
Defined Under Namespace
Modules: Files, Folders, Organizations, Projects, Revisions, Users
Instance Attribute Summary
Attributes included from Configurable
#access_token, #api_endpoint, #middleware, #user_agent
Instance Method Summary collapse
- #delete(url, options = {}) ⇒ Object
- #get(url, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #post(url, options = {}) ⇒ Object
- #put(url, options = {}) ⇒ Object
Methods included from Revisions
#feedback_items, #meta, #preview, #revision
Methods included from Files
#create_file, #delete_file, #file, #move_file, #previews, #revisions, #sync_check
Methods included from Folders
#change_folder_color, #create_folder, #delete_folder, #folder, #move_folder
Methods included from Projects
#change_project_folder_color, #create_project, #delete_project, #move_project, #project
Methods included from Organizations
Methods included from Users
Methods included from Connection
Methods included from Configurable
Methods included from Authentication
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
39 40 41 42 43 |
# File 'lib/layervault/client.rb', line 39 def initialize(={}) LayerVault::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", [key] || LayerVault.instance_variable_get(:"@#{key}")) end end |
Instance Method Details
#delete(url, options = {}) ⇒ Object
57 58 59 |
# File 'lib/layervault/client.rb', line 57 def delete(url, = {}) request :delete, url, end |
#get(url, options = {}) ⇒ Object
45 46 47 |
# File 'lib/layervault/client.rb', line 45 def get(url, = {}) request :get, url, end |
#post(url, options = {}) ⇒ Object
49 50 51 |
# File 'lib/layervault/client.rb', line 49 def post(url, = {}) request :post, url, end |
#put(url, options = {}) ⇒ Object
53 54 55 |
# File 'lib/layervault/client.rb', line 53 def put(url, = {}) request :put, url, end |