Module: Parse::API::Schema
- Included in:
- Client
- Defined in:
- lib/parse/api/schema.rb
Overview
Defines the Schema interface for the Parse REST API
Instance Method Summary collapse
-
#create_schema(className, schema) ⇒ Parse::Response
Create a new collection with the specific schema.
-
#schema(className) ⇒ Parse::Response
Get the schema for a collection.
-
#schemas ⇒ Parse::Response
Get all the schemas for the application.
-
#update_schema(className, schema) ⇒ Parse::Response
Update the schema for a collection.
Instance Method Details
#create_schema(className, schema) ⇒ Parse::Response
Create a new collection with the specific schema.
32 33 34 |
# File 'lib/parse/api/schema.rb', line 32 def create_schema(className, schema) request :post, "#{SCHEMAS_PATH}/#{className}", body: schema end |
#schema(className) ⇒ Parse::Response
Get the schema for a collection.
22 23 24 25 |
# File 'lib/parse/api/schema.rb', line 22 def schema(className) opts = {cache: false} request :get, "#{SCHEMAS_PATH}/#{className}", opts: opts end |
#schemas ⇒ Parse::Response
Get all the schemas for the application.
14 15 16 17 |
# File 'lib/parse/api/schema.rb', line 14 def schemas opts = {cache: false} request :get, SCHEMAS_PATH, opts: opts end |
#update_schema(className, schema) ⇒ Parse::Response
Update the schema for a collection.
41 42 43 |
# File 'lib/parse/api/schema.rb', line 41 def update_schema(className, schema) request :put, "#{SCHEMAS_PATH}/#{className}", body: schema end |