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.
31 32 33 | # File 'lib/parse/api/schema.rb', line 31 def create_schema(className, schema) request :post, "#{SCHEMAS_PATH}/#{className}", body: schema end |
#schema(className) ⇒ Parse::Response
Get the schema for a collection.
21 22 23 24 | # File 'lib/parse/api/schema.rb', line 21 def schema(className) opts = { cache: false } request :get, "#{SCHEMAS_PATH}/#{className}", opts: opts end |
#schemas ⇒ Parse::Response
Get all the schemas for the application.
13 14 15 16 | # File 'lib/parse/api/schema.rb', line 13 def schemas opts = { cache: false } request :get, SCHEMAS_PATH, opts: opts end |
#update_schema(className, schema) ⇒ Parse::Response
Update the schema for a collection.
40 41 42 | # File 'lib/parse/api/schema.rb', line 40 def update_schema(className, schema) request :put, "#{SCHEMAS_PATH}/#{className}", body: schema end |