-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update SDKs to new RC version
- Loading branch information
1 parent
35e13f6
commit b7913a4
Showing
10 changed files
with
137 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'appwrite' | ||
|
||
include Appwrite | ||
|
||
client = Client.new | ||
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint | ||
.set_project('<YOUR_PROJECT_ID>') # Your project ID | ||
.set_key('<YOUR_API_KEY>') # Your secret API key | ||
|
||
functions = Functions.new(client) | ||
|
||
result = functions.list_specifications() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#frozen_string_literal: true | ||
|
||
module Appwrite | ||
module Models | ||
class Specification | ||
attr_reader :memory | ||
attr_reader :cpus | ||
attr_reader :enabled | ||
attr_reader :slug | ||
|
||
def initialize( | ||
memory:, | ||
cpus:, | ||
enabled:, | ||
slug: | ||
) | ||
@memory = memory | ||
@cpus = cpus | ||
@enabled = enabled | ||
@slug = slug | ||
end | ||
|
||
def self.from(map:) | ||
Specification.new( | ||
memory: map["memory"], | ||
cpus: map["cpus"], | ||
enabled: map["enabled"], | ||
slug: map["slug"] | ||
) | ||
end | ||
|
||
def to_map | ||
{ | ||
"memory": @memory, | ||
"cpus": @cpus, | ||
"enabled": @enabled, | ||
"slug": @slug | ||
} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#frozen_string_literal: true | ||
|
||
module Appwrite | ||
module Models | ||
class SpecificationList | ||
attr_reader :total | ||
attr_reader :specifications | ||
|
||
def initialize( | ||
total:, | ||
specifications: | ||
) | ||
@total = total | ||
@specifications = specifications | ||
end | ||
|
||
def self.from(map:) | ||
SpecificationList.new( | ||
total: map["total"], | ||
specifications: map["specifications"].map { |it| Specification.from(map: it) } | ||
) | ||
end | ||
|
||
def to_map | ||
{ | ||
"total": @total, | ||
"specifications": @specifications.map { |it| it.to_map } | ||
} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters