Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Ruby
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
uses: ruby/setup-ruby@a30dfa457ad68707b8b910ac3a244714b61c0626 # v1.320.0
with:
ruby-version: 2.7
bundler-cache: true
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 26.1.0

* Added: `Apps` service for managing OAuth2 applications, keys, and installations
* Added: `OAuth2` service with authorize, grant, device authorization, and consent flows
* Added: account OAuth2 consent methods `list_consents`, `get_consent`, `delete_consent`, and consent token methods
* Added: app installation management methods to `Organization` and `Teams` services
* Added: `installation_access_token_duration` parameter to `project.update_o_auth2_server`
* Added: `token` parameter to `sites.get_deployment_download`
* Added: `oauth2.introspect` and organization installation key scopes

## 26.0.0

* Breaking: Removed `Health` service and all health models and enums
Expand Down
2 changes: 1 addition & 1 deletion appwrite.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |spec|

spec.name = 'appwrite'
spec.version = '26.0.0'
spec.version = '26.1.0'
spec.license = 'BSD-3-Clause'
spec.summary = 'Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API'
spec.author = 'Appwrite Team'
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/account/delete-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.delete_consent_token(
consent_id: '<CONSENT_ID>',
token_id: '<TOKEN_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/account/delete-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.delete_consent(
consent_id: '<CONSENT_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/get-consent-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.get_consent_token(
consent_id: '<CONSENT_ID>',
token_id: '<TOKEN_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/account/get-consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.get_consent(
consent_id: '<CONSENT_ID>'
)
```
18 changes: 18 additions & 0 deletions docs/examples/account/list-consent-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.list_consent_tokens(
consent_id: '<CONSENT_ID>',
queries: [], # optional
total: false # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/account/list-consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

account = Account.new(client)

result = account.list_consents(
queries: [], # optional
total: false # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/create-installation-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

apps = Apps.new(client)

result = apps.create_installation_token(
app_id: '<APP_ID>',
installation_id: '<INSTALLATION_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/apps/create-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.create_key(
app_id: '<APP_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/apps/create-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.create_secret(
app_id: '<APP_ID>'
)
```
34 changes: 34 additions & 0 deletions docs/examples/apps/create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.create(
app_id: '<APP_ID>',
name: '<NAME>',
redirect_uris: [],
description: '<DESCRIPTION>', # optional
client_uri: 'https://example.com', # optional
logo_uri: 'https://example.com', # optional
privacy_policy_url: 'https://example.com', # optional
terms_url: 'https://example.com', # optional
contacts: [], # optional
tagline: '<TAGLINE>', # optional
tags: [], # optional
images: [], # optional
support_url: 'https://example.com', # optional
data_deletion_url: 'https://example.com', # optional
post_logout_redirect_uris: [], # optional
enabled: false, # optional
type: 'public', # optional
device_flow: false, # optional
team_id: '<TEAM_ID>' # optional
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/delete-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.delete_key(
app_id: '<APP_ID>',
key_id: '<KEY_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/delete-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.delete_secret(
app_id: '<APP_ID>',
secret_id: '<SECRET_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/apps/delete-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.delete_tokens(
app_id: '<APP_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/apps/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.delete(
app_id: '<APP_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/get-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key

apps = Apps.new(client)

result = apps.get_installation(
app_id: '<APP_ID>',
installation_id: '<INSTALLATION_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/get-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.get_key(
app_id: '<APP_ID>',
key_id: '<KEY_ID>'
)
```
17 changes: 17 additions & 0 deletions docs/examples/apps/get-secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.get_secret(
app_id: '<APP_ID>',
secret_id: '<SECRET_ID>'
)
```
16 changes: 16 additions & 0 deletions docs/examples/apps/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.get(
app_id: '<APP_ID>'
)
```
14 changes: 14 additions & 0 deletions docs/examples/apps/list-installation-scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```ruby
require 'appwrite'

include Appwrite

client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with

apps = Apps.new(client)

result = apps.list_installation_scopes()
```
Loading