Class: WhopSDK::Resources::Apps
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Apps
- Defined in:
- lib/whop_sdk/resources/apps.rb,
sig/whop_sdk/resources/apps.rbs
Overview
An App is software you build on Whop. It can be a hosted web app served at
<route>.whop.app or an API integration installed as an experience, and it
belongs to the account that owns its credentials, settings, builds, and runtime
logs.
Use the Apps API to manage app configuration and, for hosted apps, read server runtime logs for console output, uncaught exceptions, and failed requests. Logs are retained for 7 days and can be filtered by build, level, time window, and message text.
Instance Method Summary collapse
-
#create(company_id:, name:, base_url: nil, icon: nil, redirect_uris: nil, route: 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.
-
#logs(id, after: nil, app_build_id: nil, before: nil, created_after: nil, created_before: nil, first: nil, level: nil, query: nil, request_options: {}) ⇒ WhopSDK::Models::AppLogsResponse
Some parameter documentations has been truncated, see Models::AppLogsParams 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, route: nil, secrets: 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.
237 238 239 |
# File 'lib/whop_sdk/resources/apps.rb', line 237 def initialize(client:) @client = client end |
Instance Method Details
#create(company_id:, name:, base_url: nil, icon: nil, redirect_uris: nil, route: 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_appdeveloper:manage_api_keydeveloper:update_app
'biz_'
47 48 49 50 |
# File 'lib/whop_sdk/resources/apps.rb', line 47 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.
177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/whop_sdk/resources/apps.rb', line 177 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 |
#logs(id, after: nil, app_build_id: nil, before: nil, created_after: nil, created_before: nil, first: nil, level: nil, query: nil, request_options: {}) ⇒ WhopSDK::Models::AppLogsResponse
Some parameter documentations has been truncated, see Models::AppLogsParams for more details.
Lists a hosted app's server runtime logs, most recent first: console output, uncaught exceptions, and failed-request summaries captured on whop.app hosting. Logs are retained for 7 days.
222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/whop_sdk/resources/apps.rb', line 222 def logs(id, params = {}) parsed, = WhopSDK::AppLogsParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["apps/%1$s/logs", id], query: query, model: WhopSDK::Models::AppLogsResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::App
Retrieves the details of an existing app.
Required permissions:
developer:manage_api_keydeveloper:update_app
68 69 70 71 72 73 74 75 |
# File 'lib/whop_sdk/resources/apps.rb', line 68 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, route: nil, secrets: 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_appdeveloper:manage_api_key
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/whop_sdk/resources/apps.rb', line 131 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 |