蜂鸟Pro v2.0.1 - 基础框架版本 (待完善)
## 当前状态 - 插件界面已完成重命名 (cursorpro → hummingbird) - 双账号池 UI 已实现 (Auto/Pro 卡片) - 后端已切换到 MySQL 数据库 - 添加了 Cursor 官方用量 API 文档 ## 已知问题 (待修复) 1. 激活时检查账号导致无账号时激活失败 2. 未启用无感换号时不应获取账号 3. 账号用量模块不显示 (seamless 未启用时应隐藏) 4. 积分显示为 0 (后端未正确返回) 5. Auto/Pro 双密钥逻辑混乱,状态不同步 6. 账号添加后无自动分析功能 ## 下一版本计划 - 重构数据模型,优化账号状态管理 - 实现 Cursor API 自动分析账号 - 修复激活流程,不依赖账号 - 启用无感时才分配账号 - 完善账号用量实时显示 ## 文件说明 - docs/系统设计文档.md - 完整架构设计 - cursor 官方用量接口.md - Cursor API 文档 - 参考计费/ - Vibeviewer 开源项目参考 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/1024-mac.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/128-mac.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/16-mac.png
Normal file
|
After Width: | Height: | Size: 266 B |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/256-mac.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/32-mac.png
Normal file
|
After Width: | Height: | Size: 580 B |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/512-mac.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
参考计费/Vibeviewer/Assets.xcassets/AppIcon.appiconset/64-mac.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "1024-mac.png",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"filename" : "16-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "32-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "16x16"
|
||||
},
|
||||
{
|
||||
"filename" : "32-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "64-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "32x32"
|
||||
},
|
||||
{
|
||||
"filename" : "128-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "256-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "128x128"
|
||||
},
|
||||
{
|
||||
"filename" : "256-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "512-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "256x256"
|
||||
},
|
||||
{
|
||||
"filename" : "512-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "1x",
|
||||
"size" : "512x512"
|
||||
},
|
||||
{
|
||||
"filename" : "1024-mac.png",
|
||||
"idiom" : "mac",
|
||||
"scale" : "2x",
|
||||
"size" : "512x512"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
参考计费/Vibeviewer/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
23
参考计费/Vibeviewer/Assets.xcassets/menu_bar_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "menu_bar_icon.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "menu_bar_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "menu_bar_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
参考计费/Vibeviewer/Assets.xcassets/menu_bar_icon.imageset/menu_bar_icon.png
vendored
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
参考计费/Vibeviewer/Assets.xcassets/menu_bar_icon.imageset/menu_bar_icon@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 783 B |
BIN
参考计费/Vibeviewer/Assets.xcassets/menu_bar_icon.imageset/menu_bar_icon@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
24
参考计费/Vibeviewer/ContentView.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// Vibeviewer
|
||||
//
|
||||
// Created by Groot chen on 2025/8/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image(systemName: "globe")
|
||||
.imageScale(.large)
|
||||
.foregroundStyle(.tint)
|
||||
Text("Hello, world!")
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
14
参考计费/Vibeviewer/Vibeviewer.entitlements
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.downloads.read-write</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
109
参考计费/Vibeviewer/VibeviewerApp.swift
Normal file
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// VibeviewerApp.swift
|
||||
// Vibeviewer
|
||||
//
|
||||
// Created by Groot chen on 2025/8/24.
|
||||
//
|
||||
|
||||
import Observation
|
||||
import SwiftUI
|
||||
import VibeviewerAPI
|
||||
import VibeviewerAppEnvironment
|
||||
import VibeviewerCore
|
||||
import VibeviewerLoginUI
|
||||
import VibeviewerMenuUI
|
||||
import VibeviewerModel
|
||||
import VibeviewerSettingsUI
|
||||
import VibeviewerStorage
|
||||
import VibeviewerShareUI
|
||||
|
||||
@main
|
||||
struct VibeviewerApp: App {
|
||||
@State private var settings: AppSettings = DefaultCursorStorageService.loadSettingsSync()
|
||||
|
||||
@State private var session: VibeviewerModel.AppSession = .init(
|
||||
credentials: DefaultCursorStorageService.loadCredentialsSync(),
|
||||
snapshot: DefaultCursorStorageService.loadDashboardSnapshotSync()
|
||||
)
|
||||
@State private var refresher: any DashboardRefreshService = NoopDashboardRefreshService()
|
||||
@State private var loginService: any LoginService = NoopLoginService()
|
||||
@State private var updateService: any UpdateService = NoopUpdateService()
|
||||
|
||||
var body: some Scene {
|
||||
MenuBarExtra {
|
||||
MenuPopoverView()
|
||||
.environment(\.cursorService, DefaultCursorService())
|
||||
.environment(\.cursorStorage, DefaultCursorStorageService())
|
||||
.environment(\.loginWindowManager, LoginWindowManager.shared)
|
||||
.environment(\.settingsWindowManager, SettingsWindowManager.shared)
|
||||
.environment(\.dashboardRefreshService, self.refresher)
|
||||
.environment(\.loginService, self.loginService)
|
||||
.environment(\.launchAtLoginService, DefaultLaunchAtLoginService())
|
||||
.environment(\.updateService, self.updateService)
|
||||
.environment(self.settings)
|
||||
.environment(self.session)
|
||||
.menuBarExtraWindowCorner()
|
||||
.onAppear {
|
||||
SettingsWindowManager.shared.appSettings = self.settings
|
||||
SettingsWindowManager.shared.appSession = self.session
|
||||
SettingsWindowManager.shared.dashboardRefreshService = self.refresher
|
||||
SettingsWindowManager.shared.updateService = self.updateService
|
||||
}
|
||||
.id(self.settings.appearance)
|
||||
.applyPreferredColorScheme(self.settings.appearance)
|
||||
} label: {
|
||||
menuBarLabel()
|
||||
}
|
||||
.menuBarExtraStyle(.window)
|
||||
.windowResizability(.contentSize)
|
||||
}
|
||||
|
||||
private func menuBarLabel() -> some View {
|
||||
HStack(spacing: 4) {
|
||||
Image(.menuBarIcon)
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.frame(width: 16, height: 16)
|
||||
.padding(.trailing, 4)
|
||||
.foregroundStyle(.primary)
|
||||
Text({
|
||||
guard let snapshot = self.session.snapshot else { return "" }
|
||||
return snapshot.displayTotalUsageCents.dollarStringFromCents
|
||||
}())
|
||||
.font(.app(.satoshiBold, size: 15))
|
||||
.foregroundColor(.primary)
|
||||
}
|
||||
.task {
|
||||
await self.setupDashboardRefreshService()
|
||||
}
|
||||
}
|
||||
|
||||
private func setupDashboardRefreshService() async {
|
||||
let api = DefaultCursorService()
|
||||
let storage = DefaultCursorStorageService()
|
||||
|
||||
let dashboardRefreshSvc = DefaultDashboardRefreshService(
|
||||
api: api,
|
||||
storage: storage,
|
||||
settings: self.settings,
|
||||
session: self.session
|
||||
)
|
||||
let screenPowerSvc = DefaultScreenPowerStateService()
|
||||
let powerAwareSvc = PowerAwareDashboardRefreshService(
|
||||
refreshService: dashboardRefreshSvc,
|
||||
screenPowerService: screenPowerSvc
|
||||
)
|
||||
self.refresher = powerAwareSvc
|
||||
|
||||
// 创建登录服务,依赖刷新服务
|
||||
self.loginService = DefaultLoginService(
|
||||
api: api,
|
||||
storage: storage,
|
||||
refresher: self.refresher,
|
||||
session: self.session
|
||||
)
|
||||
|
||||
await self.refresher.start()
|
||||
}
|
||||
}
|
||||
|
||||
1020
参考计费/Vibeviewer/cursor_web_api_curl/get_filter_usage.txt
Normal file
34
参考计费/Vibeviewer/cursor_web_api_curl/get_me.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
// request 获取我账号的信息,id,邮箱等
|
||||
|
||||
curl 'https://cursor.com/api/dashboard/get-me' \
|
||||
-H 'accept: */*' \
|
||||
-H 'accept-language: zh-CN,zh;q=0.9' \
|
||||
-H 'cache-control: no-cache' \
|
||||
-H 'content-type: application/json' \
|
||||
-b 'ph_phc_Rbh7SDD9nCGKRBOqjoiijTSAW8WMAJpVQEs6hGEPqZp_posthog=%7B%22distinct_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24device_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1724985313038%2C%22191a112dc194d6-00f44b74fff70c-18525637-384000-191a112dc1a2457%22%2C1724984253465%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; ph_phc_OrLbTmMnw0Ou1C4xuVIWJJaijIcp4J9Cm4JsAVRLtJo_posthog=%7B%22distinct_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24device_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1728977816053%2C%221928f155ee2417b-0fc04a964da2e1-16525637-384000-1928f155ee32fa4%22%2C1728977395426%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; IndrX2ZuSmZramJSX0NIYUZoRzRzUGZ0cENIVHpHNXk0VE0ya2ZiUkVzQU14X2Fub255bW91c1VzZXJJZCI%3D=Ijg4NGNiZDkwLWNiN2MtNDU2OC05NTJiLWYzMDM1MzI2MmI2OSI=; NEXT_LOCALE=en; WorkosCursorSessionToken=user_01JRXG9J1YYXYF39Y4NAR5AMCE%3A%3AeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSlJYRzlKMVlZWFlGMzlZNE5BUjVBTUNFIiwidGltZSI6IjE3NTQ5MjkwMzciLCJyYW5kb21uZXNzIjoiOTI1OTg5M2MtZGM1YS00YmFiIiwiZXhwIjoxNzYwMTEzMDM3LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20iLCJ0eXBlIjoid2ViIn0.6xFI-QuOQ1mEs9NbZ2Q-b9_3j3X6U1_Jy_pVfUtGPlg; ph_phc_TXdpocbGVeZVm5VJmAsHTMrCofBQu3e0kN8HGMNGTVW_posthog=%7B%22distinct_id%22%3A%22019173c4-44fa-7c89-850b-6ade7fe8eed6%22%2C%22%24sesid%22%3A%5B1756035992474%2C%220198dbe6-cb44-7288-badf-61d3ca2c8d5c%22%2C1756035992388%5D%7D; htjs_anonymous_id=e1fbd20a-84b9-4a9b-990d-15fc360fc973; htjs_sesh={%22id%22:1756035992760%2C%22expiresAt%22:1756037792760%2C%22timeout%22:1800000%2C%22sessionStart%22:true%2C%22autoTrack%22:true}' \
|
||||
-H 'dnt: 1' \
|
||||
-H 'origin: https://cursor.com' \
|
||||
-H 'pragma: no-cache' \
|
||||
-H 'priority: u=1, i' \
|
||||
-H 'referer: https://cursor.com/dashboard' \
|
||||
-H 'sec-ch-ua: "Chromium";v="139", "Not;A=Brand";v="99"' \
|
||||
-H 'sec-ch-ua-arch: "arm"' \
|
||||
-H 'sec-ch-ua-bitness: "64"' \
|
||||
-H 'sec-ch-ua-mobile: ?0' \
|
||||
-H 'sec-ch-ua-platform: "macOS"' \
|
||||
-H 'sec-ch-ua-platform-version: "15.6.0"' \
|
||||
-H 'sec-fetch-dest: empty' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'sec-fetch-site: same-origin' \
|
||||
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36' \
|
||||
--data-raw '{}'
|
||||
|
||||
// Response
|
||||
|
||||
{
|
||||
"authId": "auth0|user_01JRXG9J1YYXYF39Y4NAR5AMCE",
|
||||
"userId": 190525724,
|
||||
"email": "svendaviskl@outlook.pt",
|
||||
"workosId": "user_01JRXG9J1YYXYF39Y4NAR5AMCE",
|
||||
"teamId": 15113845
|
||||
}
|
||||
83
参考计费/Vibeviewer/cursor_web_api_curl/get_team_spend.txt
Normal file
@@ -0,0 +1,83 @@
|
||||
// request, 获取我team中的使用量情况,使用这里与我id相同的spendCents和fastPremiumRequests,还有hardLimitOverrideDollars作为我的用量数据源
|
||||
|
||||
curl 'https://cursor.com/api/dashboard/get-team-spend' \
|
||||
-H 'accept: */*' \
|
||||
-H 'accept-language: zh-CN,zh;q=0.9' \
|
||||
-H 'cache-control: no-cache' \
|
||||
-H 'content-type: application/json' \
|
||||
-b 'ph_phc_Rbh7SDD9nCGKRBOqjoiijTSAW8WMAJpVQEs6hGEPqZp_posthog=%7B%22distinct_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24device_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1724985313038%2C%22191a112dc194d6-00f44b74fff70c-18525637-384000-191a112dc1a2457%22%2C1724984253465%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; ph_phc_OrLbTmMnw0Ou1C4xuVIWJJaijIcp4J9Cm4JsAVRLtJo_posthog=%7B%22distinct_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24device_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1728977816053%2C%221928f155ee2417b-0fc04a964da2e1-16525637-384000-1928f155ee32fa4%22%2C1728977395426%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; IndrX2ZuSmZramJSX0NIYUZoRzRzUGZ0cENIVHpHNXk0VE0ya2ZiUkVzQU14X2Fub255bW91c1VzZXJJZCI%3D=Ijg4NGNiZDkwLWNiN2MtNDU2OC05NTJiLWYzMDM1MzI2MmI2OSI=; NEXT_LOCALE=en; WorkosCursorSessionToken=user_01JRXG9J1YYXYF39Y4NAR5AMCE%3A%3AeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSlJYRzlKMVlZWFlGMzlZNE5BUjVBTUNFIiwidGltZSI6IjE3NTQ5MjkwMzciLCJyYW5kb21uZXNzIjoiOTI1OTg5M2MtZGM1YS00YmFiIiwiZXhwIjoxNzYwMTEzMDM3LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20iLCJ0eXBlIjoid2ViIn0.6xFI-QuOQ1mEs9NbZ2Q-b9_3j3X6U1_Jy_pVfUtGPlg; ph_phc_TXdpocbGVeZVm5VJmAsHTMrCofBQu3e0kN8HGMNGTVW_posthog=%7B%22distinct_id%22%3A%22019173c4-44fa-7c89-850b-6ade7fe8eed6%22%2C%22%24sesid%22%3A%5B1756035992474%2C%220198dbe6-cb44-7288-badf-61d3ca2c8d5c%22%2C1756035992388%5D%7D; htjs_anonymous_id=e1fbd20a-84b9-4a9b-990d-15fc360fc973; htjs_sesh={%22id%22:1756035992760%2C%22expiresAt%22:1756037792760%2C%22timeout%22:1800000%2C%22sessionStart%22:true%2C%22autoTrack%22:true}' \
|
||||
-H 'dnt: 1' \
|
||||
-H 'origin: https://cursor.com' \
|
||||
-H 'pragma: no-cache' \
|
||||
-H 'priority: u=1, i' \
|
||||
-H 'referer: https://cursor.com/dashboard' \
|
||||
-H 'sec-ch-ua: "Chromium";v="139", "Not;A=Brand";v="99"' \
|
||||
-H 'sec-ch-ua-arch: "arm"' \
|
||||
-H 'sec-ch-ua-bitness: "64"' \
|
||||
-H 'sec-ch-ua-mobile: ?0' \
|
||||
-H 'sec-ch-ua-platform: "macOS"' \
|
||||
-H 'sec-ch-ua-platform-version: "15.6.0"' \
|
||||
-H 'sec-fetch-dest: empty' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'sec-fetch-site: same-origin' \
|
||||
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36' \
|
||||
--data-raw '{"teamId":15113845}'
|
||||
|
||||
|
||||
// Response
|
||||
|
||||
{
|
||||
"teamMemberSpend": [
|
||||
{
|
||||
"userId": 190534072,
|
||||
"email": "deltamurazikyt@outlook.sa",
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"hardLimitOverrideDollars": 20
|
||||
},
|
||||
{
|
||||
"userId": 190555359,
|
||||
"email": "jackiestammhtg@outlook.pt",
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"hardLimitOverrideDollars": 40
|
||||
},
|
||||
{
|
||||
"userId": 190553762,
|
||||
"email": "lizziequigleywv@outlook.kr",
|
||||
"role": "TEAM_ROLE_OWNER",
|
||||
"hardLimitOverrideDollars": 1
|
||||
},
|
||||
{
|
||||
"userId": 190552176,
|
||||
"email": "mayamoenqky@outlook.dk",
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"hardLimitOverrideDollars": 40
|
||||
},
|
||||
{
|
||||
"userId": 190549879,
|
||||
"email": "nicklaussanfordtux@outlook.pt",
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"hardLimitOverrideDollars": 20
|
||||
},
|
||||
{
|
||||
"userId": 190525724,
|
||||
"spendCents": 875,
|
||||
"fastPremiumRequests": 500,
|
||||
"email": "svendaviskl@outlook.pt",
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"hardLimitOverrideDollars": 20
|
||||
}
|
||||
],
|
||||
"subscriptionCycleStart": "1754879994000",
|
||||
"totalMembers": 6,
|
||||
"totalPages": 1,
|
||||
"totalByRole": [
|
||||
{
|
||||
"role": "TEAM_ROLE_OWNER",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"role": "TEAM_ROLE_MEMBER",
|
||||
"count": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
48
参考计费/Vibeviewer/cursor_web_api_curl/get_usage.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
// request 获取我Plan中已使用的requst数量,numRequests表示套餐中已发送的request,numRequestsTotal作为套餐中和按量付费情况下总的发送request情况
|
||||
|
||||
curl 'https://cursor.com/api/usage?user=user_01JRXG9J1YYXYF39Y4NAR5AMCE' \
|
||||
-H 'accept: */*' \
|
||||
-H 'accept-language: zh-CN,zh;q=0.9' \
|
||||
-H 'cache-control: no-cache' \
|
||||
-b 'ph_phc_Rbh7SDD9nCGKRBOqjoiijTSAW8WMAJpVQEs6hGEPqZp_posthog=%7B%22distinct_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24device_id%22%3A%2219173c4ad7e1493-06705278063831-18525637-384000-19173c4ad7f32e6%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1724985313038%2C%22191a112dc194d6-00f44b74fff70c-18525637-384000-191a112dc1a2457%22%2C1724984253465%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; ph_phc_OrLbTmMnw0Ou1C4xuVIWJJaijIcp4J9Cm4JsAVRLtJo_posthog=%7B%22distinct_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24device_id%22%3A%22191754b04a119a8-0ed566da8c313e-18525637-384000-191754b04a23a15%22%2C%22%24user_state%22%3A%22anonymous%22%2C%22%24sesid%22%3A%5B1728977816053%2C%221928f155ee2417b-0fc04a964da2e1-16525637-384000-1928f155ee32fa4%22%2C1728977395426%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24autocapture_disabled_server_side%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%2C%22%24feature_flag_payloads%22%3A%7B%7D%7D; IndrX2ZuSmZramJSX0NIYUZoRzRzUGZ0cENIVHpHNXk0VE0ya2ZiUkVzQU14X2Fub255bW91c1VzZXJJZCI%3D=Ijg4NGNiZDkwLWNiN2MtNDU2OC05NTJiLWYzMDM1MzI2MmI2OSI=; NEXT_LOCALE=en; WorkosCursorSessionToken=user_01JRXG9J1YYXYF39Y4NAR5AMCE%3A%3AeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSlJYRzlKMVlZWFlGMzlZNE5BUjVBTUNFIiwidGltZSI6IjE3NTQ5MjkwMzciLCJyYW5kb21uZXNzIjoiOTI1OTg5M2MtZGM1YS00YmFiIiwiZXhwIjoxNzYwMTEzMDM3LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20iLCJ0eXBlIjoid2ViIn0.6xFI-QuOQ1mEs9NbZ2Q-b9_3j3X6U1_Jy_pVfUtGPlg; ph_phc_TXdpocbGVeZVm5VJmAsHTMrCofBQu3e0kN8HGMNGTVW_posthog=%7B%22distinct_id%22%3A%22019173c4-44fa-7c89-850b-6ade7fe8eed6%22%2C%22%24sesid%22%3A%5B1756035992474%2C%220198dbe6-cb44-7288-badf-61d3ca2c8d5c%22%2C1756035992388%5D%7D; htjs_anonymous_id=e1fbd20a-84b9-4a9b-990d-15fc360fc973; htjs_sesh={%22id%22:1756035992760%2C%22expiresAt%22:1756037792760%2C%22timeout%22:1800000%2C%22sessionStart%22:true%2C%22autoTrack%22:true}' \
|
||||
-H 'dnt: 1' \
|
||||
-H 'pragma: no-cache' \
|
||||
-H 'priority: u=1, i' \
|
||||
-H 'referer: https://cursor.com/dashboard' \
|
||||
-H 'sec-ch-ua: "Chromium";v="139", "Not;A=Brand";v="99"' \
|
||||
-H 'sec-ch-ua-arch: "arm"' \
|
||||
-H 'sec-ch-ua-bitness: "64"' \
|
||||
-H 'sec-ch-ua-mobile: ?0' \
|
||||
-H 'sec-ch-ua-platform: "macOS"' \
|
||||
-H 'sec-ch-ua-platform-version: "15.6.0"' \
|
||||
-H 'sec-fetch-dest: empty' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'sec-fetch-site: same-origin' \
|
||||
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'
|
||||
|
||||
// Response
|
||||
|
||||
{
|
||||
"gpt-4": {
|
||||
"numRequests": 501,
|
||||
"numRequestsTotal": 654,
|
||||
"numTokens": 8351834,
|
||||
"maxRequestUsage": 500,
|
||||
"maxTokenUsage": null
|
||||
},
|
||||
"gpt-3.5-turbo": {
|
||||
"numRequests": 6,
|
||||
"numRequestsTotal": 6,
|
||||
"numTokens": 131640,
|
||||
"maxRequestUsage": null,
|
||||
"maxTokenUsage": null
|
||||
},
|
||||
"gpt-4-32k": {
|
||||
"numRequests": 0,
|
||||
"numRequestsTotal": 0,
|
||||
"numTokens": 0,
|
||||
"maxRequestUsage": 50,
|
||||
"maxTokenUsage": null
|
||||
},
|
||||
"startOfMonth": "2025-08-11T02:39:54.000Z"
|
||||
}
|
||||