Class: WhopSDK::Resources::Apps
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Apps
- Defined in:
- lib/whop_sdk/resources/apps.rb
Overview
Apps
Instance Method Summary collapse
-
#create(company_id:, name:, base_url: nil, icon: nil, redirect_uris: nil, request_options: {}) ⇒ WhopSDK::Models::App
Some parameter documentations has been truncated, see Models::AppCreateParams for more details.
-
#initialize(client:) ⇒ Apps
constructor
private
A new instance of Apps.
-
#list(after: nil, app_type: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, verified_apps_only: nil, view_type: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::AppListResponse>
Some parameter documentations has been truncated, see Models::AppListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::App
Retrieves the details of an existing app.
-
#update(id, app_store_description: nil, app_type: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, oauth_client_type: nil, openapi_path: nil, redirect_uris: nil, required_scopes: nil, skills_path: nil, status: nil, request_options: {}) ⇒ WhopSDK::Models::App
Some parameter documentations has been truncated, see Models::AppUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Apps
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Apps.
177 178 179 |
# File 'lib/whop_sdk/resources/apps.rb', line 177 def initialize(client:) @client = client end |
Instance Method Details
#create(company_id:, name:, base_url: nil, icon: nil, redirect_uris: nil, request_options: {}) ⇒ WhopSDK::Models::App
Some parameter documentations has been truncated, see Models::AppCreateParams for more details.
Register a new app on the Whop developer platform. Apps provide custom experiences that can be added to products.
Required permissions:
-
‘developer:create_app`
-
‘developer:manage_api_key`
‘biz_’
36 37 38 39 |
# File 'lib/whop_sdk/resources/apps.rb', line 36 def create(params) parsed, = WhopSDK::AppCreateParams.dump_request(params) @client.request(method: :post, path: "apps", body: parsed, model: WhopSDK::App, options: ) end |
#list(after: nil, app_type: nil, before: nil, company_id: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, verified_apps_only: nil, view_type: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::AppListResponse>
Some parameter documentations has been truncated, see Models::AppListParams for more details.
Returns a paginated list of apps on the Whop platform, with optional filtering by company, type, view support, and search query.
161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/whop_sdk/resources/apps.rb', line 161 def list(params = {}) parsed, = WhopSDK::AppListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "apps", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::AppListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::App
Retrieves the details of an existing app.
Required permissions:
-
‘developer:manage_api_key`
56 57 58 59 60 61 62 63 |
# File 'lib/whop_sdk/resources/apps.rb', line 56 def retrieve(id, params = {}) @client.request( method: :get, path: ["apps/%1$s", id], model: WhopSDK::App, options: params[:request_options] ) end |
#update(id, app_store_description: nil, app_type: nil, base_url: nil, dashboard_path: nil, description: nil, discover_path: nil, experience_path: nil, icon: nil, name: nil, oauth_client_type: nil, openapi_path: nil, redirect_uris: nil, required_scopes: nil, skills_path: nil, status: nil, request_options: {}) ⇒ WhopSDK::Models::App
Some parameter documentations has been truncated, see Models::AppUpdateParams for more details.
Update the settings, metadata, or status of an existing app on the Whop developer platform.
Required permissions:
-
‘developer:update_app`
-
‘developer:manage_api_key`
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/whop_sdk/resources/apps.rb', line 115 def update(id, params = {}) parsed, = WhopSDK::AppUpdateParams.dump_request(params) @client.request( method: :patch, path: ["apps/%1$s", id], body: parsed, model: WhopSDK::App, options: ) end |