File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 10121012 ]
10131013 }
10141014 ]
1015+ },
1016+ {
1017+ "tab" : " Pilot" ,
1018+ "groups" : [
1019+ {
1020+ "group" : " Pilot" ,
1021+ "pages" : [
1022+ " ppu-pilot"
1023+ ]
1024+ }
1025+ ]
10151026 }
10161027 ]
10171028 }
Original file line number Diff line number Diff line change 1+ // Global variable to store pricing data
2+ window . pricingData = {
3+ "eventTypePricing" : {
4+ "Post" : 0.005 ,
5+ "User" : 0.01
6+ } ,
7+ "requestTypePricing" : {
8+ "Write" : 0.01
9+ } ,
10+ "defaultCost" : 0.0
11+ } ;
12+
13+ // // Fetch pricing data from X console API
14+ // async function fetchPricingData() {
15+ // try {
16+ // const response = await fetch('https://console.x.com/api/credits/pricing', {
17+ // method: 'GET',
18+ // headers: {
19+ // 'dtab-local': '/s/datadelivery-foundation/dev-portal-api:https=>/srv#/staging1/pdxa/datadelivery-foundation/dev-portal-api:https'
20+ // }
21+ // });
22+
23+ // if (!response.ok) {
24+ // throw new Error(`HTTP error! status: ${response.status}`);
25+ // }
26+
27+ // const data = await response.json();
28+ // console.log('Pricing data:', data);
29+
30+ // // Set the global variable
31+ // window.pricingData = data;
32+
33+ // return data;
34+ // } catch (error) {
35+ // console.error('Error fetching pricing data:', error);
36+ // window.pricingData = null;
37+ // }
38+ // }
39+
40+ // Execute the function when the script loads
41+ fetchPricingData ( ) ;
You can’t perform that action at this time.
0 commit comments